cancel
Showing results for 
Search instead for 
Did you mean: 

activiti engine crashes when calling WS

activiti_user11
Champ in-the-making
Champ in-the-making
Hi, I haven't been able to deploy and run the cxf-example so I have made my own WS based on a simple example I found, and deploy it to a glassfish server in the 8181 port so it won't interfere with the activiti 8080 port.

I have copied all the needed .jars into activiti-explorer and activiti-rest lib folder in web-inf, and I am able to deploy the .bar I have generated in the activiti designer to invoke my WS. I can see the diagram and the bpmn20.xml in activiti-explorer but when I want to navigate to the process definition to start a new instance the engine crashes and it is not able to recover.

the bpmn20.xml has an id and a name, as I've read that not having one makes the engine to crash also. The error is again at vaadin:

INFO: Server startup in 16021 ms
06-oct-2011 15:50:21 org.activiti.explorer.cache.TrieBasedUserCache loadUsers
INFO: Caching users 0 to 25
06-oct-2011 15:52:25 com.vaadin.Application terminalError
GRAVE: Terminal error:
com.vaadin.event.ListenerMethod$MethodException
Cause: java.lang.NullPointerException
        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)
        at com.vaadin.ui.Button.fireClick(Button.java:539)
        at com.vaadin.ui.Button.changeVariables(Button.java:206)
        at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.handleVariableBurst(AbstractCommunication
Manager.java:1299)
        at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.handleVariables(AbstractCommunication
Manager.java:1219)
        at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.doHandleUidlRequest(AbstractCommunication
Manager.java:735)
        at com.vaadin.terminal.gwt.server.CommunicationManager.handleUidlRequest(CommunicationManager.java:296)
        at com.vaadin.terminal.gwt.server.AbstractApplicationServlet.service(AbstractApplicationServlet.java:501)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
        at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.NullPointerException
        at com.vaadin.data.util.ObjectProperty.<init>(ObjectProperty.java:57)
        at org.activiti.explorer.ui.process.ProcessDefinitionListQuery.createItem(ProcessDefinitionListQuery.java:65)
        at org.activiti.explorer.ui.process.ProcessDefinitionListQuery.loadItems(ProcessDefinitionListQuery.java:49)
        at org.activiti.explorer.data.LazyLoadingContainer.getItem(LazyLoadingContainer.java:101)
        at org.activiti.explorer.data.LazyLoadingContainer.getContainerProperty(LazyLoadingContainer.java:87)
        at com.vaadin.ui.AbstractSelect.getContainerProperty(AbstractSelect.java:745)
        at com.vaadin.ui.Table.refreshRenderedCells(Table.java:1550)
        at com.vaadin.ui.Table.attach(Table.java:2920)
        at com.vaadin.ui.AbstractComponent.setParent(AbstractComponent.java:570)
        at com.vaadin.ui.AbstractComponentContainer.addComponent(AbstractComponentContainer.java:211)
        at com.vaadin.ui.GridLayout.addComponent(GridLayout.java:223)
        at com.vaadin.ui.GridLayout.addComponent(GridLayout.java:287)
        at org.activiti.explorer.ui.AbstractPage.addSelectComponent(AbstractPage.java:111)
        at org.activiti.explorer.ui.AbstractPage.initUi(AbstractPage.java:56)
        at org.activiti.explorer.ui.process.ProcessDefinitionPage.initUi(ProcessDefinitionPage.java:69)
        at org.activiti.explorer.ui.AbstractPage.attach(AbstractPage.java:43)
        at com.vaadin.ui.AbstractComponent.setParent(AbstractComponent.java:570)
        at com.vaadin.ui.AbstractComponentContainer.addComponent(AbstractComponentContainer.java:211)
        at com.vaadin.ui.CssLayout.addComponent(CssLayout.java:93)
        at org.activiti.explorer.ui.mainlayout.MainLayout.setMainContent(MainLayout.java:58)
        at org.activiti.explorer.ui.MainWindow.switchView(MainWindow.java:79)
        at org.activiti.explorer.DefaultViewManager.switchView(DefaultViewManager.java:272)
        at org.activiti.explorer.DefaultViewManager.showProcessDefinitionPage(DefaultViewManager.java:200)
        at org.activiti.explorer.ui.management.deployment.DeploymentDetailPanel$2.buttonClick(DeploymentDetail
Panel.java:156)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:490)
        … 22 more
