Forums de discussion

Problem updating Liferay (DB connection)

thumbnail
Mauro Almeida, modifié il y a 12 années.

Problem updating Liferay (DB connection)

Junior Member Publications: 32 Date d'inscription: 15/03/12 Publications récentes
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, modifié il y a 12 années.

RE: Problem updating Liferay (DB connection)

Junior Member Publications: 32 Date d'inscription: 15/03/12 Publications récentes
Hi all,

Anyone with similar problem?

Regards,
MJA
thumbnail
Hitoshi Ozawa, modifié il y a 11 années.

RE: Problem updating Liferay (DB connection)

Liferay Legend Publications: 7942 Date d'inscription: 24/03/10 Publications récentes
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, modifié il y a 11 années.

RE: Problem updating Liferay (DB connection)

Junior Member Publications: 32 Date d'inscription: 15/03/12 Publications récentes
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, modifié il y a 11 années.

RE: Problem updating Liferay (DB connection)

Liferay Legend Publications: 7942 Date d'inscription: 24/03/10 Publications récentes
Sorry for the misunderstanding, but nice to hear that you've got it working now. emoticon
thumbnail
Mai Mohamed ElNaggar, modifié il y a 7 années.

RE: Problem updating Liferay (DB connection)

New Member Publications: 6 Date d'inscription: 18/07/15 Publications récentes
'm facing the same problem , how could you exceed it ?