Connector - Dynamic URL howto?

489 views
Skip to first unread message

webcyberrob

unread,
Jan 12, 2015, 6:56:01 AM1/12/15
to camunda-...@googlegroups.com
Hi Guys,

Id like to use the classless connector concept to make a restful service call (google geocode adress API) where the query parameters of the url are based on process variables. Hence in the connector input config I set the url parameter to be of type script with format groovy any my script to build the url looks like;

def query ="address=" + execution.getVariable('addressLine1') + "  " + execution.getVariable('suburb') + "  " + execution.getVariable('state') + "  " + execution.getVariable('postcode');


query
= java.net.URLEncoder.encode( query);


def url = "http://maps.googleapis.com/maps/api/geocode/xml?" + query;


println
(url);


url
;



I get two problems:
(1) it doesn't work, the URL looks ok, but the response back is empty
(2) If I slightly modify the script and redeploy to a running engine, I get an illegal state exception. If I stop the engine and restart the exception is not thrown...

Anyway - any tips on how to build a parameterised url using the connector capability?

regards

Rob

thorben....@camunda.com

unread,
Jan 13, 2015, 3:52:53 AM1/13/15
to camunda-...@googlegroups.com
Hi Rob,

Your approach looks alright. Could you share a unit test or the process model in which you perform the request the way you described?

Thanks,
Thorben

webcyberrob

unread,
Jan 13, 2015, 5:34:08 AM1/13/15
to camunda-...@googlegroups.com
Thanks Thorben,

I wanted to make sure I was on the right track for usage of the connector components.

I found the root cause of the empty response was the google API seems to be very sensitive to the URL encoding. If you send a query string like ?address%3D... API returns an empty set. Hence I had to modify the URL encoding code such that the ?address=... equals sign is preserved.

However, there still seems to be an obscure engine bug, possibly related to cacheing of compiled groovy script. To reproduce, use groovy script as a connector parameter and deploy the war file. All will run. Now change the script code slightly and rebuild and deploy the new war file to the same running engine. The new war will deploy ok, however a new process instance will throw an illegal state exception. Stop and restart the engine, and all is ok with the new deployment...

regards

Rob

thorben....@camunda.com

unread,
Jan 13, 2015, 11:31:01 AM1/13/15
to camunda-...@googlegroups.com
Hi Rob,

I'll try to reproduce the issue in the next days.

Perhaps a nicer alternative to groovy could be to use a templating engine like Freemarker to build the url, cf [1]

Cheers,
Thorben

[1] http://docs.camunda.org/latest/guides/user-guide/#process-engine-templating

thorben....@camunda.com

unread,
Jan 14, 2015, 3:30:36 AM1/14/15
to camunda-...@googlegroups.com
Hi Rob,

As an addition to the Freemarker suggestion: It appears that you can also do URL encoding conveniently, cf [1].

Regarding the IllegalStateException: Which application server are you running on? On Wildfly, I could not reproduce the problem. On Tomcat, I get a different kind of exception on starting the process after redeployment that I have not figured out yet, see stacktrace below.

Best regards,
Thorben

[1] http://freemarker.org/docs/ref_builtins_string.html#ref_builtin_url

