Fórum

Problem updating Liferay (DB connection)

thumbnail
Mauro Almeida, modificado 12 Anos atrás.

Problem updating Liferay (DB connection)

Junior Member Postagens: 32 Data de Entrada: 15/03/12 Postagens Recentes
Hi all.

I'm trying to let liferay update my database tables (previously created) but having the following error when starting liferay:


12:37:16,753 INFO  [DBFactoryImpl:56] Using dialect org.hibernate.dialect.Oracle10gDialect
Starting Liferay Portal Community Edition 6.1.0 CE (Paton / Build 6100 / January 6, 2012)
12:37:51,908 ERROR [JDBCExceptionReporter:75] ORA-00942: table or view does not exist

12:37:55,733 WARN  [ReleaseLocalServiceImpl:283] ORA-00904: "TESTSTRING": invalid identifier

12:37:56,027 WARN  [ReleaseLocalServiceImpl:140] Release_ table was not initialized properly
12:37:56,030 INFO  [ReleaseLocalServiceImpl:84] Create tables and populate with default data
12:37:56,056 WARN  [BaseDB:382] ORA-00955: name is already used by an existing object: create table Account_ (	accountId number(30,0) not null primary key,	companyId number(30,0),	userId number(30,0),	userName varchar2(300) null,	createDate timestamp null,	modifiedDate timestamp null,	parentAccountId number(30,0),	name varchar2(300) null,	legalName varchar2(300) null,	legalId varchar2(300) null,	legalType varchar2(300) null,	sicCode varchar2(300) null,	tickerSymbol varchar2(300) null,	industry varchar2(300) null,	type_ varchar2(300) null,	size_ varchar2(300) null);
...
Caused by: com.liferay.portal.kernel.exception.SystemException: Release_ table was not initialized properly
	at com.liferay.portal.service.impl.ReleaseLocalServiceImpl.testSupportsStringCaseSensitiveQuery(ReleaseLocalServiceImpl.java:245)
	at com.liferay.portal.service.impl.ReleaseLocalServiceImpl.getBuildNumberOrCreate(ReleaseLocalServiceImpl.java:154)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:112)
	at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:71)
	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:108)
	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:59)
	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:108)
	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:59)
	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:108)
	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:59)
	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:108)
	at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:211)
	at $Proxy73.getBuildNumberOrCreate(Unknown Source)
	at com.liferay.portal.service.ReleaseLocalServiceUtil.getBuildNumberOrCreate(ReleaseLocalServiceUtil.java:273)
	at com.liferay.portal.tools.DBUpgrader.upgrade(DBUpgrader.java:86)
	at com.liferay.portal.events.StartupAction.doRun(StartupAction.java:144)
	at com.liferay.portal.events.StartupAction.run(StartupAction.java:52)
	... 16 more
Stopping the server due to unexpected startup errors



My scenario is described bellow:
  • Tomcat 7
  • Liferay CE 6.1


I've defined my database connection has follows:
  • in portal ext:
    jdbc.default.jndi.name=jdbc/LiferayPool

  • in tomcat's server.xml:
    
    <context path="" crosscontext="true">
    
    				<resource name="jdbc/LiferayPool" auth="Container" type="javax.sql.DataSource" driverClassName="${PortalDbDriver}" url="${PortalDbUrl}" username="${PortalDbUsersAdmUser}" password="${PortalDbUsersAdmPwd}" maxActive="20" defaultAutoCommit="false" />
    </context>


Could someone help me with this?

Best regards,
MJA
thumbnail
Mauro Almeida, modificado 12 Anos atrás.

RE: Problem updating Liferay (DB connection)

Junior Member Postagens: 32 Data de Entrada: 15/03/12 Postagens Recentes
Hi all,

Anyone with similar problem?

Regards,
MJA
thumbnail
Hitoshi Ozawa, modificado 12 Anos atrás.

RE: Problem updating Liferay (DB connection)

Liferay Legend Postagens: 7942 Data de Entrada: 24/03/10 Postagens Recentes
Liferay doesn't update tables. It can only create them. You'll have to drop it and let Liferay recreate it over again or manually update the table yourself.
thumbnail
Mauro Almeida, modificado 11 Anos atrás.

RE: Problem updating Liferay (DB connection)

Junior Member Postagens: 32 Data de Entrada: 15/03/12 Postagens Recentes
Hi Hitoshi.

Liferay automatically executes the update scripts detecting the version in the RELEASE_ table, right? That is the "update" I was referring to.


Best regards,
MJA
thumbnail
Hitoshi Ozawa, modificado 11 Anos atrás.

RE: Problem updating Liferay (DB connection)

Liferay Legend Postagens: 7942 Data de Entrada: 24/03/10 Postagens Recentes
Sorry for the misunderstanding, but nice to hear that you've got it working now. emoticon
thumbnail
Mai Mohamed ElNaggar, modificado 7 Anos atrás.

RE: Problem updating Liferay (DB connection)

New Member Postagens: 6 Data de Entrada: 18/07/15 Postagens Recentes
'm facing the same problem , how could you exceed it ?