-
1. Re: SWP and quartz propertie file
thejavafreak Jan 15, 2008 2:56 AM (in response to hispeedsurfer)By default if there are no seam.quartz.properties then Seam will use quartz.properties which is located inside quartz.jar. You use seam.quartz.properties if you want to override quartz.properties and you must provide this inside WEB-INF/classes inside you application. This is not provided by default if you generate your apps using seam-gen, so you have to edit build.xml yourself in order seam.quartz.properties to be copied to WEB-INF/classes
-
2. Re: SWP and quartz propertie file
hispeedsurfer Jan 15, 2008 3:05 AM (in response to hispeedsurfer)Ok, I tried to put seam.quartz.properties file to ejbModule folder of the project. After some ClassNotFoundExceptions I putted the missing apache-commons jars to jboss default lib folder.
Then I received the following error:org.quartz.JobPersistenceException: Couldn't store trigger: No ClassLoaders found for: org.jboss.seam.async.AsynchronousInvocation [See nested exception: org.quartz.JobPersistenceException: Couldn't store trigger: No ClassLoaders found for: org.jboss.seam.async.AsynchronousInvocation [See nested exception: java.lang.ClassNotFoundException: No ClassLoaders found for: org.jboss.seam.async.AsynchronousInvocation]] at org.quartz.impl.jdbcjobstore.JobStoreTX.doRecoverMisfires(JobStoreTX.java:1354) at org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler.manage(JobStoreSupport.java:2449) at org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler.run(JobStoreSupport.java:2468) * Nested Exception (Underlying Cause) --------------- org.quartz.JobPersistenceException: Couldn't store trigger: No ClassLoaders found for: org.jboss.seam.async.AsynchronousInvocation [See nested exception: java.lang.ClassNotFoundException: No ClassLoaders found for: org.jboss.seam.async.AsynchronousInvocation] at org.quartz.impl.jdbcjobstore.JobStoreSupport.storeTrigger(JobStoreSupport.java:964) at org.quartz.impl.jdbcjobstore.JobStoreSupport.recoverMisfiredJobs(JobStoreSupport.java:780) at org.quartz.impl.jdbcjobstore.JobStoreTX.doRecoverMisfires(JobStoreTX.java:1352) at org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler.manage(JobStoreSupport.java:2449) at org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler.run(JobStoreSupport.java:2468) * Nested Exception (Underlying Cause) --------------- java.lang.ClassNotFoundException: No ClassLoaders found for: org.jboss.seam.async.AsynchronousInvocation at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:212) at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:521) at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:415) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:242) at java.io.ObjectInputStream.resolveClass(ObjectInputStream.java:585) at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1544) at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1466) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1699) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348) at java.util.HashMap.readObject(HashMap.java:1067) 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 java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:946) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1809) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1908) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1832) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348) at org.quartz.impl.jdbcjobstore.StdJDBCDelegate.getObjectFromBlob(StdJDBCDelegate.java:3873) at org.quartz.impl.jdbcjobstore.StdJDBCDelegate.selectJobDetail(StdJDBCDelegate.java:956) at org.quartz.impl.jdbcjobstore.JobStoreSupport.storeTrigger(JobStoreSupport.java:917) at org.quartz.impl.jdbcjobstore.JobStoreSupport.recoverMisfiredJobs(JobStoreSupport.java:780) at org.quartz.impl.jdbcjobstore.JobStoreTX.doRecoverMisfires(JobStoreTX.java:1352) at org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler.manage(JobStoreSupport.java:2449) at org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler.run(JobStoreSupport.java:2468) 07:59:04,260 ERROR [JobStoreTX] MisfireHandler: Error handling misfires: Couldn't store trigger: No ClassLoaders found for: org.jboss.seam.async.AsynchronousInvocation org.quartz.JobPersistenceException: Couldn't store trigger: No ClassLoaders found for: org.jboss.seam.async.AsynchronousInvocation [See nested exception: org.quartz.JobPersistenceException: Couldn't store trigger: No ClassLoaders found for: org.jboss.seam.async.AsynchronousInvocation [See nested exception: java.lang.ClassNotFoundException: No ClassLoaders found for: org.jboss.seam.async.AsynchronousInvocation]] at org.quartz.impl.jdbcjobstore.JobStoreTX.doRecoverMisfires(JobStoreTX.java:1354) at org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler.manage(JobStoreSupport.java:2449) at org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler.run(JobStoreSupport.java:2468) * Nested Exception (Underlying Cause) --------------- org.quartz.JobPersistenceException: Couldn't store trigger: No ClassLoaders found for: org.jboss.seam.async.AsynchronousInvocation [See nested exception: java.lang.ClassNotFoundException: No ClassLoaders found for: org.jboss.seam.async.AsynchronousInvocation] at org.quartz.impl.jdbcjobstore.JobStoreSupport.storeTrigger(JobStoreSupport.java:964) at org.quartz.impl.jdbcjobstore.JobStoreSupport.recoverMisfiredJobs(JobStoreSupport.java:780) at org.quartz.impl.jdbcjobstore.JobStoreTX.doRecoverMisfires(JobStoreTX.java:1352) at org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler.manage(JobStoreSupport.java:2449) at org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler.run(JobStoreSupport.java:2468) * Nested Exception (Underlying Cause) --------------- java.lang.ClassNotFoundException: No ClassLoaders found for: org.jboss.seam.async.AsynchronousInvocation
I try to persist the quartz scheduled jobs, here the content of seam.quartz.properties:org.quartz.scheduler.instanceName Sched1 org.quartz.scheduler.instanceId 1 org.quartz.scheduler.rmi.export false org.quartz.scheduler.rmi.proxy false org.quartz.threadPool.class org.quartz.simpl.SimpleThreadPool org.quartz.threadPool.threadCount 3 #org.quartz.jobStore.class org.quartz.simpl.RAMJobStore org.quartz.jobStore.misfireThreshold = 5000 org.quartz.jobStore.class = org.quartz.impl.jdbcjobstore.JobStoreTX org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate org.quartz.jobStore.dataSource = myDS org.quartz.jobStore.tablePrefix = QRTZ_ org.quartz.dataSource.myDS.driver = com.mysql.jdbc.Driver org.quartz.dataSource.myDS.URL = jdbc:mysql://localhost:3306/scheduler org.quartz.dataSource.myDS.user = root org.quartz.dataSource.myDS.password = org.quartz.dataSource.myDS.maxConnections 5
The first quartz job is called at startup@Observer("org.jboss.seam.postInitialization") public void observe() { QuartzTriggerHandle handle = processor.scheduleTopTenReport("0 0 3 15 * ?"); }
This runs on JBoss-4.2.2.GA and project is created with JBossTools-2.0.0.GA on Windows. -
3. Re: SWP and quartz propertie file
nickarls Jan 15, 2008 3:17 AM (in response to hispeedsurfer)The AS has it's own quartz.jar, are you using that or including your own?
-
4. Re: SWP and quartz propertie file
nickarls Jan 15, 2008 3:21 AM (in response to hispeedsurfer)Found a thread that wrestles this issue, although I'm not quite sure who won in the end:
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4073459 -
5. Re: SWP and quartz propertie file
hispeedsurfer Jan 15, 2008 3:42 AM (in response to hispeedsurfer)Hi nickarls,
thank you for response.
In a Seam-Web-Project all libraries from server are automatically put to build-path. So I use quartz.jar from server.
The strange is that I already used the same configuration in a console created seam-project. -
6. Re: SWP and quartz propertie file
pmuir Jan 15, 2008 6:05 AM (in response to hispeedsurfer)I just checked and seam-gen has no quartz property file - you must have created it yourself.
-
7. Re: SWP and quartz propertie file
hispeedsurfer Jan 15, 2008 6:57 AM (in response to hispeedsurfer)Ok,
than I have read this in post from jboss-developer-member that when I would like to persist quartz scheduling after server restart, I have to put seam.quartz.properties file to project - this was a few month ago and worked in a Seam console project.
Now in a Seam-Web-Project I get the discribed errors. What is now the approach to persist quartz? -
8. Re: SWP and quartz propertie file
pmuir Jan 15, 2008 8:23 AM (in response to hispeedsurfer)The same as its always was. Add the properties file.
-
9. Re: SWP and quartz propertie file
hispeedsurfer Jan 15, 2008 10:54 AM (in response to hispeedsurfer)Hi Pete,
but can you tell me wy I got this excpetionNo ClassLoaders found for: org.jboss.seam.async.AsynchronousInvocation
Is there something what I can change to get persistent quartz working? -
10. Re: SWP and quartz propertie file
hispeedsurfer Jan 16, 2008 4:05 PM (in response to hispeedsurfer)Hi Pete, Gavin or someone else,
as I can see the seam.quartz.properties file is also used in quartz example.
But what's the reason for the exception in my case? I already used the same file in a fromer seam project without prolems. -
11. Re: SWP and quartz propertie file
pmuir Jan 17, 2008 10:02 AM (in response to hispeedsurfer)I think it is related to this:
http://jira.jboss.com/jira/browse/JBSEAM-2484