Forums

angle-left Back

database - quartz - issue in 5.1

Jonas Yuan, modified 10 Years ago.

database - quartz - issue in 5.1

Liferay Master Posts: 993 Join Date: 4/26/07 Recent Posts
There is database refreshing - quartz - issue in 5.1!

In Tomcat 6.x (MySQL 5.0), before running Liferay, clean databases first (running the following sql scripts), it is working fine.

But if restarting tomcat without clean the database, get the errors:

0:32:14,656 ERROR [MainServlet:159] com.liferay.portal.kernel.events.ActionException: com.liferay.portal.upgrade.UpgradeException: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Table 'quartz_job_details' already exists
com.liferay.portal.kernel.events.ActionException: com.liferay.portal.upgrade.UpgradeException: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Table 'quartz_job_details' already exists



-------------------------- SQL script to clean database -----------------------------------
use lportal;

drop table if exists quartz_triggers;

drop table if exists quartz_blob_triggers;

drop table if exists quartz_calendars;

drop table if exists quartz_cron_triggers;

drop table if exists quartz_job_details;

drop table if exists quartz_job_listeners;

drop table if exists quartz_locks;

drop table if exists quartz_paused_trigger_grps;

drop table if exists quartz_scheduler_state;

drop table if exists quartz_simple_triggers;

drop table if exists quartz_trigger_listeners;

drop table if exists quartz_fired_triggers;
JR Houn, modified 10 Years ago.

RE: database - quartz - issue in 5.1

LIFERAY STAFF Expert Posts: 489 Join Date: 11/19/07 Recent Posts
Hi Jonas-
I think this has been solved (http://support.liferay.com/browse/LEP-6772).
-jr
Jonas Yuan, modified 10 Years ago.

RE: database - quartz - issue in 5.1

Liferay Master Posts: 993 Join Date: 4/26/07 Recent Posts
Hi JR,

Thank you!

Just check out new codes from SVN 5.1.x, and test it. The issue is still there .......

Hope that it would be getting fixed as soon as possible - Can't wait for 5.1 ......

Jonas Yuan
Bruno Farache, modified 10 Years ago.

RE: database - quartz - issue in 5.1

LIFERAY STAFF Liferay Master Posts: 603 Join Date: 5/14/07 Recent Posts
Hi Jonas, can you please specify the steps to reproduce the error, I didn't understand the bug description very well.
Jonas Yuan, modified 10 Years ago.

RE: database - quartz - issue in 5.1

Liferay Master Posts: 993 Join Date: 4/26/07 Recent Posts
Hi Bruno,

Here are scenarios:

1) In Tomcat 6.x (MySQL 5.0), before running Liferay, clean databases first (running the following sql scripts). Then it is working fine.

2) restarting tomcat without cleaning (running the following sql scripts) the database, then will get the errors:

0:32:14,656 ERROR [MainServlet:159] com.liferay.portal.kernel.events.ActionException: com.liferay.portal.upgrade.UpgradeException: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Table 'quartz_job_details' already exists
com.liferay.portal.kernel.events.ActionException: com.liferay.portal.upgrade.UpgradeException: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Table 'quartz_job_details' already exists

Here are sql scripts:

-------------------------- SQL script to clean database -----------------------------------
use lportal;

drop table if exists quartz_triggers;

drop table if exists quartz_blob_triggers;

drop table if exists quartz_calendars;

drop table if exists quartz_cron_triggers;

drop table if exists quartz_job_details;

drop table if exists quartz_job_listeners;

drop table if exists quartz_locks;

drop table if exists quartz_paused_trigger_grps;

drop table if exists quartz_scheduler_state;

drop table if exists quartz_simple_triggers;

drop table if exists quartz_trigger_listeners;

drop table if exists quartz_fired_triggers;
Bruno Farache, modified 10 Years ago.

RE: database - quartz - issue in 5.1

LIFERAY STAFF Liferay Master Posts: 603 Join Date: 5/14/07 Recent Posts
Hey Jonas, I suppose you tried to upgrade from 5.0.1 to 5.1? I tried to reproduce it with trunk but got no errors, here are my steps:

