Quartz is used in our web app to run different jobs. The web app is deployed on weblogic on cluster environment.
Quartz version is 2.1.
In the log, we kept seeing those error messages. But the jobs we monitor seems running. We would like to know what those errors indicated to make sure it won't cause issue since the web app is in production and critical to the department.
Following are those logs happens a lot and concern us:
<Error> <Cluster> <BEA-000126> <All session objects should be serializable to replicate. Check the objects in your session. Failed to replicate non-serializable object.
java.rmi.MarshalException: failed to marshal update(Lweblogic.cluster.replication.ROID;ILjava.io.Serializable;Ljava.lang.Object;); nested exception is:
java.io.NotSerializableException: org.quartz.impl.StdScheduler
at weblogic.rjvm.BasicOutboundRequest.marshalArgs(BasicOutboundRequest.java:92)
at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicRemoteRef.java:221)
at weblogic.cluster.replication.ReplicationManager_1035_WLStub.update(Unknown Source)
at sun.reflect.GeneratedMethodAccessor854.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
Truncated. see log file for complete stacktrace
Caused By: java.io.NotSerializableException: org.quartz.impl.StdScheduler
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1164)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
Other logs by Quartz happens a lot. not sure if those should be aware as well:
ClusterManager: detected 1 failed or restarted instances.
This scheduler instance (prodinst1) is still active but was recovered by another instance in the cluster. This may cause inconsistent behavior.
ClusterManager: Scanning for instance "prdinst2"'s failed in-progress jobs.
Best guess from the error is that someone has put a reference to the scheduler into a web session or the application context, or on a replicated ejb - so weblogic is complaining that it can't replicate (serialize) it.
The scheduler is not placed in jndi. No ejb is used.
What it mean " put a reference to the scheduler into a web session or application context" ? Could you help describe the scenarios and the possible way to fix this?
If you have this, and you are in cluster by the app server, then the session objects is subject to be serialize, and the quartz's scheduler instance is not meant to be use that way.
to be sure I don't think the scheduler instance has to be directly put into the session like that. Any object that has a Scheduler reachable from it will be problematic when put into a replicated http session.