Details
-
Bug
-
Resolution: Done
-
Major
-
7.15.0.Final
-
None
-
1
-
NEW
-
NEW
-
2018 Week 48-50
Description
When interacting with Kie Server using data objects from kjar dependencies, e.g.
kjar A has data objects
kjar B has rules and/or processes
kjar B has kjar A declared as dependency
when using kjar A's data objects as part of Kie Server calls with XStream as format then following exception is thrown
Caused by: com.thoughtworks.xstream.converters.ConversionException:
---- Debugging information ----
cause-exception : com.thoughtworks.xstream.security.ForbiddenClassException
cause-message : org.jbpm.test.DataObject
class : org.drools.core.runtime.impl.ExecutionResultImpl
required-type : org.drools.core.runtime.impl.ExecutionResultImpl
converter-type : org.drools.core.runtime.help.impl.XStreamXML$BatchExecutionResultConverter
path : /response/result/result/org.jbpm.test.DataObject
line number : 4
class[1] : org.kie.server.api.model.ServiceResponse
converter-type[1] : com.thoughtworks.xstream.converters.reflection.ReflectionConverter
version : 7.15.0.Final
-------------------------------
This is caused as Kie Server auto allows kjars data objects as they are loaded by project class loader that does implement KieTypeResolver but kjar's dependencies are then loaded by URLClassLoader and thus not meeting the condition to implement KieTypeResolver