java.lang.NullPointerException
    at org.apache.catalina.loader.WebappClassLoader.findResources(WebappClassLoader.java:1298)
    at java.lang.ClassLoader.getResources(ClassLoader.java:1185)
    at java.lang.ClassLoader.getResources(ClassLoader.java:1181)
    at org.codehaus.groovy.transform.ASTTransformationVisitor.doAddGlobalTransforms(ASTTransformationVisitor.java:198)
    at org.codehaus.groovy.transform.ASTTransformationVisitor.addGlobalTransforms(ASTTransformationVisitor.java:190)
    at org.codehaus.groovy.transform.ASTTransformationVisitor.addPhaseOperations(ASTTransformationVisitor.java:154)
    at org.codehaus.groovy.control.CompilationUnit.<init>(CompilationUnit.java:203)
    at org.codehaus.groovy.control.CompilationUnit.<init>(CompilationUnit.java:120)
    at groovy.lang.GroovyClassLoader.createCompilationUnit(GroovyClassLoader.java:439)
    at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:268)
    at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:259)
    at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:245)
    at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:203)
    at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.getScriptClass(GroovyScriptEngineImpl.java:367)
    at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.compile(GroovyScriptEngineImpl.java:173)
    at org.camunda.bpm.engine.impl.scripting.engine.ScriptingEngines.compile(ScriptingEngines.java:106)
    at org.camunda.bpm.engine.impl.scripting.SourceExecutableScript.compileScript(SourceExecutableScript.java:68)
    at org.camunda.bpm.engine.impl.scripting.SourceExecutableScript.execute(SourceExecutableScript.java:52)
    at org.camunda.bpm.engine.impl.scripting.ResourceExecutableScript.execute(ResourceExecutableScript.java:42)
    at org.camunda.bpm.engine.impl.scripting.env.ScriptingEnvironment.execute(ScriptingEnvironment.java:84)
    at org.camunda.bpm.engine.impl.scripting.ScriptValueProvider.getValue(ScriptValueProvider.java:35)
    at org.camunda.bpm.engine.impl.core.variable.mapping.InputParameter.execute(InputParameter.java:44)
    at org.camunda.bpm.engine.impl.core.variable.mapping.IoParameter.execute(IoParameter.java:47)
    at org.camunda.bpm.engine.impl.core.variable.mapping.IoMapping.executeInputParameters(IoMapping.java:35)
    at org.camunda.connect.plugin.impl.ServiceTaskConnectorActivityBehavior.applyInputParameters(ServiceTaskConnectorActivityBehavior.java:70)
    at org.camunda.connect.plugin.impl.ServiceTaskConnectorActivityBehavior.execute(ServiceTaskConnectorActivityBehavior.java:51)
    at org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityExecute.execute(PvmAtomicOperationActivityExecute.java:42)
    at org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityExecute.execute(PvmAtomicOperationActivityExecute.java:27)
    at org.camunda.bpm.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:129)
    at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:450)
    at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:440)
    at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:420)
    at org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationTransitionNotifyListenerStart.eventNotificationsCompleted(PvmAtomicOperationTransitionNotifyListenerStart.java:63)
    at org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationTransitionNotifyListenerStart.eventNotificationsCompleted(PvmAtomicOperationTransitionNotifyListenerStart.java:26)
    at org.camunda.bpm.engine.impl.core.operation.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:65)
    at org.camunda.bpm.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:129)
    at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:450)
    at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:429)
    at org.camunda.bpm.engine.impl.core.operation.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:58)
    at org.camunda.bpm.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:129)
    at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:450)
    at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:429)
    at org.camunda.bpm.engine.impl.core.operation.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:58)
    at org.camunda.bpm.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:129)
    at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:450)
    at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:440)
    at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:420)
    at org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationTransitionCreateScope.execute(PvmAtomicOperationTransitionCreateScope.java:55)
    at org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationTransitionCreateScope.execute(PvmAtomicOperationTransitionCreateScope.java:24)
    at org.camunda.bpm.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:129)
    at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:450)
    at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:440)
    at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:420)
    at org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationTransitionNotifyListenerTake.execute(PvmAtomicOperationTransitionNotifyListenerTake.java:76)
    at org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationTransitionNotifyListenerTake.execute(PvmAtomicOperationTransitionNotifyListenerTake.java:31)
    at org.camunda.bpm.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:129)
    at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:450)
    at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:429)
    at org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationTransitionNotifyListenerTake.execute(PvmAtomicOperationTransitionNotifyListenerTake.java:61)
    at org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationTransitionNotifyListenerTake.execute(PvmAtomicOperationTransitionNotifyListenerTake.java:31)
    at org.camunda.bpm.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:129)
    at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:450)
    at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:440)
    at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:420)
    at org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationTransitionDestroyScope.execute(PvmAtomicOperationTransitionDestroyScope.java:118)
    at org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationTransitionDestroyScope.execute(PvmAtomicOperationTransitionDestroyScope.java:27)
    at org.camunda.bpm.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:129)
    at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:450)
    at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:440)
    at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:420)
    at org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationTransitionNotifyListenerEnd.eventNotificationsCompleted(PvmAtomicOperationTransitionNotifyListenerEnd.java:36)
    at org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationTransitionNotifyListenerEnd.eventNotificationsCompleted(PvmAtomicOperationTransitionNotifyListenerEnd.java:23)
    at org.camunda.bpm.engine.impl.core.operation.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:65)
    at org.camunda.bpm.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:129)
    at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:450)
    at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:429)
    at org.camunda.bpm.engine.impl.core.operation.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:58)
    at org.camunda.bpm.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:129)
    at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:450)
    at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:429)
    at org.camunda.bpm.engine.impl.core.operation.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:58)
    at org.camunda.bpm.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:129)
    at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:450)
    at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:440)
    at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:420)
    at org.camunda.bpm.engine.impl.pvm.runtime.PvmExecutionImpl.take(PvmExecutionImpl.java:280)
    at org.camunda.bpm.engine.impl.bpmn.behavior.BpmnActivityBehavior.performOutgoingBehavior(BpmnActivityBehavior.java:101)
    at org.camunda.bpm.engine.impl.bpmn.behavior.BpmnActivityBehavior.performDefaultOutgoingBehavior(BpmnActivityBehavior.java:50)
    at org.camunda.bpm.engine.impl.bpmn.behavior.FlowNodeActivityBehavior.leave(FlowNodeActivityBehavior.java:44)
    at org.camunda.bpm.engine.impl.bpmn.behavior.FlowNodeActivityBehavior.execute(FlowNodeActivityBehavior.java:36)
    at org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityExecute.execute(PvmAtomicOperationActivityExecute.java:42)
    at org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityExecute.execute(PvmAtomicOperationActivityExecute.java:27)
    at org.camunda.bpm.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:129)
    at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:450)
    at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:440)
    at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:420)
    at org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationProcessStartInitial.eventNotificationsCompleted(PvmAtomicOperationProcessStartInitial.java:63)
    at org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationProcessStartInitial.eventNotificationsCompleted(PvmAtomicOperationProcessStartInitial.java:30)
    at org.camunda.bpm.engine.impl.core.operation.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:65)
    at org.camunda.bpm.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:129)
    at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:450)
    at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:429)
    at org.camunda.bpm.engine.impl.core.operation.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:58)
    at org.camunda.bpm.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:129)
    at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:450)
    at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:429)
    at org.camunda.bpm.engine.impl.core.operation.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:58)
    at org.camunda.bpm.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:129)
    at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:450)
    at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:440)
    at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:420)
    at org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationProcessStart.eventNotificationsCompleted(PvmAtomicOperationProcessStart.java:59)
    at org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationProcessStart.eventNotificationsCompleted(PvmAtomicOperationProcessStart.java:30)
    at org.camunda.bpm.engine.impl.core.operation.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:65)
    at org.camunda.bpm.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:129)
    at org.camunda.bpm.engine.impl.interceptor.CommandContext$1.call(CommandContext.java:117)
    at org.camunda.bpm.engine.impl.interceptor.CommandContext$1.call(CommandContext.java:115)
    at org.camunda.bpm.engine.impl.context.ProcessApplicationClassloaderInterceptor.call(ProcessApplicationClassloaderInterceptor.java:44)
    at org.camunda.bpm.application.AbstractProcessApplication.execute(AbstractProcessApplication.java:102)
    at org.camunda.bpm.engine.impl.context.Context.executeWithinProcessApplication(Context.java:193)
    at org.camunda.bpm.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:115)
    at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:450)
    at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:440)
    at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.startWithFormProperties(ExecutionEntity.java:391)
    at org.camunda.bpm.engine.impl.cmd.SubmitStartFormCmd.execute(SubmitStartFormCmd.java:75)
    at org.camunda.bpm.engine.impl.cmd.SubmitStartFormCmd.execute(SubmitStartFormCmd.java:36)
    at org.camunda.bpm.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:24)
    at org.camunda.bpm.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:97)
    at org.camunda.bpm.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:32)
    at org.camunda.bpm.engine.impl.FormServiceImpl.submitStartForm(FormServiceImpl.java:74)
    at org.camunda.bpm.engine.rest.sub.repository.impl.ProcessDefinitionResourceImpl.submitForm(ProcessDefinitionResourceImpl.java:133)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:167)
    at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:257)
    at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:222)
    at org.jboss.resteasy.core.ResourceLocator.invokeOnTargetObject(ResourceLocator.java:159)
    at org.jboss.resteasy.core.ResourceLocator.invoke(ResourceLocator.java:107)
    at org.jboss.resteasy.core.ResourceLocator.invokeOnTargetObject(ResourceLocator.java:154)
    at org.jboss.resteasy.core.ResourceLocator.invoke(ResourceLocator.java:92)
    at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:542)
    at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:524)
    at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:126)
    at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208)
    at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55)
    at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50)
    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:52)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.camunda.bpm.engine.rest.filter.CacheControlFilter.doFilter(CacheControlFilter.java:47)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.camunda.bpm.webapp.impl.security.filter.SecurityFilter.doFilterSecure(SecurityFilter.java:67)
    at org.camunda.bpm.webapp.impl.security.filter.SecurityFilter.doFilter(SecurityFilter.java:51)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.camunda.bpm.webapp.impl.security.auth.AuthenticationFilter$1.execute(AuthenticationFilter.java:59)
    at org.camunda.bpm.webapp.impl.security.auth.AuthenticationFilter$1.execute(AuthenticationFilter.java:56)
    at org.camunda.bpm.webapp.impl.security.SecurityActions.runWithAuthentications(SecurityActions.java:38)
    at org.camunda.bpm.webapp.impl.security.auth.AuthenticationFilter.doFilter(AuthenticationFilter.java:56)
    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.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:409)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1044)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:315)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)

thorben....@camunda.com

unread,
Jan 14, 2015, 3:37:32 AM1/14/15
to camunda-...@googlegroups.com
For reference: Here is the project that I built and deployed: https://github.com/ThorbenLindhauer/camunda-script-deployment

thorben....@camunda.com

unread,
Feb 4, 2015, 12:37:33 PM2/4/15
to camunda-...@googlegroups.com
Hi Rob,

I was finally able to look deeper into the problems and found an explanation for the NullPointerException I got. We cache the scripting engines in the process engine configuration, however the Groovy engine is created with a reference to a web application's class loader. The classloader is unusable after the web application is undeployed and the NPE occurs. I created ticket [1].

Perhaps your problem is related to that. In the next days, I'll try to work around that issue and see if I can find another problem in that scenario.

Best regards,
Thorben

[1] https://app.camunda.com/jira/browse/CAM-3432

webcyberrob

unread,
Feb 5, 2015, 6:32:10 AM2/5/15
to camunda-...@googlegroups.com
Hi Thorben,

well done on uncovering this! I haven't had the bandwidth to dig much deeper. Thanks for generating the ticket.

regards

Rob
Reply all
Reply to author
Forward
0 new messages