11 Replies Latest reply on Jan 17, 2008 10:02 AM by Pete Muir

    SWP and quartz propertie file

    Andreas Franke Apprentice

      Hi

      in a normal console created Seam project the seam.quartz.properties file is located in the resources folder.

      But there is no quartz file in a Seam-Web-Project. Have I to put these file manually or have the quartz configuration changed?


      Thanks

        • 1. Re: SWP and quartz propertie file
          Joshua Jackson Master

          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
            Andreas Franke Apprentice

            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
              Nicklas Karlsson Master

              The AS has it's own quartz.jar, are you using that or including your own?

              • 4. Re: SWP and quartz propertie file
                Nicklas Karlsson Master

                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
                  Andreas Franke Apprentice

                  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
                    Pete Muir Master

                    I just checked and seam-gen has no quartz property file - you must have created it yourself.

                    • 7. Re: SWP and quartz propertie file
                      Andreas Franke Apprentice

                      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
                        Pete Muir Master

                        The same as its always was. Add the properties file.

                        • 9. Re: SWP and quartz propertie file
                          Andreas Franke Apprentice

                          Hi Pete,

                          but can you tell me wy I got this excpetion

                          No 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
                            Andreas Franke Apprentice

                            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.