You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by chakib <ch...@gmail.com> on 2014/04/11 20:00:02 UTC

Wrong version of Quartz loaded when using tomee drop in war with spring application

*Hi all,

I'm stuck with an issue concerning the Tomee drop in war (i've tried 1.5.2
and 1.6.0) :

I have installed the tomee drop in war in tomcat 7.0.27, where there are
some spring based applications already deployed (spring 3.1.0). When the
server i have the above spring exception related to the version of Quartz
loaded needed by spring:*

Inconsistent Quartz 2.0 API: java.lang.NoSuchMethodException:
org.quartz.Scheduler.getTrigger(org.quartz.TriggerKey)]
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1455)
	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:197)
	at
org.springframework.context.support.DefaultLifecycleProcessor.getLifecycleBeans(DefaultLifecycleProcessor.java:274)
	at
org.springframework.context.support.DefaultLifecycleProcessor.startBeans(DefaultLifecycleProcessor.java:125)
	at
org.springframework.context.support.DefaultLifecycleProcessor.onRefresh(DefaultLifecycleProcessor.java:108)
	at
org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:926)
	at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:467)
	at
org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:254)
	at
org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:198)
	at
org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
	at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4779)
	at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5273)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:895)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:871)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
	at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:962)
	at
org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1603)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
	at java.util.concurrent.FutureTask.run(FutureTask.java:166)
	at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:722)
Caused by: org.quartz.SchedulerException: Registration of jobs and triggers
failed: Inconsistent Quartz 2.0 API: java.lang.NoSuchMethodException:
org.quartz.Scheduler.getTrigger(org.quartz.TriggerKey) [See nested
exception: java.lang.IllegalStateException: Inconsistent Quartz 2.0 API:
java.lang.NoSuchMethodException:
org.quartz.Scheduler.getTrigger(org.quartz.TriggerKey)]
	at
org.springframework.scheduling.quartz.SchedulerAccessor.registerJobsAndTriggers(SchedulerAccessor.java:322)
	at
org.springframework.scheduling.quartz.SchedulerFactoryBean.afterPropertiesSet(SchedulerFactoryBean.java:511)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1514)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1452)
	... 28 more


*I have to resolve this exception without making any changes in spring
dependencies nor tommee's ones .. I've tried both putting 
openejb.classloader.forced-load = org.quartz in both system.properties and
as JVM option -Dopenejb.classloader.forced-load=org.quartz but i still have
the issue..

Thanks in advance*



--
View this message in context: http://openejb.979440.n4.nabble.com/Wrong-version-of-Quartz-loaded-when-using-tomee-drop-in-war-with-spring-application-tp4668723.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: Wrong version of Quartz loaded when using tomee drop in war with spring application

Posted by Romain Manni-Bucau <rm...@gmail.com>.
IIRC was not possible with 1.5 but was with 1.6. Then you can try on the
snapshot, release should come in 1-2 months so if this frame works for you
it can be a hurtless solution
Le 13 avr. 2014 23:55, "chakib" <ch...@gmail.com> a écrit :

> Hi
>
> Even with the last spring version 4.0.3 the problem persists.
>
> I resolved the issue by removing the quartz library from the application
> lib
> and making some changes on the jobs definitions as described in the
> stackoverflow post :
> http://stackoverflow.com/questions/8245218/spring-3-quartz-2-error .
>
> I was hoping resolving this just basing on tomee configuration.. Nw i have
> to convince the PM :)
>
> Thanks for your responses
>
> Regards
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/Wrong-version-of-Quartz-loaded-when-using-tomee-drop-in-war-with-spring-application-tp4668723p4668756.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

Re: Wrong version of Quartz loaded when using tomee drop in war with spring application

Posted by chakib <ch...@gmail.com>.
Hi 

Even with the last spring version 4.0.3 the problem persists.

I resolved the issue by removing the quartz library from the application lib
and making some changes on the jobs definitions as described in the
stackoverflow post :
http://stackoverflow.com/questions/8245218/spring-3-quartz-2-error .

I was hoping resolving this just basing on tomee configuration.. Nw i have
to convince the PM :)

Thanks for your responses 

Regards



--
View this message in context: http://openejb.979440.n4.nabble.com/Wrong-version-of-Quartz-loaded-when-using-tomee-drop-in-war-with-spring-application-tp4668723p4668756.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: Wrong version of Quartz loaded when using tomee drop in war with spring application

Posted by Romain Manni-Bucau <rm...@gmail.com>.
well would need to review the list to find the solution to it but a
simple one is to upgrade spring to support quartz 2.
Romain Manni-Bucau
Twitter: @rmannibucau
Blog: http://rmannibucau.wordpress.com/
LinkedIn: http://fr.linkedin.com/in/rmannibucau
Github: https://github.com/rmannibucau



