StreamException / CannotResolveClassException when migrating to BRMS 5.3.1
Issue
- The problem we are having is inside the jbpm work item; Consider that with BRMS 5.3.0 there is no error but only when upgrading to BRMS 5.3.1. Basically it happens when we put inside a resultMapping a string. The xstream library throws a CannotResolveClassException. The strange thing is that the name of the class causing the CannotResolveClassException is the name of the string inserted in the map.
com.aaa.xstream.mapper.CannotResolveClassException: XXXX
at com.aaa.xstream.mapper.DefaultMapper.realClass(DefaultMapper.java:56)
at com.aaa.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
at com.aaa.xstream.mapper.DynamicProxyMapper.realClass(DynamicProxyMapper.java:55)
at com.aaa.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
at com.aaa.xstream.mapper.PackageAliasingMapper.realClass(PackageAliasingMapper.java:88)
at com.aaa.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
...
...
at com.aaa.xstream.XStream.unmarshal(XStream.java:1035)
at com.aaa.xstream.XStream.unmarshal(XStream.java:1019)
at com.aaa.xstream.XStream.fromXML(XStream.java:895)
at com.aaa.xstream.XStream.fromXML(XStream.java:886)
at org.drools.process.core.datatype.impl.type.ObjectDataType.readValue(ObjectDataType.java:77)
at org.jbpm.workflow.instance.node.WorkItemNodeInstance.triggerCompleted(WorkItemNodeInstance.java:223)
at org.jbpm.workflow.instance.node.WorkItemNodeInstance.workItemCompleted(WorkItemNodeInstance.java:309)
This is the client code:
Map<String, Object> resultMapping = new HashMap<String, Object>();
resultMapping.put(KEY, result);
manager.completeWorkItem(workItem.getId(), resultMapping);
- I get a StreamException when completing a task:
com.aaa.xstream.io.StreamException: : only whitespace content allowed before start tag and not h (position: START_DOCUMENT seen h... @1:1)
at com.aaa.xstream.io.xml.XppReader.pullNextEvent(XppReader.java:124) [xstream-1.4.1.jar:]
...
Environment
- JBoss Enterprise BRMS
- 5.3.1
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.