Fórum
How can I manage two different databases for different entities in lr 6.1
Kiran Kumar Boyini, modificado 11 Anos atrás.
How can I manage two different databases for different entities in lr 6.1
Expert Postagens: 287 Data de Entrada: 02/06/11 Postagens Recentes
Hi All,
I have the following requirement.I want to read the data from entity belongs to database1 and write those data into another entity
belongs to another database.
How can I achieve this requirement in liferay .
I tried using service builder,but I am getting exception.I posted this issue in previous post
Please help me.
Regards,
Kiran.
I have the following requirement.I want to read the data from entity belongs to database1 and write those data into another entity
belongs to another database.
How can I achieve this requirement in liferay .
I tried using service builder,but I am getting exception.I posted this issue in previous post
Please help me.
Regards,
Kiran.
David H Nebinger, modificado 11 Anos atrás.
RE: How can I manage two different databases for different entities in lr 6
Liferay Legend Postagens: 14919 Data de Entrada: 02/09/06 Postagens Recentes
Using multiple databases in SB works just fine. I do it all the time.
Your exception is what it is, the secondary table does not exist. I guess you either disabled the auto.upgrade flag (so SB would not create the table) or you're using credentials that cannot create tables.
Your exception is what it is, the secondary table does not exist. I guess you either disabled the auto.upgrade flag (so SB would not create the table) or you're using credentials that cannot create tables.
Kiran Kumar Boyini, modificado 11 Anos atrás.
RE: How can I manage two different databases for different entities in lr 6
Expert Postagens: 287 Data de Entrada: 02/06/11 Postagens Recentes
Thanks for reply David,
Now it is working fine .But here the problem every time I am getting error related to an entity which is not belongs to database.
Here I am using two databases(lportal,dbfeb4), entities(employee_EmployeeLportal,employee_employee) respectively.
But when I am trying to get the list of employee.
It is showing the error below in log file as follows:
ERROR [JDBCExceptionReporter:75] Table 'lportal.employee_employee' doesn't exist
com.liferay.portal.kernel.exception.SystemException: com.liferay.portal.kernel.dao.orm.ORMException: org.hibernate.exception.SQLGrammarException: could not execute query
at com.liferay.portal.service.persistence.impl.BasePersistenceImpl.processException(BasePersistenceImpl.java:193)
As you said I tried with build.auto.upgrade=true/false in service properties file of my portlet.
Is that any configuration require to avoid this error.
Regards,
Kiran.
Now it is working fine .But here the problem every time I am getting error related to an entity which is not belongs to database.
Here I am using two databases(lportal,dbfeb4), entities(employee_EmployeeLportal,employee_employee) respectively.
But when I am trying to get the list of employee.
java.util.List <employee>employeeListObj=null;
employeeListObj=EmployeeLocalServiceUtil.getEmployees(0, EmployeeLocalServiceUtil.getEmployeesCount());</employee>
It is showing the error below in log file as follows:
ERROR [JDBCExceptionReporter:75] Table 'lportal.employee_employee' doesn't exist
com.liferay.portal.kernel.exception.SystemException: com.liferay.portal.kernel.dao.orm.ORMException: org.hibernate.exception.SQLGrammarException: could not execute query
at com.liferay.portal.service.persistence.impl.BasePersistenceImpl.processException(BasePersistenceImpl.java:193)
As you said I tried with build.auto.upgrade=true/false in service properties file of my portlet.
Is that any configuration require to avoid this error.
Regards,
Kiran.