ClassNotFound exception when using 'ResultClass' attribute in Rest Work Item

Solution Verified - Updated -

Issue

When Rest Service task is created, the Result attribute in Output Assignment is set to String by default. When ResultClass is set, then the Result attribute is correctly set to this data type. However, when running process with REST work item configured like this, following exception is observed:

Caused by: java.lang.ClassNotFoundException: com.redhat.demos.hello.CustomModel from [Module "deployment.business-central.war:main" from Service Module Loader]
    at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:213) [jboss-modules.jar:1.3.7.Final-redhat-1]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:459) [jboss-modules.jar:1.3.7.Final-redhat-1]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:408) [jboss-modules.jar:1.3.7.Final-redhat-1]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:389) [jboss-modules.jar:1.3.7.Final-redhat-1]
    at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:134) [jboss-modules.jar:1.3.7.Final-redhat-1]
    at java.lang.Class.forName0(Native Method) [rt.jar:1.7.0_51]
    at java.lang.Class.forName(Class.java:270) [rt.jar:1.7.0_51]
    at org.jbpm.process.workitem.rest.RESTWorkItemHandler.postProcessResult(RESTWorkItemHandler.java:323) [jbpm-workitems-6.3.0.Final-redhat-5.jar:6.3.0.Final-redhat-5]
    ... 82 more

Environment

  • Red Hat JBoss BPM Suite
    • 6.2.0

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content