UnsupportedOperationException when invoking jbpm6 process via camel context

Solution Verified - Updated -

Issue

Simple camel project that invokes a jBPM6 process fails when using KieClient API.
The following exception is being displayed:

12:12:28,762 ERROR [com.tcs.telecom.tib.omp.OrderListener] (Camel (camel-1) thread #1 - JmsConsumer[outbox]) Exception caught:: java.lang.UnsupportedOperationException: Unsupported JAXB Class during initialization: 3 counts of IllegalAnnotationExceptions
    at org.kie.services.client.serialization.JaxbSerializationProvider.initializeJaxbContext(JaxbSerializationProvider.java:55) [kie-services-client-6.0.0.Final.jar:6.0.0.Final]
    at org.kie.services.client.serialization.JaxbSerializationProvider.<init>(JaxbSerializationProvider.java:48) [kie-services-client-6.0.0.Final.jar:6.0.0.Final]
    at org.kie.services.client.api.command.RemoteConfiguration.getJaxbSerializationProvider(RemoteConfiguration.java:395) [kie-services-client-6.0.0.Final.jar:6.0.0.Final]
    at org.kie.services.client.api.command.AbstractRemoteCommandObject.executeRestCommand(AbstractRemoteCommandObject.java:296) [kie-services-client-6.0.0.Final.jar:6.0.0.Final]
...
...
...
Caused by: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 3 counts of IllegalAnnotationExceptions
org.kie.api.task.model.User is an interface, and JAXB can't handle interfaces.
    this problem is related to the following location:
        at org.kie.api.task.model.User
        at public org.kie.api.task.model.User org.jbpm.services.task.query.TaskSummaryImpl.getActualOwner()
        at org.jbpm.services.task.query.TaskSummaryImpl
        at private java.util.List org.kie.services.client.serialization.jaxb.impl.task.JaxbTaskSummaryListResponse.taskSummaryList
        at org.kie.services.client.serialization.jaxb.impl.task.JaxbTaskSummaryListResponse
        at private java.util.List org.kie.services.client.serialization.jaxb.impl.JaxbCommandsResponse.responses
        at org.kie.services.client.serialization.jaxb.impl.JaxbCommandsResponse
org.kie.api.task.model.Task is an interface, and JAXB can't handle interfaces.
    this problem is related to the following location:
        at org.kie.api.task.model.Task
        at public org.kie.api.task.model.Task org.jbpm.services.task.commands.AddTaskCommand.getTask()
        at org.jbpm.services.task.commands.AddTaskCommand
        at protected java.util.List org.kie.services.client.serialization.jaxb.impl.JaxbCommandsRequest.commands
        at org.kie.services.client.serialization.jaxb.impl.JaxbCommandsRequest
org.kie.api.task.model.OrganizationalEntity is an interface, and JAXB can't handle interfaces.
    this problem is related to the following location:
        at org.kie.api.task.model.OrganizationalEntity
        at public java.util.List org.jbpm.services.task.commands.NominateTaskCommand.getPotentialOwners()
        at org.jbpm.services.task.commands.NominateTaskCommand
        at protected java.util.List org.kie.services.client.serialization.jaxb.impl.JaxbCommandsRequest.commands
        at org.kie.services.client.serialization.jaxb.impl.JaxbCommandsRequest

However, the RestAPI method to invoke a jBPM6 process works.

Environment

  • Red Hat JBoss Fuse Service Works
    • 6.0.0
  • jBPM
    • 6.0.0.Final

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In