motechquartz database is not being populated on bootstrap

116 views
Skip to first unread message

Craig A

unread,
Jun 22, 2015, 7:40:56 PM6/22/15
to motec...@googlegroups.com
Hi,

I deployed the motech-platform-server war file v0.25.1 and ran through the bootstrap process. The motech server starts, but I get motechquartz database connection errors in my catalina.out file. Below is a paste of the errors. I don't think the motechquartz database setup is being done in the bootstrap.

Sincerely,
Craig

2015-06-22 21:42:10,184 ERROR [org.motechproject.scheduler.factory.MotechSchedulerFactoryBean] Failed to instantiate scheduler with configuration from quartz.properties
2015-06-22 21:42:10,186 ERROR [org.eclipse.gemini.blueprint.extender.internal.activator.ContextLoaderListener] Application context refresh failed (MotechOsgiConfigurableApplicationContext(bundle=org.motechproject.motech-scheduler, config=osgibundle:/META-INF/spring/*.xml))
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'motechSchedulerFactoryBean': Invocation of init method failed; nested exception is org.motechproject.scheduler.exception.SchedulerInstantiationException: org.quartz.SchedulerConfigException: Failure occured during job recovery. [See nested exception: org.quartz.JobPersistenceException: Couldn't recover jobs: Table 'motechquartz.QRTZ_TRIGGERS' doesn't exist [See nested exception: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'motechquartz.QRTZ_TRIGGERS' doesn't exist]]
at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:135)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:394)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1448)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:913)
at org.eclipse.gemini.blueprint.context.support.AbstractDelegatedExecutionApplicationContext.access$1600(AbstractDelegatedExecutionApplicationContext.java:60)
at org.eclipse.gemini.blueprint.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:325)
at org.eclipse.gemini.blueprint.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
at org.eclipse.gemini.blueprint.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:290)
at org.eclipse.gemini.blueprint.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:137)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.motechproject.scheduler.exception.SchedulerInstantiationException: org.quartz.SchedulerConfigException: Failure occured during job recovery. [See nested exception: org.quartz.JobPersistenceException: Couldn't recover jobs: Table 'motechquartz.QRTZ_TRIGGERS' doesn't exist [See nested exception: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'motechquartz.QRTZ_TRIGGERS' doesn't exist]]
at org.motechproject.scheduler.factory.MotechSchedulerFactoryBean.init(MotechSchedulerFactoryBean.java:52)
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:606)
at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:346)
at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:299)
at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:132)
... 16 more
Caused by: org.quartz.SchedulerConfigException: Failure occured during job recovery. [See nested exception: org.quartz.JobPersistenceException: Couldn't recover jobs: Table 'motechquartz.QRTZ_TRIGGERS' doesn't exist [See nested exception: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'motechquartz.QRTZ_TRIGGERS' doesn't exist]]
at org.quartz.impl.jdbcjobstore.JobStoreSupport.schedulerStarted(JobStoreSupport.java:683)
at org.quartz.core.QuartzScheduler.start(QuartzScheduler.java:526)
at org.quartz.impl.StdScheduler.start(StdScheduler.java:143)
at org.motechproject.scheduler.factory.MotechSchedulerFactoryBean.init(MotechSchedulerFactoryBean.java:49)
... 23 more
Caused by: org.quartz.JobPersistenceException: Couldn't recover jobs: Table 'motechquartz.QRTZ_TRIGGERS' doesn't exist [See nested exception: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'motechquartz.QRTZ_TRIGGERS' doesn't exist]
at org.quartz.impl.jdbcjobstore.JobStoreSupport.recoverJobs(JobStoreSupport.java:889)
at org.quartz.impl.jdbcjobstore.JobStoreSupport$1.execute(JobStoreSupport.java:827)
at org.quartz.impl.jdbcjobstore.JobStoreSupport$46.execute(JobStoreSupport.java:3777)
at org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInNonManagedTXLock(JobStoreSupport.java:3811)
at org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInNonManagedTXLock(JobStoreSupport.java:3773)
at org.quartz.impl.jdbcjobstore.JobStoreSupport.recoverJobs(JobStoreSupport.java:823)
at org.quartz.impl.jdbcjobstore.JobStoreSupport.schedulerStarted(JobStoreSupport.java:681)
... 26 more
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'motechquartz.QRTZ_TRIGGERS' doesn't exist
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:408)
at com.mysql.jdbc.Util.getInstance(Util.java:383)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1062)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4208)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4140)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2597)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2758)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2826)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2082)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2334)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2262)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2246)
at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:105)
at org.quartz.impl.jdbcjobstore.StdJDBCDelegate.updateTriggerStatesFromOtherStates(StdJDBCDelegate.java:259)
at org.quartz.impl.jdbcjobstore.JobStoreSupport.recoverJobs(JobStoreSupport.java:844)
... 32 more


Paweł Gesek

unread,
Jun 23, 2015, 3:28:51 AM6/23/15
to motec...@googlegroups.com
Motech 0.25.1 does not populate the quartz database by itself, 0.26 does. If you are running 0.25.1, you have to manually run one of these sql scripts (quartz version 2.1):

https://code.google.com/p/motech/source/browse/?name=0.25.X#git%2Fmodules%2Fscheduler%2Fsql

Regards,
Paweł

W dniu 2015-06-23 o 01:40, Craig A pisze:
--
You received this message because you are subscribed to the Google Groups "MOTECH Developer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to motech-dev+...@googlegroups.com.
To post to this group, send email to motec...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/motech-dev/71594de1-4f41-46c2-ab8b-864d211c2c67%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Craig A

unread,
Jun 23, 2015, 11:30:35 AM6/23/15
to motec...@googlegroups.com
Thank you Pawel!

Sincerely,
Craig

--
You received this message because you are subscribed to a topic in the Google Groups "MOTECH Developer" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/motech-dev/njF-22BOCKs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to motech-dev+...@googlegroups.com.

To post to this group, send email to motec...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Craig Appl
Lead Technical Program Manager, Mobile Health Innovations
Grameen Foundation
2101 4th Ave | Suite 1550 | Seattle, WA 98121
Skype:craigappl
Connecting the World's Poor to Their Potential
Reply all
Reply to author
Forward
0 new messages