06-oct-2011 15:52:25 com.vaadin.Application terminalError
GRAVE: Terminal error:
java.lang.NullPointerException
        at com.vaadin.data.util.ObjectProperty.<init>(ObjectProperty.java:57)
        at org.activiti.explorer.ui.process.ProcessDefinitionListQuery.createItem(ProcessDefinitionListQuery.java:65)
        at org.activiti.explorer.ui.process.ProcessDefinitionListQuery.loadItems(ProcessDefinitionListQuery.java:49)
        at org.activiti.explorer.data.LazyLoadingContainer.getItem(LazyLoadingContainer.java:101)
        at org.activiti.explorer.data.LazyLoadingContainer.getContainerProperty(LazyLoadingContainer.java:87)
        at com.vaadin.ui.AbstractSelect.getContainerProperty(AbstractSelect.java:745)
        at com.vaadin.ui.Table.refreshRenderedCells(Table.java:1550)
        at com.vaadin.ui.Table.getVisibleCells(Table.java:2772)
        at com.vaadin.ui.Table.paintContent(Table.java:2349)
        at com.vaadin.ui.AbstractComponent.paint(AbstractComponent.java:755)
        at com.vaadin.ui.GridLayout.paintContent(GridLayout.java:543)
        at com.vaadin.ui.AbstractComponent.paint(AbstractComponent.java:755)
        at com.vaadin.ui.CustomComponent.paintContent(CustomComponent.java:133)
        at com.vaadin.ui.AbstractComponent.paint(AbstractComponent.java:755)
        at com.vaadin.ui.CssLayout.paintContent(CssLayout.java:187)
        at com.vaadin.ui.AbstractComponent.paint(AbstractComponent.java:755)
        at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.writeUidlResponce(AbstractCommunicationManager.java:954)
        at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.paintAfterVariableChanges(AbstractCommunicationManager.java:841)
        at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.doHandleUidlRequest(AbstractCommunicationManager.java:767)
        at com.vaadin.terminal.gwt.server.CommunicationManager.handleUidlRequest(CommunicationManager.java:296)
        at com.vaadin.terminal.gwt.server.AbstractApplicationServlet.service(AbstractApplicationServlet.java:501)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
        at java.lang.Thread.run(Thread.java:662)

any suggestions ?
regards, Vero
17 REPLIES 17

trademak
Star Contributor
Star Contributor
Hi,

The Activiti Explorer crashes on the name attribute of the process definition. Could it be that you have deployed a process without a name attribute?
Maybe you can cleanup the Activiti database and deploy your WS process again?

Best regards,

activiti_user11
Champ in-the-making
Champ in-the-making
Hi, yes I've read about it and forgot to add the name to the process. But now when I invoke the WS the java.lang.NullPointerException is still raised by vaadin, I really dont know where is the problem now …
thank you very much !
regards, ANdrea

trademak
Star Contributor
Star Contributor
I don't see where you map a process variable to the web service request message.
Is your process based on same kind of working example?
Maybe you could use the web service example of chapter 11 of the Activiti in Action book to get started?

Best regards,

activiti_user11
Champ in-the-making
Champ in-the-making
hi, I don't know where to get the chapter 11 of the Activiti book as it will be released by the end of February 2012. Any other tutorial to see how to map the process variables to the request and response messages of the WS ?

My WS is the very simple Echo WS of an example I've found, it receives a string and returns the same string plus the word "result", and it is external to the activiti engine running in a glassfish server in localhost:8181.

thanks a lot !
regards, Vero

trademak
Star Contributor
Star Contributor
Hi,

You can purchase the MEAP version of the book and you can download a lot of chapters including chapter 11 rightaway.
Just click on the link in my signature.

Best regards,

activiti_user11
Champ in-the-making
Champ in-the-making
hi, so purchasing the book is the only way to learn how to get external WS working in activiti ?
regards, Vero

ronald_van_kuij
Champ on-the-rise
Champ on-the-rise
No, you can also look at the examples in the source, look at the source itself, try debugging, look at the real logging instead of what you see in the ui etc…

But buying the book is a real addition to, believe me (and no, I do not have any financial involvement in it, just an honest opinion)

activiti_user11
Champ in-the-making
Champ in-the-making
yeah, I've been looking at the examples and my process is defined in the same way, but both the examples and my process don't work. I also look at the console every time an error appears, which is really often with activiti, but couldn't solve them.  there is really little documentation and examples to follow, and I guess nobody is going to tell me how to make the WS work, unless I buy the book.
best regards,
Vero.

frederikherema1
Star Contributor
Star Contributor
and I guess nobody is going to tell me how to make the WS work, unless I buy the book.

Not really sure this is the way to get help on the forum. Have you tried debugging the code (like ronald said) and seeing where exactly the NullPointer is created (if I look t your screenshot, I suspect somewhere in ItemDefinition.createInstance). That's a good starting point at least…