1 Reply Latest reply on Jun 22, 2010 12:58 PM by Sanjit kumar

    Quartz clustering problem with JDBC-JobStores

    Sanjit kumar Newbie

      Hi

       

      I am using jboss application server which has quartz as service. I have deployed Quartz as service and all quartz related library are present in server/xxx/lib folder. When I am using JDBC-JobStores then Trigger gives error while retrieving the job

       

      Following is the error

      Error retrieving job, setting trigger state to ERROR.
      org.quartz.

      JobPersistenceException: Couldn't retrieve job because a required class was not found:com.myjob

       

      from BaseClassLoader@1f9cc39{VFSClassLoaderPolicy@cedf4e{name=vfsfile:/opt/jboss-5.1.0.GA/server/sandbox/deploy/quartz-service.xml domain=ClassLoaderDomain@1f38fc6{name=DefaultDomain parentPolicy=BEFORE parent=org.jboss.bootstrap.NoAnnotationURLClassLoader@540408} roots=[MemoryContextHandler@27698004[path= context=vfsmemory://5c4o224-wek1rk-ga4y4yh5-1-ga4y6sal-1g real=vfsmemory://5c4o224-wek1rk-ga4y4yh5-1-ga4y6sal-1g]]  delegates=null exported=[] <IMPORT-ALL>NON_EMPTY}} [See nested exception: java.lang.ClassNotFoundException:
        com.myjob from
      BaseClassLoader@1f9cc39{VFSClassLoaderPolicy@cedf4e{name=vfsfile:/opt/jboss-5.1.0.GA/server/sandbox/deploy/quartz-service.xml domain=ClassLoaderDomain@1f38fc6{name=DefaultDomain parentPolicy=BEFORE parent=org.jboss.bootstrap.NoAnnotationURLClassLoader@540408} roots=[MemoryContextHandler@27698004[path= context=vfsmemory://5c4o224-wek1rk-ga4y4yh5-1-ga4y6sal-1g real=vfsmemory://5c4o224-wek1rk-ga4y4yh5-1-ga4y6sal-1g]]  delegates=null exported=[] <IMPORT-ALL>NON_EMPTY}}]
               at org.quartz.impl.jdbcjobstore.JobStoreSupport.retrieveJob(JobStoreSupport.java:1392)
              at org.quartz.impl.jdbcjobstore.JobStoreSupport.triggerFired(JobStoreSupport.java:2879)
              at org.quartz.impl.jdbcjobstore.JobStoreSupport$38.execute(JobStoreSupport.java:2847)
               at org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInNonManagedTXLock(JobStoreSupport.java:3747)
              at org.quartz.impl.jdbcjobstore.JobStoreSupport.triggerFired(JobStoreSupport.java:2841)
              at org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:342)

      Does any body help me on that how do i resolve this issue. I think it is the problem with classloader. do I miss some configuration related to quartz or jboss.

       

        • 1. Re: Quartz clustering problem with JDBC-JobStores
          Sanjit kumar Newbie

          I solved this problem by using custom class loader. Following are the definition of custom classloading in war folder

           

          <?xml version="1.0" encoding="UTF-8"?>
          <classloading xmlns="urn:jboss:classloading:1.0"
                        name="mv-web.war"
                        domain="DefaultDomain"
                   top-level-classloader="true"
                        export-all="NON_EMPTY"
                        import-all="true">
          </classloading>

           

          Now quartz is getting the job class and working fine.

           

           

          Now I have another problem with this.

           

          Since I am using jboss clustering, lcds clustering. LCDS clustering is not working after applying custom classloader.

           

          2010-06-22 22:26:17,428 ERROR [org.jgroups.blocks.ConnectionTable] (ConnectionTable.Connection.Sender local_addr=192.168.2.121:7800 [192.168.2.121:44089 - 192.168.2.121:7600],default-cluster,192.168.2.121:7800) failed sending data to 192.168.2.121:7600: java.net.SocketException: Socket closed
          2010-06-22 22:26:46,799 INFO  [org.jboss.cache.RPCManagerImpl] (Incoming-6,192.168.2.121:7600) Received new cluster view: [192.168.2.121:7600|1] [192.168.2.121:7600, 192.168.2.122:7600]
          2010-06-22 22:26:46,855 ERROR [org.jgroups.blocks.ConnectionTable] (ConnectionTable.Connection.Sender local_addr=192.168.2.121:7800 [192.168.2.121:48480 - 192.168.2.121:7600],default-cluster,192.168.2.121:7800) failed sending data to 192.168.2.121:7600: java.net.SocketException: Socket closed
          2010-06-22 22:26:59,451 ERROR [org.jgroups.blocks.ConnectionTable] (ConnectionTable.Connection.Sender local_addr=192.168.2.121:7800 [192.168.2.121:37518 - 192.168.2.122:7600],default-cluster,192.168.2.121:7800) failed sending data to 192.168.2.122:7600: java.net.SocketException: Socket closed

           

           

          It seams both cluster trying to send data to each other.

          When I change the custom classloading it works fine

           

          can any body let me know where i am wrong.