Fórum
Liferay 7 Service Builder Table Creation Issue
Sai Mohan Gadamsetty, modificado 7 Anos atrás.
Liferay 7 Service Builder Table Creation Issue
Junior Member Postagens: 92 Data de Entrada: 06/02/13 Postagens Recentes
I am trying to create a sample service builder as provided in the documentation (Liferay 7).
https://web.liferay.com/web/zhao.jin/blog/-/blogs/creating-service-builder-mvc-portlet-in-liferay-7-with-liferay-ide-3-
I did build and Deploy with out any errors but table not get created in the database. I used default Foo (Sample) to build and generate tables.
And in log it says Foo api and service started.
Verified in ServiceComponent table as well, I didn't see Name sample with (Foo) given in the service.xml file.
Liferay Version: Liferay 7 GA2
Database: MariaDB (10.1.16) (and tried with MySql 5.6 also)
I used to create Service Builder with (using Liferay 7 sdk), it deployed and created tables without any errors.
What I'm missing here please help me to know this issue.
!!
https://web.liferay.com/web/zhao.jin/blog/-/blogs/creating-service-builder-mvc-portlet-in-liferay-7-with-liferay-ide-3-
I did build and Deploy with out any errors but table not get created in the database. I used default Foo (Sample) to build and generate tables.
And in log it says Foo api and service started.
Verified in ServiceComponent table as well, I didn't see Name sample with (Foo) given in the service.xml file.
Liferay Version: Liferay 7 GA2
Database: MariaDB (10.1.16) (and tried with MySql 5.6 also)
I used to create Service Builder with (using Liferay 7 sdk), it deployed and created tables without any errors.
What I'm missing here please help me to know this issue.
!!
Juan Gonzalez, modificado 7 Anos atrás.
RE: Liferay 7 Service Builder Table Creation Issue
Liferay Legend Postagens: 3089 Data de Entrada: 28/10/08 Postagens Recentes
Please read this steps: https://web.liferay.com/community/forums/-/message_boards/message/78393499#_19_message_78393499
Sai Mohan Gadamsetty, modificado 7 Anos atrás.
RE: Liferay 7 Service Builder Table Creation Issue
Junior Member Postagens: 92 Data de Entrada: 06/02/13 Postagens Recentes
Hi Juan Gonzalez,
Worked your instructions, I am able generate sql tables after changes 'compileOnly' to 'compile' (build.gradle file)
Thank you very much for your help.
Worked your instructions, I am able generate sql tables after changes 'compileOnly' to 'compile' (build.gradle file)
Thank you very much for your help.
Juan Gonzalez, modificado 7 Anos atrás.
RE: Liferay 7 Service Builder Table Creation Issue
Liferay Legend Postagens: 3089 Data de Entrada: 28/10/08 Postagens RecentesSai Mohan Gadamsetty:
Hi Juan Gonzalez,
Worked your instructions, I am able generate sql tables after changes 'compileOnly' to 'compile' (build.gradle file)
Thank you very much for your help.
Glad it worked for you ;-).
Sai Mohan Gadamsetty, modificado 7 Anos atrás.
RE: Liferay 7 Service Builder Table Creation Issue
Junior Member Postagens: 92 Data de Entrada: 06/02/13 Postagens Recentes
I might ask this in a different thread but it related to Service builder table generation so I keeping my request here..
When I try to create an association table, I found one default column is creating with new table, new column didn't specified in service.xml file
E.g: in my service.xml (attached service.xml file) file I used one relationship for two tables to store their main id's
After executing build service then it generate sql query as below
create table Sai_Course (
courseId LONG not null primary key,
courseName VARCHAR(75) null,
courseGroup VARCHAR(75) null
);
create table Sai_Student (
studentId LONG not null primary key,
studentName VARCHAR(75) null,
studentPlace VARCHAR(75) null,
studentCollege VARCHAR(75) null
);
create table Sai_Students_Courses (
companyId LONG not null,
courseId LONG not null,
studentId LONG not null,
primary key (courseId, studentId)
);
When I try to run the deploy target then its showing me below error (attached log file)
I didn't face this issue with previous version of Liferay (6.1 or 6.2). Could you please advise your inputs how to overcome this. Did I miss any thing here please advise your thoughts.
When I try to create an association table, I found one default column is creating with new table, new column didn't specified in service.xml file
E.g: in my service.xml (attached service.xml file) file I used one relationship for two tables to store their main id's
After executing build service then it generate sql query as below
create table Sai_Course (
courseId LONG not null primary key,
courseName VARCHAR(75) null,
courseGroup VARCHAR(75) null
);
create table Sai_Student (
studentId LONG not null primary key,
studentName VARCHAR(75) null,
studentPlace VARCHAR(75) null,
studentCollege VARCHAR(75) null
);
create table Sai_Students_Courses (
companyId LONG not null,
courseId LONG not null,
studentId LONG not null,
primary key (courseId, studentId)
);
When I try to run the deploy target then its showing me below error (attached log file)
I didn't face this issue with previous version of Liferay (6.1 or 6.2). Could you please advise your inputs how to overcome this. Did I miss any thing here please advise your thoughts.