1. Build Liferay from trunk.

2. Run it against a 5.0.1 database, the upgrade process runs fine.
Jonas Yuan, modified 10 Years ago.

RE: database - quartz - issue in 5.1

Liferay Master Posts: 993 Join Date: 4/26/07 Recent Posts
Hi Bruno,

You are right. The database is upgraded from 5.0.1. The database we are using now is for 5.0.1.

But it is working well in the version 5.1 (before July 17, 2008).

Now it is not working well for the version 5.1(the current branch).

Thanks

Jonas Yuan
Adam T, modified 10 Years ago.

RE: database - quartz - issue in 5.1

Junior Member Posts: 34 Join Date: 6/12/07 Recent Posts
I am having a similar issue. I was on 4.4 / Tomcat 6 / MySQL 4.1 and upgraded to 5.1 / Tomcat 6 / MySQL 4.1

Now every time I restart Tomcat I get the attached errors.

I'm also getting quite a few NullPointerExceptions I've never seen before and some portlet not found error messages I have seen in the past.
Jeff Wilson, modified 10 Years ago.

RE: database - quartz - issue in 5.1

New Member Posts: 11 Join Date: 1/31/07 Recent Posts
I have been having the same problem with a Liferay 5.0.1 to 5.1.1 upgrade.

The problem starts when 5.1.1 StartupAction doRun method decides that the update-5.0.1-5.1.0.sql database upgrade process needs to be executed. The last line in that script reads "@include quartz-tables.sql" which causes the quartz tables to be unconditionally created. However, the quartz tables already exist in the database as a result of the 5.0.1 upgrade.

This failure would not be a problem, as the tables that should be created with this db upgrade already exist. However, this exception causes the doRun method to prematurely abort with incomplete system initialization, which subsequently breaks the search indexer (causing many NULL exceptions) among other things.

Fortunately, a permanent fix is simple:

1) shutdown Liferay 5.1.1
2) backup your database (in case your problem is actually not the same as mine)
3) remove the quartz tables (which should be empty, unused, and unexpected) using the following script:

drop table QUARTZ_JOB_DETAILS;
drop table QUARTZ_JOB_LISTENERS;
drop table QUARTZ_TRIGGERS;
drop table QUARTZ_SIMPLE_TRIGGERS;
drop table QUARTZ_CRON_TRIGGERS;
drop table QUARTZ_BLOB_TRIGGERS;
drop table QUARTZ_TRIGGER_LISTENERS;
drop table QUARTZ_CALENDARS;
drop table QUARTZ_PAUSED_TRIGGER_GRPS;
drop table QUARTZ_FIRED_TRIGGERS;
drop table QUARTZ_SCHEDULER_STATE;
drop table QUARTZ_LOCKS;

4) start Liferay 5.1.1 -- it will automatically re-create the quartz tables and mark the database version as 5.1.0.

Liferay 5.1.x could easily be fixed by updating quartz-tables.sql to check for the existence of the tables before trying to create them.

Enjoy!
-Jeff
Adam T, modified 9 Years ago.

RE: database - quartz - issue in 5.1

Junior Member Posts: 34 Join Date: 6/12/07 Recent Posts
Thanks Jeff.

After trying that the upgrade bombed at:

20:44:11,641 ERROR [MainServlet:154] com.liferay.portal.kernel.events.ActionException: com.liferay.portal.verify.VerifyException: com.liferay.portal.NoSuchUserException: No User exists with t
he primary key 10501
com.liferay.portal.kernel.events.ActionException: com.liferay.portal.verify.VerifyException: com.liferay.portal.NoSuchUserException: No User exists with the primary key 10501
at com.liferay.portal.events.StartupAction.run(StartupAction.java:76)
at com.liferay.portal.servlet.MainServlet.init(MainServlet.java:146)
at javax.servlet.GenericServlet.init(GenericServlet.java:212)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1161)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:981)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4058)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4364)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:626)
at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1147)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: com.liferay.portal.verify.VerifyException: com.liferay.portal.NoSuchUserException: No User exists with the primary key 10501
at com.liferay.portal.verify.VerifyGroup.verify(VerifyGroup.java:52)
at com.liferay.portal.verify.VerifyProcess.verify(VerifyProcess.java:53)
at com.liferay.portal.verify.VerifyProcessSuite.verify(VerifyProcessSuite.java:47)
at com.liferay.portal.events.StartupAction.doRun(StartupAction.java:284)
at com.liferay.portal.events.StartupAction.run(StartupAction.java:70)
... 28 more
Caused by: com.liferay.portal.NoSuchUserException: No User exists with the primary key 10501
at com.liferay.portal.service.persistence.UserPersistenceImpl.findByPrimaryKey(UserPersistenceImpl.java:313)
at com.liferay.portal.service.impl.UserLocalServiceImpl.getUserById(UserLocalServiceImpl.java:1156)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy144.getUserById(Unknown Source)
at com.liferay.portal.service.UserLocalServiceUtil.getUserById(UserLocalServiceUtil.java:435)
at com.liferay.portal.verify.VerifyGroup.verifyGroup(VerifyGroup.java:65)
at com.liferay.portal.verify.VerifyGroup.verify(VerifyGroup.java:49)
... 32 more

Man, the 4.X releases were so stable. I'm getting NullPointerExceptions all over the place now.
Jonas Yuan, modified 9 Years ago.

RE: database - quartz - issue in 5.1

Liferay Master Posts: 993 Join Date: 4/26/07 Recent Posts
The same issue is not fixed in the 5.1.2 (currently branches 5.1.x).

before adding: quartz.sql

RROR [QuartzSchedulerEngineImpl:85] Unable to initialize engine
org.quartz.SchedulerConfigException: Failure occured during job recovery. [See nested exception: org.quartz.JobPersistenceException: Couldn't clean volatile data: Table 'demo.quartz_triggers' doesn't exist [See nested exception: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Table 'demo.quartz_triggers' doesn't exist]]

after adding: quartz.sql

23:52:48,984 ERROR [MainServlet:153] com.liferay.portal.kernel.events.ActionException: com.liferay.portal.upgrade.UpgradeException: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Table 'quartz_job_details' already exists
com.liferay.portal.kernel.events.ActionException: com.liferay.portal.upgrade.UpgradeException: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Table 'quartz_job_details' already exists
at com.liferay.portal.events.StartupAction.run(StartupAction.java:78)

Looking forward to seeing this issue being fixed .....

Thanks
Jonas Yuan, modified 9 Years ago.

RE: database - quartz - issue in 5.1

Liferay Master Posts: 993 Join Date: 4/26/07 Recent Posts
For the v5.1.2, database issues is there ....

If you start from scratch (create new database lportal), you will get errors for the first time - starting tomcat:

(The errors will be gone after second start .....)

org.quartz.SchedulerConfigException: Failure occured during job recovery. [See nested exception: org.quartz.JobPersistenceException: Couldn't clean volatile data: Table 'lportal.quartz_triggers' doesn't exist [See nested exception: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Table 'lportal.quartz_triggers' doesn't exist]]
at org.quartz.impl.jdbcjobstore.JobStoreSupport.initialize(JobStoreSupport.java:557)
at org.quartz.impl.jdbcjobstore.JobStoreTX.initialize(JobStoreTX.java:59)
at org.quartz.impl.StdSchedulerFactory.instantiate(StdSchedulerFactory.java:1204)
at org.quartz.impl.StdSchedulerFactory.getScheduler(StdSchedulerFactory.java:1355)
at com.liferay.portal.scheduler.quartz.QuartzSchedulerEngineImpl.<init>(QuartzSchedulerEngineImpl.java:82)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:100)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:61)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:877)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:839)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
at java.security.AccessController.doPrivileged(Native Method)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:221)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:269)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104)
at org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:495)
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:162)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:925)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:835)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
at java.security.AccessController.doPrivileged(Native Method)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:221)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:729)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:381)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
at com.liferay.portal.spring.context.PortalContextLoaderListener.contextInitialized(PortalContextLoaderListener.java:50)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:627)
at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: org.quartz.JobPersistenceException: Couldn't clean volatile data: Table 'lportal.quartz_triggers' doesn't exist [See nested exception: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Table 'lportal.quartz_triggers' doesn't exist]
at org.quartz.impl.jdbcjobstore.JobStoreSupport.cleanVolatileTriggerAndJobs(JobStoreSupport.java:736)
at org.quartz.impl.jdbcjobstore.JobStoreSupport$1.execute(JobStoreSupport.java:697)
at org.quartz.impl.jdbcjobstore.JobStoreSupport$40.execute(JobStoreSupport.java:3628)
at org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInNonManagedTXLock(JobStoreSupport.java:3662)
at org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInNonManagedTXLock(JobStoreSupport.java:3624)
at org.quartz.impl.jdbcjobstore.JobStoreSupport.cleanVolatileTriggerAndJobs(JobStoreSupport.java:693)
at org.quartz.impl.jdbcjobstore.JobStoreSupport.initialize(JobStoreSupport.java:555)
... 67 more
Caused by: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Table 'lportal.quartz_triggers' doesn't exist
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:936)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2985)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1631)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1723)
at com.mysql.jdbc.Connection.execSQL(Connection.java:3256)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1313)
at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1448)
at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:93)
at org.quartz.impl.jdbcjobstore.StdJDBCDelegate.selectVolatileTriggers(StdJDBCDelegate.java:3491)
at com.liferay.portal.scheduler.quartz.DynamicDriverDelegate.selectVolatileTriggers(DynamicDriverDelegate.java:567)
at org.quartz.impl.jdbcjobstore.JobStoreSupport.cleanVolatileTriggerAndJobs(JobStoreSupport.java:714)
... 73 more
Jonas Yuan, modified 9 Years ago.

