« Return to Thread: Unable to Cluster Quartz with JDBC store in Mule 2.2.1

Re: Unable to Cluster Quartz with JDBC store in Mule 2.2.1

by rstacy@zcorum.com :: Rate this Message:

Reply to Author | View in Thread

Why are all of mules expression evaluators being inserted with the job?  What purpose does this serve?

And now it wants me to Serialize  org.apache.xerces.jaxp.DocumentBuilderImpl.  Why?  It seems like we are just loading the kitchen sink into the job.

Thanks,
-Rob

rstacy@zcorum.com wrote:
Hi All,

I am running Mule 2.2.1 and trying to implement the clustered JDBC store for quartz.

When mule starts up and trys to create my quartz jobs I get the following exception:

ERROR 2009-06-29 17:06:22,554 [WrapperListener_start_runner] org.mule.MuleServer:
********************************************************************************
Message               : Failed to start Quartz receiver
Type                  : org.mule.api.endpoint.EndpointException
Code                  : MULE_ERROR-60042
JavaDoc               : http://www.mulesource.org/docs/site/current2/apidocs/org/mule/api/endpoint/EndpointException.html
********************************************************************************
Exception stack is:
1. Unable to serialize JobDataMap for insertion into database because the value of property 'jobConfig' is not serializable: org.mule.DefaultMuleContext (java.io.NotSerializableException)
  org.quartz.impl.jdbcjobstore.StdJDBCDelegate:3354 (null)
2. Couldn't store job: Unable to serialize JobDataMap for insertion into database because the value of property 'jobConfig' is not serializable: org.mule.DefaultMuleContext (org.quartz.JobPersistenceException)
  org.quartz.impl.jdbcjobstore.JobStoreSupport:1041 (null)
3. Failed to start Quartz receiver (org.mule.api.endpoint.EndpointException)
  org.mule.transport.quartz.QuartzMessageReceiver:150 (http://www.mulesource.org/docs/site/current2/apidocs/org/mule/api/endpoint/EndpointException.html)
********************************************************************************
Root Exception stack trace:
java.io.NotSerializableException: Unable to serialize JobDataMap for insertion into database because the value of property 'jobConfig' is not serializable: org.mule.DefaultMuleContext
        at org.quartz.impl.jdbcjobstore.StdJDBCDelegate.serializeJobData(StdJDBCDelegate.java:3354)
        at org.quartz.impl.jdbcjobstore.StdJDBCDelegate.insertJobDetail(StdJDBCDelegate.java:515)
        at org.quartz.impl.jdbcjobstore.JobStoreSupport.storeJob(JobStoreSupport.java:1038)
        at org.quartz.impl.jdbcjobstore.JobStoreSupport$3.execute(JobStoreSupport.java:983)
        at org.quartz.impl.jdbcjobstore.JobStoreSupport$39.execute(JobStoreSupport.java:3590)
        at org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInNonManagedTXLock(JobStoreSupport.java:3662)
        at org.quartz.impl.jdbcjobstore.JobStoreTX.executeInLock(JobStoreTX.java:93)
        at org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInLock(JobStoreSupport.java:3586)
        at org.quartz.impl.jdbcjobstore.JobStoreSupport.storeJobAndTrigger(JobStoreSupport.java:971)
        at org.quartz.core.QuartzScheduler.scheduleJob(QuartzScheduler.java:703)
        at org.quartz.impl.StdScheduler.scheduleJob(StdScheduler.java:255)
        at org.mule.transport.quartz.QuartzMessageReceiver.doStart(QuartzMessageReceiver.java:137)
        at org.mule.transport.AbstractConnectable.start(AbstractConnectable.java:280)
        at org.mule.service.AbstractService.startListeners(AbstractService.java:644)
        at org.mule.service.AbstractService.start(AbstractService.java:343)
        at org.mule.service.AbstractService.start(AbstractService.java:293)
        at sun.reflect.GeneratedMethodAccessor129.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.mule.lifecycle.DefaultLifecyclePhase.applyLifecycle(DefaultLifecyclePhase.java:273)
        at org.mule.lifecycle.DefaultLifecyclePhase.applyLifecycle(DefaultLifecyclePhase.java:129)
        at org.mule.lifecycle.GenericLifecycleManager.firePhase(GenericLifecycleManager.java:84)
        at org.mule.DefaultMuleContext.start(DefaultMuleContext.java:170)
        at org.mule.MuleServer.run(MuleServer.java:259)
        at org.mule.MuleServer.start(MuleServer.java:244)
        at org.mule.module.boot.MuleServerWrapper.start(MuleServerWrapper.java:49)
        at org.tanukisoftware.wrapper.WrapperManager$12.run(WrapperManager.java:2788)

********************************************************************************

ERROR 2009-06-29 17:06:22,559 [WrapperListener_start_runner] org.mule.MuleServer:

After reading the exception it would lead me to believe that the DefaultMuleContext is the problem since it is not implementing serializable.  I am hoping to disprove this as I don't want to have to modify Mule code to cluster quartz, nor should I have to.  I have a hard time believing that more people have not tried to cluster quartz in Mule.


Here is my quartz connector configuration:

[code]

    <quartz:connector name="zcorumQuartzConnector">
        <quartz:factory-property key="org.quartz.scheduler.instanceName" value="MyClusteredScheduler"/>
        <quartz:factory-property key="org.quartz.scheduler.instanceId" value="AUTO"/>
 
        <quartz:factory-property key="org.quartz.threadPool.class" value="org.quartz.simpl.SimpleThreadPool"/>
        <quartz:factory-property key="org.quartz.threadPool.threadCount" value="15"/>
        <quartz:factory-property key="org.quartz.threadPool.threadPriority" value="5"/>

        <quartz:factory-property key="org.quartz.jobStore.misfireThreshold" value="60000"/>
        <quartz:factory-property key="org.quartz.jobStore.class" value="org.quartz.impl.jdbcjobstore.JobStoreTX"/>
        <quartz:factory-property key="org.quartz.jobStore.driverDelegateClass" value="org.quartz.impl.jdbcjobstore.StdJDBCDelegate"/>
        <quartz:factory-property key="org.quartz.jobStore.useProperties" value="false"/>
        <quartz:factory-property key="org.quartz.jobStore.dataSource" value="myDS"/>
        <quartz:factory-property key="org.quartz.jobStore.tablePrefix" value="QRTZ_"/>
        <quartz:factory-property key="org.quartz.jobStore.isClustered" value="true"/>
        <quartz:factory-property key="org.quartz.jobStore.clusterCheckinInterval" value="20000"/>

        <quartz:factory-property key="org.quartz.dataSource.myDS.driver" value="${db.driver}"/>
        <quartz:factory-property key="org.quartz.dataSource.myDS.URL" value="${jdbc.url}"/>
        <quartz:factory-property key="org.quartz.dataSource.myDS.user" value="${db.username}"/>
        <quartz:factory-property key="org.quartz.dataSource.myDS.password" value="${db.password}"/>
        <quartz:factory-property key="org.quartz.dataSource.myDS.maxConnections" value="5"/>
        <quartz:factory-property key="org.quartz.dataSource.myDS.validationQuery" value="select 0 from dual"/>
    </quartz:connector>

[/code]

Any help would be greatly appreciated.  Thanks,
Rob

 « Return to Thread: Unable to Cluster Quartz with JDBC store in Mule 2.2.1