Quartz events serialization


I have hit this error with the QuartzEventScheduler:

org.axonframework.eventhandling.scheduling.SchedulingException: An error occurred while setting a timer for a saga

Caused by: org.quartz.JobPersistenceException: Couldn’t store job: Unable to serialize JobDataMap for insertion into database because the value of property ‘org.axonframework.domain.EventMessage’ is
not serializable: axonpoc.ExpiredEvt

I would expect it to make use of a Serializer and feed quartz a String or a byte[], rather than relying on quartz to serialize objects.
I think I want to have no more than 1 format for events everywhere.

Did I overlook something? Is this possibly a useful feature, still missing?


Hi Andrea,

yesterday, a colleague came across this same issue. The solution would indeed be to put a serialized event in the JobDataMap, instead of the plain message. Apparently, there is a setting to enable Java serialization (which was on by default in previous versions).
The QuartzScheduler allow you to customer the FireEventJob that is created, so you can extends both classes and change the behavior.

With my colleagues, we have already discussed a roadmap for Axon to migrate to using serialized Events instead, while maintaining compatibility with entries that still contain the serialized event. We didn’t start yet, though.



Hello Allard,
do you have a issue that we can track? Would you like some help?


I have created AXON-340 (http://issues.axonframework.org/youtrack/issue/AXON-340) to track progress. I have also doublechecked where the problem comes from, but apparantly, the issue has always been present. Event need to implement Serializable if you are to use them with the QuartzScheduler.