RE: database - quartz - issue in 5.1

Liferay Master Posts: 993 Join Date: 4/26/07 Recent Posts
For the version 5.1.2,

The error is still there but looks different.

NFO: PSPL_PCCSPCPCI0003 : Starting PortletContainer 2.0_01
Starting Liferay Portal 5.1.2 (Calvin / Build 5102 / September 17, 2008)
18:40:06,859 INFO [StartupAction:196] Running upgrade com.liferay.portal.upgrade.UpgradeProcess_5_1_0
18:40:06,859 INFO [UpgradeProcess_5_1_0:47] Upgrading
18:40:06,875 WARN [DBUtil:425] Duplicate column name 'draft'
18:40:06,875 WARN [DBUtil:425] Duplicate column name 'allowTrackbacks'
18:40:06,875 WARN [DBUtil:425] Duplicate column name 'trackbacks'
18:40:06,875 WARN [DBUtil:425] Duplicate column name 'facebookSn'
18:40:06,875 WARN [DBUtil:425] Duplicate column name 'mySpaceSn'
18:40:06,875 WARN [DBUtil:425] Duplicate column name 'twitterSn'
18:40:07,093 WARN [DBUtil:425] Table 'socialrequest' already exists
18:40:07,093 WARN [DBUtil:425] Duplicate column name 'openId'
18:40:08,187 WARN [DBUtil:425] Duplicate column name 'modifiedDate'
18:40:08,187 WARN [DBUtil:425] Duplicate column name 'summary'
18:40:08,796 ERROR [MainServlet:153] com.liferay.portal.kernel.events.ActionException: com.liferay.portal.upgrade.UpgradeException: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Table 'quartz_job_details' already exists
com.liferay.portal.kernel.events.ActionException: com.liferay.portal.upgrade.UpgradeException: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Table 'quartz_job_details' already exists
ES
Eugene Shagenov, modified 9 Years ago.

RE: database - quartz - issue in 5.1

New Member Posts: 2 Join Date: 10/20/08 Recent Posts
I'm in the process of upgrading from 5.0.1 to 5.1.2 and experiencing this exact problem. Has anyone found a solution?
Jonas Yuan, modified 9 Years ago.

RE: database - quartz - issue in 5.1

