[ 
https://issues.apache.org/jira/browse/SLING-12745?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17942226#comment-17942226
 ] 

Konrad Windszus commented on SLING-12745:
-----------------------------------------

[~cziegeler] Any idea how to work around that except for leveraging dynamic 
imports with the events bundle?

> Unable to read job from ...: Unable to deserialize property 
> ------------------------------------------------------------
>
>                 Key: SLING-12745
>                 URL: https://issues.apache.org/jira/browse/SLING-12745
>             Project: Sling
>          Issue Type: Improvement
>          Components: Event
>    Affects Versions: Event 4.3.14
>            Reporter: Konrad Windszus
>            Priority: Major
>
> Although in general every serializable complex class can be passed to 
> {{JobManager.addJob}} as property it cannot be properly deserialized.
> Once the job is actually processed the log emits
> {code}
> org.apache.sling.event.impl.jobs.JobManagerImpl Unable to read job from 
> /var/eventing/jobs/assigned/...., exception: java.lang.Exception: Unable to 
> deserialize property 'customType', cause: java.lang.ClassNotFoundException: 
> <FQCN>
> {code}
> The reason is that for deserialization a different classloader is used (the 
> one from the bundle https://github.com/apache/sling-org-apache-sling-event) 
> than during serialization (the one of the custom bundle which scheduled the 
> job).
> This limitation should either be lifted or clearly documented.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to