Problem with deployment of bar-archives
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-03-2011 01:06 PM
Hi all,
currently I am trying to deploy a process to the activiti engine running on tomcat, but something seems to be missing.
My current configuration is the demo-setup running on ubuuntu with JDK 1.6.
In the eclipse-editor I have added a user-library ACTIVITI_LIB to have a reference to the required libs (libs-runtime, libs-test)
The process file:
The java class:
Using the generated JUnit-test, the execption is:
The deployment is succsessful and the process is shown in the activiti-explorer as well.
The (important part) of my deployment-descriptor (ant-script):
- copying the jar (containing the java class) into $path$/activiti-5.2/apps/apache-tomcat-6.0.29/webapps/activiti-rest/WEB-INF/lib (the same folder where also activiti-engine-5.2.jar, … are placed).
- using a copy of the activiti.cfg.xml in "activiti-cfg.jar"
But if I start an instance I get the following exception in the logs:
I also have tried it with a script-task (groovy), which runs without problems using the generated JUnit-test case, but deploying it in the same way like stated above (without creating the jar for the java class) the follwoing exceptions occur:
Do I have to change the configuration of the H2-DB in the activiti.cfg.xml, or am I missing something else?
Help is very appreciated.
Thaks in advance!
currently I am trying to deploy a process to the activiti engine running on tomcat, but something seems to be missing.
My current configuration is the demo-setup running on ubuuntu with JDK 1.6.
In the eclipse-editor I have added a user-library ACTIVITI_LIB to have a reference to the required libs (libs-runtime, libs-test)
The process file:
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:activiti="http://activiti.org/bpmn" targetNamespace="http://activiti/tests/javaCall"> <process id="SimpleJavaCall" name="Simple Java Call"> <startEvent id="startevent" name="Start"></startEvent> <serviceTask id="javaCall" name="My Java Task" activiti:class="test.service.call.SimpleServiceToUpperCase" /> <sequenceFlow id="flow4" name="" sourceRef="startevent" targetRef="javaCall"></sequenceFlow> <sequenceFlow id="flow5" name="" sourceRef="javaCall" targetRef="endevent"></sequenceFlow> <endEvent id="endevent" name="End"></endEvent> </process></definitions>
The java class:
package test.service.call;import org.activiti.engine.delegate.DelegateExecution;import org.activiti.engine.delegate.JavaDelegate;public class SimpleServiceToUpperCase implements JavaDelegate { private static final String VARIABLE_NAME = "input"; public void execute(DelegateExecution execution) { String var = (String) execution.getVariable(VARIABLE_NAME); var = var.toUpperCase(); execution.setVariable(VARIABLE_NAME, var); }}
Using the generated JUnit-test, the execption is:
Error while closing command contextjava.lang.NullPointerException at test.service.call.SimpleServiceToUpperCase.execute(SimpleServiceToUpperCase.java:12) at org.activiti.engine.impl.bpmn.JavaDelegateDelegate.execute(JavaDelegateDelegate.java:48) at org.activiti.engine.impl.bpmn.JavaDelegateDelegate.execute(JavaDelegateDelegate.java:39) at org.activiti.engine.impl.bpmn.ClassDelegate.execute(ClassDelegate.java:96)
The deployment is succsessful and the process is shown in the activiti-explorer as well.
The (important part) of my deployment-descriptor (ant-script):
- copying the jar (containing the java class) into $path$/activiti-5.2/apps/apache-tomcat-6.0.29/webapps/activiti-rest/WEB-INF/lib (the same folder where also activiti-engine-5.2.jar, … are placed).
- using a copy of the activiti.cfg.xml in "activiti-cfg.jar"
<taskdef name="deploy-bar" classname="org.activiti.engine.impl.ant.DeployBarTask"> <classpath> <pathelement path="src/main/config" /> <fileset dir="libs-runtime" /> <fileset dir="libs-test" /> </classpath> </taskdef>
But if I start an instance I get the following exception in the logs:
ERROR [extensions.webscripts.AbstractRuntime] Exception from executeScript - redirecting to status template error: 01030001 Wrapped Exception (with status template): nullorg.springframework.extensions.webscripts.WebScriptException: 01030001 Wrapped Exception (with status template): null at org.springframework.extensions.webscripts.AbstractWebScript.createStatusException(AbstractWebScript.java:742) at org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:167) at org.springframework.extensions.webscripts.PresentationContainer.executeScript(PresentationContainer.java:69) at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:333) at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:189) at org.springframework.extensions.webscripts.servlet.WebScriptServlet.service(WebScriptServlet.java:118) 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:857) 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 test.service.call.SimpleServiceToUpperCase.execute(Unknown Source) at org.activiti.engine.impl.bpmn.JavaDelegateDelegate.execute(JavaDelegateDelegate.java:48) at org.activiti.engine.impl.bpmn.JavaDelegateDelegate.execute(JavaDelegateDelegate.java:39) at org.activiti.engine.impl.bpmn.ClassDelegate.execute(ClassDelegate.java:96) at org.activiti.engine.impl.pvm.runtime.AtomicOperationActivityExecute.execute(AtomicOperationActivityExecute.java:40) at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:62)………….. at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:37) at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33) at org.activiti.engine.impl.RuntimeServiceImpl.startProcessInstanceById(RuntimeServiceImpl.java:69) at org.activiti.rest.api.process.ProcessInstancePost.executeWebScript(ProcessInstancePost.java:49) at org.activiti.rest.util.ActivitiWebScript.executeImpl(ActivitiWebScript.java:68) at org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:64) … 17 more
I also have tried it with a script-task (groovy), which runs without problems using the generated JUnit-test case, but deploying it in the same way like stated above (without creating the jar for the java class) the follwoing exceptions occur:
ERROR [extensions.webscripts.AbstractRuntime] Exception from executeScript - redirecting to status template error: 01030002 Wrapped Exception (with status template): org/activiti/engine/impl/scripting/ExecutionBindingsorg.springframework.extensions.webscripts.WebScriptException: 01030002 Wrapped Exception (with status template): org/activiti/engine/impl/scripting/ExecutionBindings at org.springframework.extensions.webscripts.AbstractWebScript.createStatusException(AbstractWebScript.java:742) at org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:167) at org.springframework.extensions.webscripts.PresentationContainer.executeScript(PresentationContainer.java:69) at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:333) at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:189) at org.springframework.extensions.webscripts.servlet.WebScriptServlet.service(WebScriptServlet.java:118) 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:857) 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.NoClassDefFoundError: org/activiti/engine/impl/scripting/ExecutionBindings
Do I have to change the configuration of the H2-DB in the activiti.cfg.xml, or am I missing something else?
Help is very appreciated.
Thaks in advance!
Labels:
- Labels:
-
Archive
1 REPLY 1

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2011 02:46 AM
your variable "input" doesn't exist