Liferay Master Posts: 993 Join Date: 4/26/07 Recent Posts
The Issue is still there even for branches 5.1.*

Same error message:

Oct 28, 2008 9:36:40 AM com.sun.portal.portletcontainer.impl.PortletContainerContextListenerImpl contextInitialized
INFO: PSPL_PCCSPCPCI0003 : Starting PortletContainer 2.0_01
Starting Liferay Portal 5.1.2 (Calvin / Build 5102 / October 3, 2008)
09:36:42,437 INFO [PortalLocalServiceImpl:169] Running upgrade com.liferay.portal.upgrade.UpgradeProcess_5_1_0
09:36:42,437 INFO [UpgradeProcess_5_1_0:47] Upgrading
09:36:42,546 WARN [DBUtil:425] Duplicate column name 'draft'
09:36:42,546 WARN [DBUtil:425] Duplicate column name 'allowTrackbacks'
09:36:42,546 WARN [DBUtil:425] Duplicate column name 'trackbacks'
09:36:42,593 WARN [DBUtil:425] Duplicate column name 'facebookSn'
09:36:42,593 WARN [DBUtil:425] Duplicate column name 'mySpaceSn'
09:36:42,593 WARN [DBUtil:425] Duplicate column name 'twitterSn'
09:36:43,015 WARN [DBUtil:425] Table 'socialrequest' already exists
09:36:43,093 WARN [DBUtil:425] Duplicate column name 'openId'
09:36:44,421 WARN [DBUtil:425] Duplicate column name 'modifiedDate'
09:36:44,421 WARN [DBUtil:425] Duplicate column name 'summary'
09:36:45,062 ERROR [MainServlet:153] com.liferay.portal.kernel.events.ActionException: com.liferay.portal.upgrade.UpgradeException: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Table 'quartz_job_details' already exists
com.liferay.portal.kernel.events.ActionException: com.liferay.portal.upgrade.UpgradeException: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Table 'quartz_job_details' already exists
at com.liferay.portal.events.StartupAction.run(StartupAction.java:48)
at com.liferay.portal.servlet.MainServlet.init(MainServlet.java:145)


Jonas Yuan
Liferay Book: Liferay Portal Enterprise Intranets
Jonas Yuan, modified 9 Years ago.

RE: database - quartz - issue in 5.1

Liferay Master Posts: 993 Join Date: 4/26/07 Recent Posts
Hi Eugene,

This issue is still open. Please check

http://support.liferay.com/browse/LEP-7739


Jonas Yuan
Liferay Book: Liferay Portal Enterprise Intranets
Jonas Yuan, modified 9 Years ago.

RE: database - quartz - issue in 5.1

Liferay Master Posts: 993 Join Date: 4/26/07 Recent Posts
This issue is still open for Liferay SE 5.2.*, at revision 23726.

It is really important. Should be fixed as soon as possible .....

Jonas Yuan
Liferay Book: Liferay Portal Enterprise Intranets

Dec. 12, 2008
18:03:35,546 INFO [ServerDetector:76] Detected server tomcat
Starting Liferay Portal Standard Edition 5.2.0 (Augustine / Build 5200 / December 5, 2008)
18:03:47,312 INFO [UpgradeProcess_5_1_0:47] Upgrading
18:03:47,343 WARN [DBUtil:434] Duplicate column name 'draft'
18:03:47,343 WARN [DBUtil:434] Duplicate column name 'allowTrackbacks'
18:03:47,343 WARN [DBUtil:434] Duplicate column name 'trackbacks'
18:03:47,343 WARN [DBUtil:434] Duplicate column name 'facebookSn'
18:03:47,343 WARN [DBUtil:434] Duplicate column name 'mySpaceSn'
18:03:47,343 WARN [DBUtil:434] Duplicate column name 'twitterSn'
18:03:48,500 WARN [DBUtil:434] Table 'socialrequest' already exists
18:03:48,515 WARN [DBUtil:434] Duplicate column name 'openId'
18:03:49,750 WARN [DBUtil:434] Duplicate column name 'modifiedDate'
18:03:49,750 WARN [DBUtil:434] Duplicate column name 'summary'
18:03:50,296 ERROR [MainServlet:164] com.liferay.portal.kernel.events.ActionException: com.liferay.portal.upgrade.UpgradeException: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Table 'quartz_job_details' already exists
com.liferay.portal.kernel.events.ActionException: com.liferay.portal.upgrade.UpgradeException: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Table 'quartz_job_details' already exists
Bruno Farache, modified 9 Years ago.

