ClassCastException with Custom Model and Remote API
Issue
Below exception is experienced when Custom Objects are used for a process. Process is started using RemoteRestRuntimeFactory.
java.lang.RuntimeException: ClassCastException thrown with message 'org.apache.xerces.dom.ElementNSImpl cannot be cast to org.data.MyObject'
at org.kie.services.client.api.command.AbstractRemoteCommandObject.executeRestCommand(AbstractRemoteCommandObject.java:332)
at org.kie.services.client.api.command.AbstractRemoteCommandObject.execute(AbstractRemoteCommandObject.java:110)
at org.drools.core.command.impl.CommandBasedStatefulKnowledgeSession.startProcess(CommandBasedStatefulKnowledgeSession.java:230)
at BPMRestApi.restRemoteApiStartProcessWithCustomModel(BPMRestApi.java:245)
at BPMRestApi.main(BPMRestApi.java:271)
Environment
- Red Hat JBoss BPM Suite
- 6.0.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.