Details
-
Bug Report
-
Resolution: Unresolved
-
L3 - Default
-
None
-
None
-
None
Description
Environment (Required on creation):
- Wildfly/JBoss EAP or Tomcat (affects probably other distros as well)
- Any Camunda Platform version
Description (Required on creation; please attach any relevant screenshots, stacktraces, log files, etc. to the ticket):
On Wildfly/JBoss EAP, a NullPointerException exception is thrown when deploying a process application containing a processes.xml file with a process-archive.resource element that has a value with a leading or trailing space:
[0m[31m16:23:35,822 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-8) MSC000001: Failed to start service jboss.deployment.unit."test.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."test.war".INSTALL: WFLYSRV0153: Failed to process phase INSTALL of deployment "test.war" at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:189) at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1739) at org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1701) at org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1559) at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35) at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990) at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486) at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377) at java.lang.Thread.run(Thread.java:748) Caused by: org.camunda.bpm.engine.ProcessEngineException: ENGINE-09011 Exception while reading org/camunda/bpm/integrationtest/deployment/cfg/invoice-it.bpmn20.xml as input stream: null at org.camunda.bpm.engine.impl.util.EngineUtilLogger.exceptionWhileReadingStream(EngineUtilLogger.java:109) at org.camunda.bpm.engine.impl.util.IoUtil.readInputStream(IoUtil.java:55) at org.camunda.bpm.container.impl.jboss.deployment.processor.ProcessApplicationDeploymentProcessor.getDeploymentResources(ProcessApplicationDeploymentProcessor.java:234) at org.camunda.bpm.container.impl.jboss.deployment.processor.ProcessApplicationDeploymentProcessor.deploy(ProcessApplicationDeploymentProcessor.java:124) at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:182) ... 8 more Caused by: java.lang.NullPointerException at org.camunda.bpm.engine.impl.util.IoUtil.readInputStream(IoUtil.java:48) ... 11 more
Steps to reproduce (Required on creation):
Deploy a process application with the following processes.xml:
<?xml version="1.0" encoding="UTF-8"?> <process-application xmlns="http://www.camunda.org/schema/1.0/ProcessApplication" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.camunda.org/schema/1.0/ProcessApplication http://www.camunda.org/schema/1.0/ProcessApplication "> <process-archive name="pa"> <resource> org/camunda/bpm/integrationtest/deployment/cfg/invoice-it.bpmn20.xml </resource> <properties> <property name="isDeleteUponUndeploy">true</property> <property name="isScanForProcessDefinitions">true</property> </properties> </process-archive> </process-application>
Observed Behavior (Required on creation):
A NullPointerException is thrown and the deployment fails.
Expected behavior (Required on creation):
The process application is deployed successfully.
Root Cause (Required on prioritization):
Leading and trailing spaces in ProcessesXmlParse#parseProcessArchive are not trimmed.
Solution Ideas (Optional):
Trim the resource string.
Hints (optional):
- I created a pull request that fixes the problem and adds a test
- Check if other properties can and should be trimmed as well