cancel
Showing results for 
Search instead for 
Did you mean: 

Where can I find diagnostics when Activiti Explorer reports 'Deployment Failed'

simontilbrook
Champ in-the-making
Champ in-the-making
I am using Activititi Explorer to deploy BPMN process definitions but frequently when the deployment fails the only error message displayed in the browser GUI is "Warning" and "Deployment failed - error parsing XML".

The only errors I can find in the Tomcat logs are ones such as :

May 18, 2014 12:14:54 PM com.vaadin.Application terminalError
SEVERE: Terminal error:
com.vaadin.event.ListenerMethod$MethodException: Invocation of method uploadFinished in org.activiti.explorer.ui.custom.UploadComponent failed.
   at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:530)
   at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:164)
   at com.vaadin.ui.AbstractComponent.fireEvent(AbstractComponent.java:1219)
   at com.vaadin.ui.Upload.fireUploadInterrupted(Upload.java:731)
   at com.vaadin.ui.Upload$1.streamingFailed(Upload.java:1037)
   at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.streamToReceiver(AbstractCommunicationManager.java:619)
   at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.doHandleSimpleMultipartFileUpload(AbstractCommunicationManager.java:476)
   at com.vaadin.terminal.gwt.server.CommunicationManager.handleFileUpload(CommunicationManager.java:259)
   at com.vaadin.terminal.gwt.server.AbstractApplicationServlet.service(AbstractApplicationServlet.java:495)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
   at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
   at org.activiti.explorer.filter.ExplorerFilter.doFilter(ExplorerFilter.java:44)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
   at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
   at org.bonitasoft.console.security.SessionFixationValve.invoke(SessionFixationValve.java:77)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
   at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041)
   at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603)
   at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
   at org.activiti.explorer.ui.management.deployment.DeploymentUploadReceiver.showUploadedDeployment(DeploymentUploadReceiver.java:114)
   at org.activiti.explorer.ui.management.deployment.DeploymentUploadReceiver.uploadFinished(DeploymentUploadReceiver.java:73)
   at org.activiti.explorer.ui.custom.UploadComponent.uploadFinished(UploadComponent.java:197)
   at sun.reflect.GeneratedMethodAccessor1511.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:510)
   … 31 more

Is there anywhere I can find more clues as to what caused the failure or which part of the XML is being processed when the error occurs.
By trial and error, it seems that the addition of a dataObject is causing the problem:

<dataObject id="dObj1" name="StringTest" itemSubjectRef="xsd:string"/>

But this has just been copy/pasted from an example in the Activiti User Guide: http://www.activiti.org/userguide/#dataobjects

Do I maybe need to add an explicit definition for the xsd namespace?
5 REPLIES 5

simontilbrook
Champ in-the-making
Champ in-the-making
In fact it seems it was the namespace that was the issue - changing that to a defined value solved the problem. But my original question stands - is there somewhere I can find details of the XML error discovered during process deployment - or some way of enabling a verbose/tracing mode such that I have some clue where the error lies?

jbarrez
Star Contributor
Star Contributor
In the Tomcat logs, there should be the root cause of the error, some low level xml parsing error. Isn't that there?

harikakosaraju
Champ in-the-making
Champ in-the-making
Hello, I am facing similar issue, I got the same error in my logs when trying to deploy a process definition. However, I tried after changing the targetNamespace on the process definition. Still the same issue.

@simontilbrook what exactly did you change ?

I'm afarid I'm not exactly sure what change I made at the time - but the namespaces we currently use with Activiti 5.17 are:

     Element definitions = new Element("definitions", "http://www.omg.org/spec/BPMN/20100524/MODEL");
     definitions.addNamespaceDeclaration(Namespace.getNamespace("xsi", "http://www.w3.org/2001/XMLSchema-instance"));
     definitions.addNamespaceDeclaration(Namespace.getNamespace("xsd", "http://www.w3.org/2001/XMLSchema"));
     definitions.addNamespaceDeclaration(Namespace.getNamespace("activiti", "http://activiti.org/bpmn"));
     definitions.addNamespaceDeclaration(Namespace.getNamespace("bpmndi", "http://www.omg.org/spec/BPMN/20100524/DI"));
     definitions.addNamespaceDeclaration(Namespace.getNamespace("omgdc", "http://www.omg.org/spec/DD/20100524/DC"));
     definitions.addNamespaceDeclaration(Namespace.getNamespace("omgdi", "http://www.omg.org/spec/DD/20100524/DI"));
     definitions.setAttribute("typeLanguage", "http://www.w3.org/2001/XMLSchema");
     definitions.setAttribute("expressionLanguage", "http://www.w3.org/1999/XPath");
     definitions.setAttribute("targetNamespace", "http://www.activiti.org/test");

i.e.

<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlnsSmiley Surprisedmgdc="http://www.omg.org/spec/DD/20100524/DC" xmlnsSmiley Surprisedmgdi="http://www.omg.org/spec/DD/20100524/DI" xmlnsSmiley Tonguecms="http://thomsonreuters.com/pcms" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/test">


Hope that helps

daisuke-yoshimo
Star Collaborator
Star Collaborator
I improved to output the root cause of the error parsing XML.
https://github.com/Activiti/Activiti/pull/907