-
1. Re: Quartz configuration in Seam 2.0B
michael.yuan Aug 11, 2007 9:42 AM (in response to pierospinelli)Sorry, I am on vacation right now (be back on Aug 19th). It might take take some time as I think about it while I am hiking in the woods :) Please bear with the delay!
cheers
Michael -
2. Re: Quartz configuration in Seam 2.0B
pierospinelli Aug 13, 2007 4:10 AM (in response to pierospinelli)Ok, just a little update:
- I configured the JBoss run script adding the following statement to the JVM parameters:-Dorg.quartz.properties="C:/jboss/jboss-4.2.1.GA/server/default/deploy/scheduler.ear/scheduler.war/WEB-INF/classes/db_quartz.properties"
The db_quartz.properties looks like that:org.quartz.scheduler.instanceName = DefaultQuartzScheduler org.quartz.scheduler.rmi.export = false org.quartz.scheduler.rmi.proxy = false org.quartz.scheduler.wrapJobExecutionInUserTransaction = false org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool org.quartz.threadPool.threadCount = 10 org.quartz.threadPool.threadPriority = 5 org.quartz.threadPool.threadsInheritContextClassLoaderOfInitializingThread = true org.quartz.jobStore.misfireThreshold = 10000 org.quartz.jobStore.class = org.quartz.impl.jdbcjobstore.JobStoreTX org.quartz.impl.jdbcjobstore.PostgreSQLDelegate org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate org.quartz.jobStore.dataSource = quartzDS org.quartz.jobStore.tablePrefix = QRTZ_ org.quartz.dataSource.quartzDS.driver = com.mysql.jdbc.Driver org.quartz.dataSource.quartzDS.URL = jdbc:mysql://localhost:3306/scheduler org.quartz.dataSource.quartzDS.user = myuser org.quartz.dataSource.quartzDS.password = mypswd org.quartz.dataSource.quartzDS.maxConnections = 5
At this point I receved class not found errors I solved by adding the following jars in the shared library dir of JBoss:- commons-pool-1.3.jar - commons-dbcp-1.2.2.jar
I downloaded these files from the apache site (since I did not find them in the JBoss installation) and they do work only if installed at the server level, not in the application.
Now I had errors caused by the missing of tables in the db. I created the tables by using the sql script from the last quartz version I downloaded from the quartz site (since I did not find them in the JBoss installation).
Here I got an error for the PROPERTY field of the TRIGGER table had not default (I think it should be a problem from different versions of Quartz): I added quick&dirty a default and, at the end, I received an error caused by the impossibility to find a classloader for the Quartz classes (I report this error below).
At this point I try to add the following statement to the db_quartz.properties:org.quartz.scheduler.useClassLoaderOfInitializer = true
but it did not work.
I even try to copy the file quartz-all-1.6.0.jar under the server shared lib directory, but I got no results.
Here I am at the end. Can anyone help me or sugest some docs to read in order to get full use of Quartz with SEAM/JBoss?
Since all the integration with Quartz (for both JBoss & SEAM) seams to rely on the In Memory configuration of Quartz, can anyone suggest me an alternative way to use it (maybe saving jobs parameters in my own Hybernate classes and restoring them at the server start, or something like that...)
The following is the error I'm receving when I start JBoss:09:59:38,562 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/quartz-ra.rar 09:59:38,578 INFO [QuartzResourceAdapter] start quartz!!! 09:59:38,687 INFO [SimpleThreadPool] Job execution threads will use class loader of thread: main 09:59:38,734 INFO [QuartzScheduler] Quartz Scheduler v.1.6.0 created. 09:59:38,734 INFO [JobStoreTX] Using thread monitor-based data access locking (synchronization). 09:59:40,187 INFO [JobStoreTX] Removed 0 Volatile Trigger(s). 09:59:40,187 INFO [JobStoreTX] Removed 0 Volatile Job(s). 09:59:40,203 INFO [JobStoreTX] JobStoreTX initialized. 09:59:40,203 INFO [StdSchedulerFactory] Quartz scheduler 'DefaultQuartzScheduler' initialized from specified file: 'C:/jboss/jboss-4.2.1.GA/server/default/deploy/scheduler.ear/scheduler.war/WEB-INF/classes/db_quartz.properties' 09:59:40,203 INFO [StdSchedulerFactory] Quartz scheduler version: 1.6.0 09:59:40,203 INFO [JobStoreTX] Freed 0 triggers from 'acquired' / 'blocked' state. 09:59:40,203 INFO [JobStoreTX] Handling 1 trigger(s) that missed their scheduled fire-time. 09:59:40,265 WARN [ServiceController] Problem starting service jboss.jca:service=RARDeployment,name='quartz-ra.rar' javax.resource.spi.ResourceAdapterInternalException: org.quartz.SchedulerConfigException: Failure occured during job recovery. [See nested exception: org.quartz.JobPersistenceException: Couldn't store trigger: No ClassLoaders found for: org.jboss.seam.async.QuartzDispatcher$QuartzJob [See nested exception: java.lang.ClassNotFoundException: No ClassLoaders found for: org.jboss.seam.async.QuartzDispatcher$QuartzJob]] at org.jboss.resource.adapter.quartz.inflow.QuartzResourceAdapter.start(QuartzResourceAdapter.java:62) at org.jboss.resource.deployment.RARDeployment.startService(RARDeployment.java:109) at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289) at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245) at org.jboss.system.ServiceDynamicMBeanSupport.invoke(ServiceDynamicMBeanSupport.java:124) at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659) at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978) at $Proxy0.start(Unknown Source) at org.jboss.system.ServiceController.start(ServiceController.java:417) at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155) at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94) at org.jboss.mx.server.Invocation.invoke(Invocation.java:86) at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659) at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210) at $Proxy39.start(Unknown Source) at org.jboss.deployment.SimpleSubDeployerSupport.startService(SimpleSubDeployerSupport.java:356) at org.jboss.deployment.SimpleSubDeployerSupport.start(SimpleSubDeployerSupport.java:127) at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782) at sun.reflect.GeneratedMethodAccessor19.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155) at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94) at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133) at org.jboss.mx.server.Invocation.invoke(Invocation.java:88) at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142) at org.jboss.mx.server.Invocation.invoke(Invocation.java:88) at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659) at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210) at $Proxy9.deploy(Unknown Source) at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421) at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634) at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263) at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:336) at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289) at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245) at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155) at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94) at org.jboss.mx.server.Invocation.invoke(Invocation.java:86) at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659) at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978) at $Proxy0.start(Unknown Source) at org.jboss.system.ServiceController.start(ServiceController.java:417) at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155) at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94) at org.jboss.mx.server.Invocation.invoke(Invocation.java:86) at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659) at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210) at $Proxy4.start(Unknown Source) at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302) at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766) 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.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155) at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94) at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133) at org.jboss.mx.server.Invocation.invoke(Invocation.java:88) at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142) at org.jboss.mx.server.Invocation.invoke(Invocation.java:88) at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659) at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210) at $Proxy5.deploy(Unknown Source) at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482) at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362) at org.jboss.Main.boot(Main.java:200) at org.jboss.Main$1.run(Main.java:508) at java.lang.Thread.run(Thread.java:619) Caused by: org.quartz.SchedulerConfigException: Failure occured during job recovery. [See nested exception: org.quartz.JobPersistenceException: Couldn't store trigger: No ClassLoaders found for: org.jboss.seam.async.QuartzDispatcher$QuartzJob [See nested exception: java.lang.ClassNotFoundException: No ClassLoaders found for: org.jboss.seam.async.QuartzDispatcher$QuartzJob]] at org.quartz.impl.jdbcjobstore.JobStoreSupport.schedulerStarted(JobStoreSupport.java:575) at org.quartz.core.QuartzScheduler.start(QuartzScheduler.java:449) at org.quartz.impl.StdScheduler.start(StdScheduler.java:146) at org.jboss.resource.adapter.quartz.inflow.QuartzResourceAdapter.start(QuartzResourceAdapter.java:58) ... 88 more Caused by: org.quartz.JobPersistenceException: Couldn't store trigger: No ClassLoaders found for: org.jboss.seam.async.QuartzDispatcher$QuartzJob [See nested exception: java.lang.ClassNotFoundException: No ClassLoaders found for: org.jboss.seam.async.QuartzDispatcher$QuartzJob] at org.quartz.impl.jdbcjobstore.JobStoreSupport.storeTrigger(JobStoreSupport.java:1182) at org.quartz.impl.jdbcjobstore.JobStoreSupport.doUpdateOfMisfiredTrigger(JobStoreSupport.java:950) at org.quartz.impl.jdbcjobstore.JobStoreSupport.recoverMisfiredJobs(JobStoreSupport.java:898) at org.quartz.impl.jdbcjobstore.JobStoreSupport.recoverJobs(JobStoreSupport.java:780) at org.quartz.impl.jdbcjobstore.JobStoreSupport$2.execute(JobStoreSupport.java:752) 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.recoverJobs(JobStoreSupport.java:748) at org.quartz.impl.jdbcjobstore.JobStoreSupport.schedulerStarted(JobStoreSupport.java:573) ... 91 more Caused by: java.lang.ClassNotFoundException: No ClassLoaders found for: org.jboss.seam.async.QuartzDispatcher$QuartzJob at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:212) at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:514) at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:408) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at org.quartz.simpl.InitThreadContextClassLoadHelper.loadClass(InitThreadContextClassLoadHelper.java:74) at org.quartz.simpl.CascadingClassLoadHelper.loadClass(CascadingClassLoadHelper.java:118) at org.quartz.impl.jdbcjobstore.StdJDBCDelegate.selectJobDetail(StdJDBCDelegate.java:897) at org.quartz.impl.jdbcjobstore.JobStoreSupport.storeTrigger(JobStoreSupport.java:1138) ... 100 more
-
3. Re: Quartz configuration in Seam 2.0B
pierospinelli Aug 13, 2007 4:31 AM (in response to pierospinelli)Just to be sure I create again the tables for quartz using the sql script of the ver. 1.5.2, but I got no-change.
-
4. Re: Quartz configuration in Seam 2.0B
pdepaepe Aug 17, 2007 5:31 AM (in response to pierospinelli)Adding import org.jboss.seam.async.QuartzDispatcher; where the Asynchronous method is set will fix you classloader error.
Next step is:11:27:15,026 ERROR [JobStoreTX] Error retrieving job, setting trigger state to ERROR. org.quartz.JobPersistenceException: Couldn't retrieve job because a required class was not found: 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.retrieveJob(JobStoreSupport.java:1031) at org.quartz.impl.jdbcjobstore.JobStoreSupport.triggerFired(JobStoreSupport.java:1818) at org.quartz.impl.jdbcjobstore.JobStoreTX.triggerFired(JobStoreTX.java:1286) at org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:308) * 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:514) at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:408) 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.retrieveJob(JobStoreSupport.java:1021) at org.quartz.impl.jdbcjobstore.JobStoreSupport.triggerFired(JobStoreSupport.java:1818) at org.quartz.impl.jdbcjobstore.JobStoreTX.triggerFired(JobStoreTX.java:1286) at org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:308) 11:27:15,100 ERROR [ErrorLogger] An error occured while firing trigger 'DEFAULT.10cb4d60:114731fd10a:-7ffe' org.quartz.JobPersistenceException: Couldn't retrieve job because a required class was not found: 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.retrieveJob(JobStoreSupport.java:1031) at org.quartz.impl.jdbcjobstore.JobStoreSupport.triggerFired(JobStoreSupport.java:1818) at org.quartz.impl.jdbcjobstore.JobStoreTX.triggerFired(JobStoreTX.java:1286) at org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:308) * 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:514) at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:408) 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.retrieveJob(JobStoreSupport.java:1021) at org.quartz.impl.jdbcjobstore.JobStoreSupport.triggerFired(JobStoreSupport.java:1818) at org.quartz.impl.jdbcjobstore.JobStoreTX.triggerFired(JobStoreTX.java:1286) at org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:308)
-
5. Re: Quartz configuration in Seam 2.0B
michael.yuan Aug 20, 2007 2:13 PM (in response to pierospinelli)I think the issue here is that JBoss AS itself also uses Quartz for some underlying services (e.g., the EJB container). So, when you use the JVM property to point to a different quartz property file, the JBoss's built-in services got confused and refused to start.
What I will do is to search for a seam.quartz.properties file in the application local classpath in QuartzDispatcher. If it is found, the Quartz instance in Seam will use it. I will update this thread when this is done. -
6. Re: Quartz configuration in Seam 2.0B
pierospinelli Aug 20, 2007 3:18 PM (in response to pierospinelli)Thanks for the answers.
Currently I am using Quartz "In Memory" recreating all the Jobs at the server restart reading the configuration from some application's tables: of course my custom tables, accessed by JPA, are very similar to those used by Quartz itself.
When it will be possibile in SEAM to use Quartz with DB persistence, does it already exist a library of JPA objects for the Quartz tables? -
7. Re: Quartz configuration in Seam 2.0B
michael.yuan Aug 20, 2007 5:31 PM (in response to pierospinelli)Hmm, I am not sure why you need JPA objects for quartz persistence ... Can't you just run the Quartz SQL script against your DB, and then select the JDBC jobstore in the property file?
Of course, that requires me to implement the support for quartz property files in the Seam integration. But I do not see why we need JPA objects for Quartz. Can you explain? Thanks. -
8. Re: Quartz configuration in Seam 2.0B
pierospinelli Aug 21, 2007 1:56 AM (in response to pierospinelli)I'm making a control set program for an intranet scheduler.
The program allows to create a task definition (i.e. a name, a group, a Java class, a description, parameter definition with possibly default, required flag, ...), one or more Jobs for each definition (i.e. with different cron scheduling and different parameters).
It allows to control status (active/paused) of each job and of the whole scheduler, to see the log of each job and, if a job is running, to see its output in near real-time). More it allows to run other Job "one-shot" based on different values of terminating jobs.
I am currently using SEAM and JPA/Hibernate for the model. I'm using Quartz as the schedule engine with the in-memory configuration, so on application startup I have to read my model (using JPA) and recreate the active Jobs in Quartz.
I had a look to the table definitions of Quartz and I saw the they look very much similar to the tables generated for the persistent objects of my applications; so I wonder if it is not a waste of time/resources (if I use Quartz with DB configuration) using my custom tables when I could use directly the Quartz's ones. Just I'd like to continue using them by a persistent model (as I currently do) and not directly with JDBC.
This is the reason for I asked if Quartz already exposes a persistent model for its tables. -
9. Re: Quartz configuration in Seam 2.0B
michael.yuan Aug 21, 2007 2:55 PM (in response to pierospinelli)Pierospinelli,
Your task sounds like a little beyond the scope for our Seam / Quartz integration. We aim to provide Quartz as a backend for the @Asynchronous methods -- without the user having to invoke Quartz-specific APIs.
In your case, you do want to manage Quartz explicitly in your application.
However, if you think a JPA library for Quartz objects will be valuable, please raise a feature request in JIRA and perhaps provide us the JPA classes you already have. :) Thanks.
cheers
Michael -
10. Re: Quartz configuration in Seam 2.0B
fhh Aug 21, 2007 3:02 PM (in response to pierospinelli)I would like to see something too. Building a frontend for quartz - or at least supllying some components to enable me to do so myself - would be immensly useful.
Regards
Felix -
11. Re: Quartz configuration in Seam 2.0B
pierospinelli Aug 22, 2007 3:48 AM (in response to pierospinelli)It sounds right.
Thanks Michael. -
12. Re: Quartz configuration in Seam 2.0B
pierospinelli Aug 27, 2007 4:18 PM (in response to pierospinelli)I created a raw sample in Jira:
http://jira.jboss.org/jira/browse/JBSEAM-1869
I am not sure about how it is "SEAM oriented" (i.e. I use some custom EJB instead that the SEAM framework) but I hope it icould be a starting point to discuss about a scheduler interface in SEAM. -
13. Re: Quartz configuration in Seam 2.0B
modoc Nov 3, 2007 12:03 AM (in response to pierospinelli)I am also having trouble with this error:
java.lang.ClassNotFoundException: No ClassLoaders found for: org.jboss.seam.async.AsynchronousInvoca
tion
On a pretty basic Quartz usage.
I'm not clear from the rest of the thread: is there a fix for this? Or is persisting quartz jobs not supported within Seam? Would I have to go back to EJB3 timers to get persistence?
Thanks! -
14. Re: Quartz configuration in Seam 2.0B
juntao Nov 4, 2007 9:11 PM (in response to pierospinelli)modoc,
Persistence Quartz job store can be defined in seam.quartz.properties file in your classpath.
Please let me know if this does not work.
cheers
Michael