RE: database - quartz - issue in 5.1

LIFERAY STAFF Liferay Master Posts: 603 Join Date: 5/14/07 Recent Posts
Hi Jonas! What's your suggestion to fix this?
Jonas Yuan, modified 9 Years ago.

RE: database - quartz - issue in 5.1

Liferay Master Posts: 993 Join Date: 4/26/07 Recent Posts
Hi Bruno,

I do not have a solution on this issue yet. But this issue is very important to upgrade Liferay Portal from 5.0 to 5.1 or 5.2 or above ....

Hope that this issue would be fixed as early as possible.

Do you have any plan to fix it?

Thanks

Jonas Yuan
Bruno Farache, modified 9 Years ago.

RE: database - quartz - issue in 5.1

LIFERAY STAFF Liferay Master Posts: 603 Join Date: 5/14/07 Recent Posts
I was never able to reproduce it, I will try again. Didn't the workaround proposed by Jeff Wilson fixed it?
Jonas Yuan, modified 9 Years ago.

RE: database - quartz - issue in 5.1

Liferay Master Posts: 993 Join Date: 4/26/07 Recent Posts
Fixed? Could you please give me the link?

This issue is coming out for different customers' data. For example,
1) data was upgraded from 4.3.6 to 5.0.1
2) data are created by Liferay portal 5.0.1

Both data set have upgrading issue as mentioned above.

Do you want to try these sample data?

Thanks

Jonas Yuan
Bruno Farache, modified 9 Years ago.

RE: database - quartz - issue in 5.1

LIFERAY STAFF Liferay Master Posts: 603 Join Date: 5/14/07 Recent Posts
I meant the workaroung that Jeff suggested earlier in this post:

Jeff Wilson:
Fortunately, a permanent fix is simple:

1) shutdown Liferay 5.1.1
2) backup your database (in case your problem is actually not the same as mine)
3) remove the quartz tables (which should be empty, unused, and unexpected) using the following script:

drop table QUARTZ_JOB_DETAILS;
drop table QUARTZ_JOB_LISTENERS;
drop table QUARTZ_TRIGGERS;
drop table QUARTZ_SIMPLE_TRIGGERS;
drop table QUARTZ_CRON_TRIGGERS;
drop table QUARTZ_BLOB_TRIGGERS;
drop table QUARTZ_TRIGGER_LISTENERS;
drop table QUARTZ_CALENDARS;
drop table QUARTZ_PAUSED_TRIGGER_GRPS;
drop table QUARTZ_FIRED_TRIGGERS;
drop table QUARTZ_SCHEDULER_STATE;
drop table QUARTZ_LOCKS;

4) start Liferay 5.1.1 -- it will automatically re-create the quartz tables and mark the database version as 5.1.0.
Jonas Yuan, modified 9 Years ago.

RE: database - quartz - issue in 5.1

Liferay Master Posts: 993 Join Date: 4/26/07 Recent Posts
Hi Bruno,

These processes do not help.

After running following SQL script, still get same errors. (I)

For another process, still get same errors: (II)
1) have data with Liferay 5.0.1
2) run update-5.0.1-5.1.0.sql
3) run update-5.1.0-5.1.2.sql
4) run update-5.1.2-5.2.0.sql

Thanks

Jonas Yuan

----------------------------------------------

drop table if exists quartz_triggers;

drop table if exists quartz_blob_triggers;

drop table if exists quartz_calendars;

drop table if exists quartz_cron_triggers;

drop table if exists quartz_job_details;

drop table if exists quartz_job_listeners;

drop table if exists quartz_locks;

drop table if exists quartz_paused_trigger_grps;

