|
View:
New views
7 Messages
—
Rating Filter:
Alert me
|
|
|
Unable to Cluster Quartz with JDBC store in Mule 2.2.1Hi 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 |
|
|
Re: Unable to Cluster Quartz with JDBC store in Mule 2.2.1rstacy@... 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: [...] > > 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. Obviuosly nobody ever tried :-) We're currently reviewing serialization of various classes in Mule so while I'm at it I could take a look. But only if you help a bit: what's the root object that will be persisted? -dirk --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: Unable to Cluster Quartz with JDBC store in Mule 2.2.1Dirk,
Thanks for the help. The following endpoint is what is the job being persisted: <quartz:inbound-endpoint jobName="pollModemServiceJob" cronExpression="${poll.modems.cron.expression}"> <property key="method" value="findAll"/> <quartz:event-generator-job /> </quartz:inbound-endpoint> So far I have had to add Serialization to a number of classes. I am not sure why these classes are being persisted to be honest with you. I have had to Serialize DefaultMuleContext obviously, but I have also had to add Serialization to a number of ExpressionEvaluators such as org.mule.expression.MuleExpressionEvaluator. Why are these being persisted? I am more than happy to provide any help I can to resolve this issue. I can continue adding Serialization to classes, but it concerns me that doing this will prevent me from upgrading to newer versions of Mule moving forward. Thanks, Rob
|
|
|
Re: Unable to Cluster Quartz with JDBC store in Mule 2.2.1rstacy@... wrote:
> Dirk, > > Thanks for the help. The following endpoint is what is the job being > persisted: > > <quartz:inbound-endpoint jobName="pollModemServiceJob" > cronExpression="${poll.modems.cron.expression}"> > <property key="method" value="findAll"/> > <quartz:event-generator-job /> > </quartz:inbound-endpoint> Where exactly does the serialization happen? This is the crucial info to find out and then decide how to proceed from there. > So far I have had to add Serialization to a number of classes. I am not > sure why these classes are being persisted to be honest with you. I have > had to Serialize DefaultMuleContext obviously, but I have also had to add > Serialization to a number of ExpressionEvaluators such as > org.mule.expression.MuleExpressionEvaluator. Why are these being persisted? That's the root question. I would not go down the route adding serialization until the persistence works. I'm pretty sure e.g. that if you persist a MuleContext and it's de-seiralized somewhere else in the cluster all kinds of havoc will happen. -dirk --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: Unable to Cluster Quartz with JDBC store in Mule 2.2.1Dirk,
I believe the Serialization occurs inside the quartz code when it tries to store the job in the database. The job must be serialized to be persisted in the DB. When the QuartzMessageReceiver is started, all of the jobs are persisted in the database. Here is some log and stack trace: INFO 2009-06-30 18:08:49,746 [WrapperListener_start_runner] org.mule.component.DefaultJavaComponent: Starting: org.mule.component.DefaultJavaComponent component for: SedaService{PollModemsInitiatorService} INFO 2009-06-30 18:08:49,755 [WrapperListener_start_runner] org.mule.transport.quartz.QuartzConnector: Registering listener: PollModemsInitiatorService on endpointUri: quartz://pollModemServiceJob INFO 2009-06-30 18:08:49,776 [WrapperListener_start_runner] org.mule.transport.quartz.QuartzMessageReceiver: Connected: quartz://pollModemServiceJob ERROR 2009-06-30 18:08:49,878 [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.expression.MuleExpressionEvaluator (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.expression.MuleExpressionEvaluator (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.expression.MuleExpressionEvaluator 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.GeneratedMethodAccessor151.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:171) 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) ******************************************************************************** Thanks, Rob
|
|
|
Re: Unable to Cluster Quartz with JDBC store in Mule 2.2.1Why 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
|
|
|
Re: Unable to Cluster Quartz with JDBC store in Mule 2.2.1The root of the whole problem is that the MuleContext is included as part of the JobConfig object. Is the MuleContext ever used? I did not see it referenced in any of the execution blocks of code for the jobs. If the mule context is not used, we should remove it from the JobConfig object and that should clear up all of the issues.
|
| Free embeddable forum powered by Nabble | Forum Help |