You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by marcin <to...@gmail.com> on 2012/06/11 20:41:44 UTC

Singleton EJB Scheduled Method

In my app I have a scheduled method implemented in singleton EJB:

@Schedule(minute="*/30",hour="*", persistent=false)
@Lock(LockType.WRITE)
public void doSomeWork() {
      //...
}

While on beta-2 of OpenEJB everything works fine, on
apache-tomee-1.0.0-beta-3-20120514.041257-131-webprofile I'm getting the
following exception:

2012-06-11 19:00:00 org.apache.catalina.loader.WebappClassLoader loadClass
INFO: Illegal access: this web application instance has been stopped
already.  Could not load
org.apache.openejb.core.timer.EjbTimeoutJobBeanInfo.  The eventual following
stack trace is caused by an error thrown for debugging purposes as well as
to attempt to terminate the thread which caused the illegal access, and has
no functional impact.
java.lang.IllegalStateException
	at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1597)
	at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1556)
	at java.beans.Introspector.instantiate(Unknown Source)
	at java.beans.Introspector.findExplicitBeanInfo(Unknown Source)
	at java.beans.Introspector.<init>(Unknown Source)
	at java.beans.Introspector.getBeanInfo(Unknown Source)
	at
org.quartz.simpl.PropertySettingJobFactory.setBeanProps(PropertySettingJobFactory.java:85)
	at
org.quartz.simpl.PropertySettingJobFactory.newJob(PropertySettingJobFactory.java:76)
	at org.quartz.core.JobRunShell.initialize(JobRunShell.java:134)
	at
org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:381)

Am I doing something wrong or this is a bug?

Thanks for any help!

--
View this message in context: http://openejb.979440.n4.nabble.com/Singleton-EJB-Scheduled-Method-tp4655554.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: Singleton EJB Scheduled Method

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

can you give it a try in 10 or 15mn please? (updating the snapshot)

- Romain


2012/6/12 marcin <to...@gmail.com>

> After switching to the snapshot, everytime i redeploy my application under
> Eclipse (i.e. i save some *.java file in Eclipse) I get following
> exception:
>
> org.apache.catalina.LifecycleException: An invalid Lifecycle transition was
> attempted ([before_start]) for component
>
> [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/MyApplication]]
> in state [DESTROYED]
>        at
>
> org.apache.catalina.util.LifecycleBase.invalidTransition(LifecycleBase.java:408)
>        at
> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:144)
>        at
> org.apache.catalina.core.StandardContext.reload(StandardContext.java:3908)
>        at
>
> org.apache.catalina.loader.WebappLoader.backgroundProcess(WebappLoader.java:426)
>        at
>
> org.apache.tomee.catalina.LazyStopLoader.backgroundProcess(LazyStopLoader.java:88)
>        at
>
> org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1350)
>        at
>
> org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1537)
>        at
>
> org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1547)
>        at
>
> org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1547)
>        at
>
> org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1526)
>        at java.lang.Thread.run(Unknown Source)
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/Singleton-EJB-Scheduled-Method-tp4655554p4655557.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

Re: Singleton EJB Scheduled Method

Posted by marcin <to...@gmail.com>.
After switching to the snapshot, everytime i redeploy my application under
Eclipse (i.e. i save some *.java file in Eclipse) I get following exception:

org.apache.catalina.LifecycleException: An invalid Lifecycle transition was
attempted ([before_start]) for component
[StandardEngine[Catalina].StandardHost[localhost].StandardContext[/MyApplication]]
in state [DESTROYED]
	at
org.apache.catalina.util.LifecycleBase.invalidTransition(LifecycleBase.java:408)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:144)
	at
org.apache.catalina.core.StandardContext.reload(StandardContext.java:3908)
	at
org.apache.catalina.loader.WebappLoader.backgroundProcess(WebappLoader.java:426)
	at
org.apache.tomee.catalina.LazyStopLoader.backgroundProcess(LazyStopLoader.java:88)
	at
org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1350)
	at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1537)
	at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1547)
	at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1547)
	at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1526)
	at java.lang.Thread.run(Unknown Source)

--
View this message in context: http://openejb.979440.n4.nabble.com/Singleton-EJB-Scheduled-Method-tp4655554p4655557.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: Singleton EJB Scheduled Method

Posted by marcin <to...@gmail.com>.
The method is properly fired with the newest snapshot, without any exception.

Thanks for your advice. I should have given a try to newest snapshot before
asking on forum - sorry.

--
View this message in context: http://openejb.979440.n4.nabble.com/Singleton-EJB-Scheduled-Method-tp4655554p4655556.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: Singleton EJB Scheduled Method

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

our snapshot is the 1.1.0-SNAPSHOT, can you give it a try?

- Romain


2012/6/11 marcin <to...@gmail.com>

> In my app I have a scheduled method implemented in singleton EJB:
>
> @Schedule(minute="*/30",hour="*", persistent=false)
> @Lock(LockType.WRITE)
> public void doSomeWork() {
>      //...
> }
>
> While on beta-2 of OpenEJB everything works fine, on
> apache-tomee-1.0.0-beta-3-20120514.041257-131-webprofile I'm getting the
> following exception:
>
> 2012-06-11 19:00:00 org.apache.catalina.loader.WebappClassLoader loadClass
> INFO: Illegal access: this web application instance has been stopped
> already.  Could not load
> org.apache.openejb.core.timer.EjbTimeoutJobBeanInfo.  The eventual
> following
> stack trace is caused by an error thrown for debugging purposes as well as
> to attempt to terminate the thread which caused the illegal access, and has
> no functional impact.
> java.lang.IllegalStateException
>        at
>
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1597)
>        at
>
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1556)
>        at java.beans.Introspector.instantiate(Unknown Source)
>        at java.beans.Introspector.findExplicitBeanInfo(Unknown Source)
>        at java.beans.Introspector.<init>(Unknown Source)
>        at java.beans.Introspector.getBeanInfo(Unknown Source)
>        at
>
> org.quartz.simpl.PropertySettingJobFactory.setBeanProps(PropertySettingJobFactory.java:85)
>        at
>
> org.quartz.simpl.PropertySettingJobFactory.newJob(PropertySettingJobFactory.java:76)
>        at org.quartz.core.JobRunShell.initialize(JobRunShell.java:134)
>        at
> org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:381)
>
> Am I doing something wrong or this is a bug?
>
> Thanks for any help!
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/Singleton-EJB-Scheduled-Method-tp4655554.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>