drop table if exists quartz_scheduler_state;

drop table if exists quartz_simple_triggers;

drop table if exists quartz_trigger_listeners;

drop table if exists quartz_fired_triggers;
Artur Linhart, modified 9 Years ago.

RE: database - quartz - issue in 5.1

Expert Posts: 459 Join Date: 9/13/07 Recent Posts
Hello,

it does not help - in the todays version 5.1.2 the scripts are correct and the quartz tables are defined only once, I have verified all of them.

There are also some other actions executed during the upgrade, not only the SQL scripts (See the classes UpgradeProcess_*.java).

But I think I have found the real cause of the issue. Only to run the statements above will not help to have consistent liferay version. The only systematic solution for me was to disable scheduler before the conversion is started.

Before the upgrade the scheduler has to be turned off by the statement

scheduler.enabled=false

otherwise the problem occurs again (see the description of the error mechanism and how to avoid this in http://issues.liferay.com/browse/LPS-1003).

It is really very difficult to find the real cause for it and to simluate this error - if for example the upgrade is tested on a small database from 5.0.1 to 5.1.0 only, then it will be maybe so fast, that the scheduler will not be fired...

But as I have written in LPS-1003, this problem could be avoided by more changed setting, which - if my theory is correct - from my point of view all must be set like today to let this error occur.

cheers, Artur

P.S. In my case before disabling the scheduler the upgrade alway has failed with the exception

com.liferay.portal.kernel.events.ActionException: com.liferay.portal.upgrade.UpgradeException: org.postgresql.util.PSQLException: ERROR: relation "quartz_job_details" already exists

and has not been executed.
Jonas Yuan, modified 9 Years ago.

RE: database - quartz - issue in 5.1

Liferay Master Posts: 993 Join Date: 4/26/07 Recent Posts
Hi Artur,

This issue is still open (for 5.1 and 5.2), but you can have a temporal solution:

Just remove @include quartz-tables.sql at the end of the update-5.0.1-5.1.0.sql located in liferay-portal-5.1.2.war\WEB-INF\lib\portal-impl.jar\com\liferay\portal\tools\sql\dependencies\update-5.0.1-5.1.0.sql. It works on MySQL 5.0, MS SQL 2000, etc.

Good Luck!

Jonas Yuan
Liferay Book: Liferay Portal Enterprise Intranets
Jonas Yuan, modified 9 Years ago.

RE: database - quartz - issue in 5.1

Liferay Master Posts: 993 Join Date: 4/26/07 Recent Posts
This bug was fixed in 5.1.3 and 5.2.*.

You can have a quick fix based on your current portal source.

Locate the file: update-5.0.1-5.1.0.sql in /portal/sql
Remove the line: @include quartz-tables.sql
Ant clean start build-ext

You should get it ....

Thanks

Jonas Yuan
Artur Linhart, modified 9 Years ago.

RE: database - quartz - issue in 5.1

Expert Posts: 459 Join Date: 9/13/07 Recent Posts
Ok, this would also solve the problem...

For me it was eough to disable the scheduler during the upgrade and thern turn it on after the upgrade has been executed.

So, our site has been successfully upgraded :-)

Thank You for answer, Archie.
MK
M K, modified 9 Years ago.

RE: database - quartz - issue in 5.1

New Member Posts: 5 Join Date: 3/14/09 Recent Posts
Where can I download 5.1.3 from? I cannot find it in the sourceforge repository


Jonas Yuan:
This bug was fixed in 5.1.3 and 5.2.*.


Thanks

Jonas Yuan
Olaf Kock, modified 9 Years ago.

RE: database - quartz - issue in 5.1

LIFERAY STAFF Liferay Legend Posts: 4697 Join Date: 9/23/08 Recent Posts
M K:
Where can I download 5.1.3 from? I cannot find it in the sourceforge repository

You can't find 5.1.3 on sourceforge - it's a bugfix release for the Enterprise edition. You'd either have to patch your 5.1.2 yourself, get 5.2.x or purchase the enterprise edition.

Cheers,
Olaf