2014-04-12 13:44 GMT+02:00 chakib <ch...@gmail.com>:
> Hi
>
> I've tried with both Tomee1.6.0+Tomcat7.0.47 and tomee1.5.2+Tomcat 7.0.27
> with openejb.classloader.forced-load=org.quartz in system.properties, but
> still have the same issu with both configuations..
>
> When the server starts up i think the "openejb.classloader.forced-load" is
> taken into account :
>
> INFO: Using 'openejb.classloader.forced-load=org.quartz'
>
> I really dont know what i'm still missing..
>
> Thanks
>
>
>
> --
> View this message in context: http://openejb.979440.n4.nabble.com/Wrong-version-of-Quartz-loaded-when-using-tomee-drop-in-war-with-spring-application-tp4668723p4668743.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: Wrong version of Quartz loaded when using tomee drop in war with spring application

Posted by chakib <ch...@gmail.com>.
Hi

I've tried with both Tomee1.6.0+Tomcat7.0.47 and tomee1.5.2+Tomcat 7.0.27
with openejb.classloader.forced-load=org.quartz in system.properties, but
still have the same issu with both configuations..

When the server starts up i think the "openejb.classloader.forced-load" is
taken into account :

INFO: Using 'openejb.classloader.forced-load=org.quartz'

I really dont know what i'm still missing..

Thanks



--
View this message in context: http://openejb.979440.n4.nabble.com/Wrong-version-of-Quartz-loaded-when-using-tomee-drop-in-war-with-spring-application-tp4668723p4668743.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: Wrong version of Quartz loaded when using tomee drop in war with spring application

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi

playing with openejb.classloader.* you should be able to deactivate
either the container or the app quartz (on 1.6.0 at least). We shade
it now to avoid this issue. So should work on trunk without config.

Note too that tomee is linked to a tomcat version so you can just
replace tomee.war by another version without checking tomcat one
Romain Manni-Bucau
Twitter: @rmannibucau
Blog: http://rmannibucau.wordpress.com/
LinkedIn: http://fr.linkedin.com/in/rmannibucau
Github: https://github.com/rmannibucau



2014-04-11 20:00 GMT+02:00 chakib <ch...@gmail.com>:
> *Hi all,
>
> I'm stuck with an issue concerning the Tomee drop in war (i've tried 1.5.2
> and 1.6.0) :
>
> I have installed the tomee drop in war in tomcat 7.0.27, where there are
> some spring based applications already deployed (spring 3.1.0). When the
> server i have the above spring exception related to the version of Quartz
> loaded needed by spring:*
>
> Inconsistent Quartz 2.0 API: java.lang.NoSuchMethodException:
> org.quartz.Scheduler.getTrigger(org.quartz.TriggerKey)]
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1455)
>         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:197)
>         at
> org.springframework.context.support.DefaultLifecycleProcessor.getLifecycleBeans(DefaultLifecycleProcessor.java:274)
>         at
> org.springframework.context.support.DefaultLifecycleProcessor.startBeans(DefaultLifecycleProcessor.java:125)
>         at
> org.springframework.context.support.DefaultLifecycleProcessor.onRefresh(DefaultLifecycleProcessor.java:108)
>         at
> org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:926)
>         at
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:467)
>         at
> org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:254)
>         at
> org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:198)
>         at
> org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
>         at
> org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4779)
>         at
> org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5273)
>         at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
>         at
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:895)
>         at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:871)
>         at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
>         at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:962)
>         at
> org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1603)
>         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
>         at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
>         at java.util.concurrent.FutureTask.run(FutureTask.java:166)
>         at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>         at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>         at java.lang.Thread.run(Thread.java:722)
> Caused by: org.quartz.SchedulerException: Registration of jobs and triggers
> failed: Inconsistent Quartz 2.0 API: java.lang.NoSuchMethodException:
> org.quartz.Scheduler.getTrigger(org.quartz.TriggerKey) [See nested
> exception: java.lang.IllegalStateException: Inconsistent Quartz 2.0 API:
> java.lang.NoSuchMethodException:
> org.quartz.Scheduler.getTrigger(org.quartz.TriggerKey)]
>         at
> org.springframework.scheduling.quartz.SchedulerAccessor.registerJobsAndTriggers(SchedulerAccessor.java:322)
>         at
> org.springframework.scheduling.quartz.SchedulerFactoryBean.afterPropertiesSet(SchedulerFactoryBean.java:511)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1514)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1452)
>         ... 28 more
>
>
> *I have to resolve this exception without making any changes in spring
> dependencies nor tommee's ones .. I've tried both putting
> openejb.classloader.forced-load = org.quartz in both system.properties and
> as JVM option -Dopenejb.classloader.forced-load=org.quartz but i still have
> the issue..
>
> Thanks in advance*
>
>
>
> --
> View this message in context: http://openejb.979440.n4.nabble.com/Wrong-version-of-Quartz-loaded-when-using-tomee-drop-in-war-with-spring-application-tp4668723.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.