cancel
Showing results for 
Search instead for 
Did you mean: 

Running activiti-cxf-example

activiti_user11
Champ in-the-making
Champ in-the-making
Hi, I am trying activiti and want to invoke a WS from a serviceTask so I want to run the activiti-cxf-example but I couldn't. I looked for information on how to deploy and run the example, but there seems to be none !

I am using the Activiti designer to generate the .bar with the corresponding option, but I don't understand if the WS are already deployed in the tomcat where activiti runs, or if I have to deploy the webservices. There is no build or option to do so, that's why I am asking. 

When I upload the .bar in the activiti-explorer at first there was a problem with the WSDL importer that I've solved copying several runtime-libs of the example into the activiti-explorer and activiti-rest web-inf/lib, so I was able to upload the .bar but the process is not shown. I also solved the problem with the null name of the process that crashed the engine.

I am attaching a screenshot of the tomcat console. I'll appreciate any help.

best regards, Vero
13 REPLIES 13

trademak
Star Contributor
Star Contributor
Hi,

By default the Activiti CXF module is not installed in the Activiti Explorer and REST web applications.
So make sure you have the activiti-cxf.jar file on the classpath and its dependencies.

Best regards,

activiti_user11
Champ in-the-making
Champ in-the-making
Hi, thank you but I've already copied the activit-cxf.jar to both web-inf/lib of activiti-explorer and activiti-rest, as I mentioned in the post. I've also copied all the .jar starting with cxf-something just in case Smiley Happy

The error is when I am uploading the .bar to the activiti-explorer, as you can see in the image there are three different messages:
- XML-Schema currently not supported as typeLanguage
- XPath currently not supported as expressionLanguage
- com.vaadin.Application terminal error
GRAVE: terminal error
com.vaadin.event.ListenerMethod$MethodException
Cause: java.lang.NoClassDefFoundError: com/sun/tools/xjc/api/ErrorListener
at com.vaadin.event.ListenerMethod.receiveEvent<ListenerMethod.java:510>
continues ….. 

Should I also deploy the web service to the webapps ? if so, how should I do that so as activiti can find it? 

cheers, Vero

trademak
Star Contributor
Star Contributor
Hi,

The first two messages are normal, there's no problem with those.
For the NoClassDefFoundError you can solve this by copying the jaxb-api and jaxb-xjc libraries.

Best regards,

activiti_user11
Champ in-the-making
Champ in-the-making
Hi, thanks but I've copied the jaxb-api and jaxb-xjc libraries to web-in/lib in activiti-explorer and activiti-rest but the error remains the same that is in the image I've attached. I'll appreciatte an step by step procedure to deploy and run the example.
thanks, cheers, Vero

trademak
Star Contributor
Star Contributor
Hi,

The jaxb-xjc library contains the ErrorListener class, so it should not be possible that you still get the same error message.

Best regards,

activiti_user11
Champ in-the-making
Champ in-the-making
Hi, I'm sorry but I've copied the two .jar you've mentioned and I still get the same error. I found another jaxb library which is the jaxb-impl-2.1.7.jar and when I also copied this jar the error gets solved, so I think the other only contains the definition of the classes but not the implementation.  Now another error appears refering to the WSDL of the WS:

GRAVE: Terminal error:
com.vaadin.event.ListenerMethod$MethodException
Cause: java.lang.NoClassDefFoundError: javax/wsdl/WSDLException
at com.vaadin.event.ListenerMethod.receiveEvent<ListenerMethod.java:510>
at com.vaadin.event.EventRouter.fireEvent <EventRouter.java:164>
at com.vaadin.ui.AbstractComponent.fireEvent <AbstractComponent.java:1193>
more ….

The console output is attached in the image. thank you in advance !
cheers, Vero

trademak
Star Contributor
Star Contributor
Make sure all these libraries are there:

+- org.apache.cxf:cxf-rt-frontend-jaxws:jar:2.3.4:compile
[INFO] |  +- xml-resolver:xml-resolver:jar:1.2:compile
[INFO] |  +- org.apache.cxf:cxf-api:jar:2.3.4:compile
[INFO] |  |  +- org.apache.cxf:cxf-common-utilities:jar:2.3.4:compile
[INFO] |  |  |  \- org.codehaus.woodstox:woodstox-core-asl:jar:4.1.1:runtime
[INFO] |  |  |     \- org.codehaus.woodstox:stax2-api:jar:3.1.1:runtime
[INFO] |  |  +- org.apache.ws.commons.schema:XmlSchema:jar:1.4.7:compile
[INFO] |  |  +- org.apache.neethi:neethi:jar:2.0.5:compile
[INFO] |  |  |  \- wsdl4j:wsdl4j:jar:1.6.2:compile
[INFO] |  |  \- org.apache.cxf:cxf-common-schemas:jar:2.3.4:compile
[INFO] |  +- org.apache.cxf:cxf-rt-core:jar:2.3.4:compile
[INFO] |  |  \- org.apache.geronimo.specs:geronimo-javamail_1.4_spec:jar:1.7.1:compile
[INFO] |  +- org.apache.cxf:cxf-rt-bindings-soap:jar:2.3.4:compile
[INFO] |  |  +- org.apache.cxf:cxf-tools-common:jar:2.3.4:compile
[INFO] |  |  \- org.apache.cxf:cxf-rt-databinding-jaxb:jar:2.3.4:compile
[INFO] |  +- org.apache.cxf:cxf-rt-bindings-xml:jar:2.3.4:compile
[INFO] |  +- org.apache.cxf:cxf-rt-frontend-simple:jar:2.3.4:compile
[INFO] |  \- org.apache.cxf:cxf-rt-ws-addr:jar:2.3.4:compile

Best regards,

activiti_user11
Champ in-the-making
Champ in-the-making
Hi, I've changed the libs that come in the libs-runtime version 3.1 for the libs you told me and now the upload works I am able to see the .bar and all the bpmn20.xml deployed but when I go to the Process option the engine crashes with an internal error in a red message and I am not able to recover it. Find attached the screenshots for the activiti-explorer and the console.
thank you very much !
best regards, Vero

frederikherema1
Star Contributor
Star Contributor
The stacktrace clearly states the webservice you're trying to reach isn't on (connection refused)