Running custom tasks on kie server

219 views
Skip to first unread message

Radostina

unread,
Aug 2, 2016, 10:10:40 AM8/2/16
to jBPM Development
Hello all,

we are trying to start a process definition, that has custom service task. There are 2 custom jars added, to the maven repository and to the jbpm workbench. When I start the process from jbpm, it works fine, the service task is completed successfully. Nut when I try to start the process from kie server rest api, I get this error:
2016-08-02 16:40:58,869 ERROR [org.kie.server.remote.rest.jbpm.ProcessResource] (default task-22) Unexpected error during processing null: java.lang.NullPointerException
    at java.util.EnumMap.<init>(EnumMap.java:138) [rt.jar:1.7.0_25]
    at com.sun.xml.bind.v2.model.impl.RuntimeEnumLeafInfoImpl.<init>(RuntimeEnumLeafInfoImpl.java:87) [jaxb-impl-2.2.11.jar:2.2.11]
    at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.createEnumLeafInfo(RuntimeModelBuilder.java:108) [jaxb-impl-2.2.11.jar:2.2.11]
    at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.createEnumLeafInfo(RuntimeModelBuilder.java:84) [jaxb-impl-2.2.11.jar:2.2.11]
    at com.sun.xml.bind.v2.model.impl.ModelBuilder.getClassInfo(ModelBuilder.java:242) [jaxb-impl-2.2.11.jar:2.2.11]
    at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:103) [jaxb-impl-2.2.11.jar:2.2.11]
    at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:84) [jaxb-impl-2.2.11.jar:2.2.11]
    at com.sun.xml.bind.v2.model.impl.ModelBuilder.getClassInfo(ModelBuilder.java:227) [jaxb-impl-2.2.11.jar:2.2.11]
    at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:98) [jaxb-impl-2.2.11.jar:2.2.11]
    at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:84) [jaxb-impl-2.2.11.jar:2.2.11]
    at com.sun.xml.bind.v2.model.impl.ModelBuilder.getTypeInfo(ModelBuilder.java:375) [jaxb-impl-2.2.11.jar:2.2.11]
    at com.sun.xml.bind.v2.model.impl.ModelBuilder.getTypeInfo(ModelBuilder.java:390) [jaxb-impl-2.2.11.jar:2.2.11]
    at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:454) [jaxb-impl-2.2.11.jar:2.2.11]
    at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:292) [jaxb-impl-2.2.11.jar:2.2.11]
    at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:139) [jaxb-impl-2.2.11.jar:2.2.11]
    at com.sun.xml.bind.v2.runtime.JAXBContextImpl$JAXBContextBuilder.build(JAXBContextImpl.java:1138) [jaxb-impl-2.2.11.jar:2.2.11]
    at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:162) [jaxb-impl-2.2.11.jar:2.2.11]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_25]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_25]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_25]
    at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_25]
    at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:211) [jboss-jaxb-api_2.2_spec-1.0.4.Final.jar:1.0.4.Final]
    at javax.xml.bind.ContextFinder.find(ContextFinder.java:392) [jboss-jaxb-api_2.2_spec-1.0.4.Final.jar:1.0.4.Final]
    at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:618) [jboss-jaxb-api_2.2_spec-1.0.4.Final.jar:1.0.4.Final]
    at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:565) [jboss-jaxb-api_2.2_spec-1.0.4.Final.jar:1.0.4.Final]
    at org.kie.server.api.marshalling.jaxb.JaxbMarshaller.<init>(JaxbMarshaller.java:237) [kie-server-api-6.4.0.Final.jar:6.4.0.Final]
    at org.kie.server.api.marshalling.MarshallerFactory.getMarshaller(MarshallerFactory.java:39) [kie-server-api-6.4.0.Final.jar:6.4.0.Final]
    at org.kie.server.services.impl.KieContainerInstanceImpl.getMarshaller(KieContainerInstanceImpl.java:111) [kie-server-services-common-6.4.0.Final.jar:6.4.0.Final]
    at org.kie.server.services.impl.marshal.MarshallerHelper.marshal(MarshallerHelper.java:53) [kie-server-services-common-6.4.0.Final.jar:6.4.0.Final]
    at org.kie.server.services.jbpm.ProcessServiceBase.startProcess(ProcessServiceBase.java:89) [kie-server-services-jbpm-6.4.0.Final.jar:6.4.0.Final]
    at org.kie.server.remote.rest.jbpm.ProcessResource.startProcess(ProcessResource.java:93) [kie-server-rest-jbpm-6.4.0.Final.jar:6.4.0.Final]


Do I need some settings for kie server, so that it can see the custom jars I am using? Thanks in advance.

Maciej Swiderski

unread,
Aug 2, 2016, 11:54:25 AM8/2/16
to Radostina, jBPM Development
looks like kie server marshaller (jaxb one) is choking on some of the classes it has to process. So please double check that your classes are jaxb complient otherwise they cannot be used.

Maciej
--
You received this message because you are subscribed to the Google Groups "jBPM Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jbpm-developme...@googlegroups.com.
To post to this group, send email to jbpm-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jbpm-development/cca00c15-01df-476f-8b29-1449e881c61e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Radostina

unread,
Aug 3, 2016, 2:19:30 AM8/3/16
to jBPM Development, rad...@gmail.com
Thank you, we'll check that.

Radostina

unread,
Aug 3, 2016, 2:27:50 PM8/3/16
to jBPM Development, rad...@gmail.com
Hello Maciej,

I have another question. I have a very simple process with one step (user step). I have included a custom jar and its dependencies (5 jars). When I start a process with kie server api, I get exceptions of this kind:

<b>Stack Trace</b>
        <br/>org.jboss.resteasy.spi.UnhandledException: java.lang.NoClassDefFoundError: org/apache/avalon/framework/logger/Logger
        <br/>org.jboss.resteasy.core.ExceptionHandler.handleApplicationException(ExceptionHandler.java:76)
        <br/>org.jboss.resteasy.core.ExceptionHandler.handleException(ExceptionHandler.java:212)
        <br/>org.jboss.resteasy.core.SynchronousDispatcher.writeException(SynchronousDispatcher.java:149)
        <br/>org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:372)
        <br/>org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:179)
        <br/>org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:220)
        <br/>org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56)
        <br/>org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51)
        <br/>javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
        <br/>io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:86)
        <br/>io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
        <br/>io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
        <br/>org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)

Do you know how to solve this? Should I add missing library, and where?  Thank you.

Maciej Swiderski

unread,
Aug 11, 2016, 1:30:47 AM8/11/16
to Radostina, jBPM Development
this looks like a missing library issue - so double check that you included all your dependencies for the project. Then look at what's already in kie server classpath and if you have any overlaps - either remove that library from project dependency or mark it as provided.

Maciej

--
You received this message because you are subscribed to the Google Groups "jBPM Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jbpm-development+unsubscribe@googlegroups.com.
To post to this group, send email to jbpm-development@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jbpm-development/ea55cf7f-c2a9-4d86-877b-40dcafa271d7%40googlegroups.com.

Radostina

unread,
Aug 15, 2016, 3:19:02 AM8/15/16
to jBPM Development
Ok, thanks.
Reply all
Reply to author
Forward
0 new messages