Hi
I am deploying the following into Camunda 7.2-Alpha5 via the rest call /deployment/create but get a null pointer exception will calling isBpmnResource.
If looks like resourceName isn't being set for some reason. ( same code in Alpha 9 ). Is there something wrong with my payload or is this a bug ? ( It looks like its trying to validate the resource name ends with bpmn20.xml or bpmn - but as this is a REST call I cant see where this is set - it feels like a hangover from file deploys? )
protected boolean isBpmnResource(String resourceName) {
for (String suffix : BPMN_RESOURCE_SUFFIXES) {
if (resourceName.endsWith(suffix)) {
return true;
}
}
return false;
}
Is there a guide to setup remote debuging for Camunda ?
Thanks
Gareth
Log:
13 Nov 2014 08:07:47,248 - main - DEBUG - org.springframework.http.client.support.HttpAccessor.createRequest(HttpAccessor.java:78) - Created POST request for "
http://localhost:8081/engine-rest/deployment/create"
13 Nov 2014 08:07:47,251 - main - DEBUG - org.springframework.web.client.RestTemplate$AcceptHeaderRequestCallback.doWithRequest(RestTemplate.java:579) - Setting request Accept header to [text/plain, application/json, application/*+json, */*]
13 Nov 2014 08:07:47,251 - main - DEBUG - org.springframework.web.client.RestTemplate$HttpEntityRequestCallback.doWithRequest(RestTemplate.java:653) - Writing [{deployment-name=[UnitTestProcess], enable-duplicate-filtering=[true], deploy-changed-only=[true], *=[<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="
http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:camunda="
http://activiti.org/bpmn" id="federos-definition" targetNamespace="
http://activiti.org/bpmn">
<process id="federos-0A02003677BB227AF1DBD1B533C849CA" isExecutable="true" name="PT1">
<laneSet id="laneSet_4bd7ccdd-98f8-4f90-889b-f9407a808d5b">
<lane id="lane_a93ac62b-4437-45a3-9fc9-dff01766e4b5" name="admin">
<flowNodeRef>GUID-0A02004943714A3EFC0D3E1E49D84F27</flowNodeRef>
<flowNodeRef>GUID-0A02004943714A3E7EA6C5F117D14F7A</flowNodeRef>
<flowNodeRef>GUID-0A02004943714A3E96AEC9D00D534F06</flowNodeRef>
</lane>
</laneSet>
<endEvent id="GUID-0A02004943714A3EFC0D3E1E49D84F27" name="Silent end">
<incoming>GUID-7F0000013D0B754553B2316E7BD14DCD</incoming>
</endEvent>
<task id="GUID-0A02004943714A3E7EA6C5F117D14F7A" name="Demo Abstract task">
<incoming>GUID-0A02004943714A3EFA24B46354624470</incoming>
<outgoing>GUID-7F0000013D0B754553B2316E7BD14DCD</outgoing>
</task>
<startEvent camunda:async="true" id="GUID-0A02004943714A3E96AEC9D00D534F06" name="Manual start">
<outgoing>GUID-0A02004943714A3EFA24B46354624470</outgoing>
</startEvent>
<sequenceFlow id="GUID-0A02004943714A3EFA24B46354624470" sourceRef="GUID-0A02004943714A3E96AEC9D00D534F06" targetRef="GUID-0A02004943714A3E7EA6C5F117D14F7A"/>
<sequenceFlow id="GUID-7F0000013D0B754553B2316E7BD14DCD" sourceRef="GUID-0A02004943714A3E7EA6C5F117D14F7A" targetRef="GUID-0A02004943714A3EFC0D3E1E49D84F27"/>
</process>
<collaboration id="collaboration_2131955d-e2ff-41e9-92cf-9a765cf771a7">
<participant id="participant_93dfc05f-cbc7-4f41-8e9b-8f68c8375662" name="admin" processRef="federos-0A02003677BB227AF1DBD1B533C849CA"/>
</collaboration>
</definitions>]}] as "multipart/form-data" using [org.springframework.http.converter.support.AllEncompassingFormHttpMessageConverter@6d3b4609]
13 Nov 2014 08:07:47,269 - main - WARN - org.springframework.web.client.RestTemplate.handleResponseError(RestTemplate.java:529) - POST request for "
http://localhost:8081/engine-rest/deployment/create" resulted in 500 (Internal Server Error); invoking error handler
13 Nov 2014 08:07:47,270 - main - ERROR - com.tdbfusion.bpm.services.CamundaEngineService.loadProcessDefinitionFromByteArray(CamundaEngineService.java:368) - Error unable to start Process. <html><head><title>Apache Tomcat/7.0.50 - Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 500 - java.lang.NullPointerException</h1><HR size="1" noshade="noshade"><p><b>type</b> Exception report</p><p><b>message</b> <u>java.lang.NullPointerException</u></p><p><b>description</b> <u>The server encountered an internal error that prevented it from fulfilling this request.</u></p><p><b>exception</b> <pre>org.jboss.resteasy.spi.UnhandledException: java.lang.NullPointerException
org.jboss.resteasy.core.SynchronousDispatcher.handleApplicationException(SynchronousDispatcher.java:365)
org.jboss.resteasy.core.SynchronousDispatcher.handleException(SynchronousDispatcher.java:233)
org.jboss.resteasy.core.SynchronousDispatcher.handleInvokerException(SynchronousDispatcher.java:209)
org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:557)
org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:524)
org.jboss.resteasy.core.SynchronousDispatcher.invokePropagateNotFound(SynchronousDispatcher.java:169)
org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:212)
org.jboss.resteasy.plugins.server.servlet.FilterDispatcher.doFilter(FilterDispatcher.java:59)
org.camunda.bpm.engine.rest.filter.CacheControlFilter.doFilter(CacheControlFilter.java:47)
</pre></p><p><b>root cause</b> <pre>java.lang.NullPointerException
org.camunda.bpm.engine.impl.bpmn.deployer.BpmnDeployer.isBpmnResource(BpmnDeployer.java:468)
org.camunda.bpm.engine.impl.bpmn.deployer.BpmnDeployer.deploy(BpmnDeployer.java:90)
org.camunda.bpm.engine.impl.persistence.deploy.DeploymentCache.deploy(DeploymentCache.java:58)
org.camunda.bpm.engine.impl.persistence.entity.DeploymentManager.insertDeployment(DeploymentManager.java:44)
org.camunda.bpm.engine.impl.cmd.DeployCmd.deploy(DeployCmd.java:166)
org.camunda.bpm.engine.impl.cmd.DeployCmd.execute(DeployCmd.java:84)
org.camunda.bpm.engine.impl.cmd.DeployCmd.execute(DeployCmd.java:61)
org.camunda.bpm.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:24)
org.camunda.bpm.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:97)
org.camunda.bpm.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:32)
org.camunda.bpm.engine.impl.RepositoryServiceImpl.deploy(RepositoryServiceImpl.java:82)
org.camunda.bpm.engine.impl.repository.DeploymentBuilderImpl.deploy(DeploymentBuilderImpl.java:125)
org.camunda.bpm.engine.rest.impl.DeploymentRestServiceImpl.createDeployment(DeploymentRestServiceImpl.java:126)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:606)
org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:167)
org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:257)
org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:222)
org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:211)
org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:542)
org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:524)
org.jboss.resteasy.core.SynchronousDispatcher.invokePropagateNotFound(SynchronousDispatcher.java:169)
org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:212)
org.jboss.resteasy.plugins.server.servlet.FilterDispatcher.doFilter(FilterDispatcher.java:59)
org.camunda.bpm.engine.rest.filter.CacheControlFilter.doFilter(CacheControlFilter.java:47)
</pre></p><p><b>note</b> <u>The full stack trace of the root cause is available in the Apache Tomcat/7.0.50 logs.</u></p><HR size="1" noshade="noshade"><h3>Apache Tomcat/7.0.50</h3></body></html>
org.springframework.web.client.HttpServerErrorException: 500 Internal Server Error
--
Confidentiality Notice:
The contents of this e-mail and any attachments are intended for the named
addressee only and may be confidential. Unless you are the named addressee
or authorised to receive the e-mail of the named addressee, you may not
disclose, use or copy the contents of this e-mail. If you have received
this e-mail in error, please contact the sender and delete the e-mail
immediately. TDB Holdings Limited and its associated group companies do not
accept responsibility for this message and any views or opinions contained
within this e-mail are solely those of the author unless expressly stated
otherwise.