-
Bug Report
-
Resolution: Unresolved
-
L3 - Default
-
None
-
7.17.0
-
None
Environment (Required on creation):
Camunda 7.17.0, all distros
Description (Required on creation; please attach any relevant screenshots, stacktraces, log files, etc. to the ticket):
Calling `getFormService().getStartFormKey(processDefinitionId)` for a process definition with multiple start events leads to (on JDK 17):
Caused by: java.lang.NullPointerException: Cannot invoke "org.camunda.bpm.engine.impl.form.FormDefinition.getFormKey()" because "formDefinition" is null at org.camunda.bpm.engine.impl.cmd.GetFormKeyCmd.execute(GetFormKeyCmd.java:84) at org.camunda.bpm.engine.impl.cmd.GetFormKeyCmd.execute(GetFormKeyCmd.java:40) at org.camunda.bpm.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:28) at org.camunda.bpm.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:110) at org.camunda.bpm.engine.impl.interceptor.ProcessApplicationContextInterceptor.execute(ProcessApplicationContextInterceptor.java:70) at org.camunda.bpm.engine.impl.interceptor.CommandCounterInterceptor.execute(CommandCounterInterceptor.java:35) at org.camunda.bpm.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33) at org.camunda.bpm.engine.impl.FormServiceImpl.getStartFormKey(FormServiceImpl.java:99) ... user code
Steps to reproduce (Required on creation):
- Deploy a process definition with multiple start events
- Call getFormService().getStartFormKey(processDefinitionId) for that process definition
Observed Behavior (Required on creation):
NPE as described above
Expected behavior (Required on creation):
A meaningful NullValueException as thrown in GetStartFormCmd for example in the same setting
Root Cause (Required on prioritization):
- In GetFormKeyCmd lines 83 and 84, we expect there always to be a FormDefinition, which is not the case in 7.17.0 given the preconditions above.
FormDefinition formDefinition = processDefinition.getStartFormDefinition(); formKeyExpression = formDefinition.getFormKey();
Solution Ideas (Optional):
- Throw a NullValueException stating the absence of a form definition for the start event
Hints (optional):
- The "get form key" behavior changed with regards to 7.16, where you would receive "null" instead of an NPE
- Other form data related methods/commands throw NullValueExceptions in such setups
This is the controller panel for Smart Panels app
[CAM-14533] NullPointerException calling getStartFormKey for multi-start event processes
Assignee | New: Tobias Metzke-Bernstein [ tobias.metzke ] |
Link | New: This issue is related to CAMTEAM-233 [ CAMTEAM-233 ] |
Summary | Original: NullPointerException calling getStartFormKey | New: NullPointerException calling getStartFormKey for multi-start event processes |
Description |
Original:
h3. Environment (Required on creation):
JDK 17, Camunda 7.17.0 h3. Description (Required on creation; please attach any relevant screenshots, stacktraces, log files, etc. to the ticket): I updated Camunda from 7.16 to 7.17 and some of my tests started failing. They all concern definitions which *don't* have a "normal" start-event but only one or more Signal Start Events. In my code after deploying the definition I do `getFormService().getStartFormKey(processDefinitionId)` which leads to: {noformat} Caused by: java.lang.NullPointerException: Cannot invoke "org.camunda.bpm.engine.impl.form.FormDefinition.getFormKey()" because "formDefinition" is null at org.camunda.bpm.engine.impl.cmd.GetFormKeyCmd.execute(GetFormKeyCmd.java:84) at org.camunda.bpm.engine.impl.cmd.GetFormKeyCmd.execute(GetFormKeyCmd.java:40) at org.camunda.bpm.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:28) at org.camunda.bpm.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:110) at org.camunda.bpm.engine.impl.interceptor.ProcessApplicationContextInterceptor.execute(ProcessApplicationContextInterceptor.java:70) at org.camunda.bpm.engine.impl.interceptor.CommandCounterInterceptor.execute(CommandCounterInterceptor.java:35) at org.camunda.bpm.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33) at org.camunda.bpm.engine.impl.FormServiceImpl.getStartFormKey(FormServiceImpl.java:99) ... user code{noformat} h3. Steps to reproduce (Required on creation): I don't think I'm doing something very special. Reproducing that should be simple enough. If you can't do that in your own tests I'll try to create a new project that does it. h3. Observed Behavior (Required on creation): NPE h3. Expected behavior (Required on creation): No NPE as in 7.16. h3. Root Cause (Required on prioritization): h3. Solution Ideas (Optional): h3. Hints (optional): |
New:
h3. Environment (Required on creation):
Camunda 7.17.0, all distros h3. Description (Required on creation; please attach any relevant screenshots, stacktraces, log files, etc. to the ticket): Calling `getFormService().getStartFormKey(processDefinitionId)` for a process definition with multiple start events leads to (on JDK 17): {noformat} Caused by: java.lang.NullPointerException: Cannot invoke "org.camunda.bpm.engine.impl.form.FormDefinition.getFormKey()" because "formDefinition" is null at org.camunda.bpm.engine.impl.cmd.GetFormKeyCmd.execute(GetFormKeyCmd.java:84) at org.camunda.bpm.engine.impl.cmd.GetFormKeyCmd.execute(GetFormKeyCmd.java:40) at org.camunda.bpm.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:28) at org.camunda.bpm.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:110) at org.camunda.bpm.engine.impl.interceptor.ProcessApplicationContextInterceptor.execute(ProcessApplicationContextInterceptor.java:70) at org.camunda.bpm.engine.impl.interceptor.CommandCounterInterceptor.execute(CommandCounterInterceptor.java:35) at org.camunda.bpm.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33) at org.camunda.bpm.engine.impl.FormServiceImpl.getStartFormKey(FormServiceImpl.java:99) ... user code{noformat} h3. Steps to reproduce (Required on creation): # Deploy a process definition with multiple start events # Call {{getFormService().getStartFormKey(processDefinitionId)}} for that process definition h3. Observed Behavior (Required on creation): NPE as described above h3. Expected behavior (Required on creation): A meaningful {{NullValueException}} as thrown in {{GetStartFormCmd}} for example in the same setting h3. Root Cause (Required on prioritization): * In [GetFormKeyCmd lines 83 and 84|https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/cmd/GetFormKeyCmd.java#L83-L84], we expect there always to be a FormDefinition, which is not the case in 7.17.0 given the preconditions above. {code:java} FormDefinition formDefinition = processDefinition.getStartFormDefinition(); formKeyExpression = formDefinition.getFormKey(); {code} h3. Solution Ideas (Optional): # Throw a {{NullValueException}} stating the absence of a form definition for the start event h3. Hints (optional): |
Status | Original: Open [ 1 ] | New: Ready [ 10005 ] |
Component/s | New: engine [ 11656 ] |
Description |
Original:
h3. Environment (Required on creation):
Camunda 7.17.0, all distros h3. Description (Required on creation; please attach any relevant screenshots, stacktraces, log files, etc. to the ticket): Calling `getFormService().getStartFormKey(processDefinitionId)` for a process definition with multiple start events leads to (on JDK 17): {noformat} Caused by: java.lang.NullPointerException: Cannot invoke "org.camunda.bpm.engine.impl.form.FormDefinition.getFormKey()" because "formDefinition" is null at org.camunda.bpm.engine.impl.cmd.GetFormKeyCmd.execute(GetFormKeyCmd.java:84) at org.camunda.bpm.engine.impl.cmd.GetFormKeyCmd.execute(GetFormKeyCmd.java:40) at org.camunda.bpm.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:28) at org.camunda.bpm.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:110) at org.camunda.bpm.engine.impl.interceptor.ProcessApplicationContextInterceptor.execute(ProcessApplicationContextInterceptor.java:70) at org.camunda.bpm.engine.impl.interceptor.CommandCounterInterceptor.execute(CommandCounterInterceptor.java:35) at org.camunda.bpm.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33) at org.camunda.bpm.engine.impl.FormServiceImpl.getStartFormKey(FormServiceImpl.java:99) ... user code{noformat} h3. Steps to reproduce (Required on creation): # Deploy a process definition with multiple start events # Call {{getFormService().getStartFormKey(processDefinitionId)}} for that process definition h3. Observed Behavior (Required on creation): NPE as described above h3. Expected behavior (Required on creation): A meaningful {{NullValueException}} as thrown in {{GetStartFormCmd}} for example in the same setting h3. Root Cause (Required on prioritization): * In [GetFormKeyCmd lines 83 and 84|https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/cmd/GetFormKeyCmd.java#L83-L84], we expect there always to be a FormDefinition, which is not the case in 7.17.0 given the preconditions above. {code:java} FormDefinition formDefinition = processDefinition.getStartFormDefinition(); formKeyExpression = formDefinition.getFormKey(); {code} h3. Solution Ideas (Optional): # Throw a {{NullValueException}} stating the absence of a form definition for the start event h3. Hints (optional): |
New:
h3. Environment (Required on creation):
Camunda 7.17.0, all distros h3. Description (Required on creation; please attach any relevant screenshots, stacktraces, log files, etc. to the ticket): Calling `getFormService().getStartFormKey(processDefinitionId)` for a process definition with multiple start events leads to (on JDK 17): {noformat} Caused by: java.lang.NullPointerException: Cannot invoke "org.camunda.bpm.engine.impl.form.FormDefinition.getFormKey()" because "formDefinition" is null at org.camunda.bpm.engine.impl.cmd.GetFormKeyCmd.execute(GetFormKeyCmd.java:84) at org.camunda.bpm.engine.impl.cmd.GetFormKeyCmd.execute(GetFormKeyCmd.java:40) at org.camunda.bpm.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:28) at org.camunda.bpm.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:110) at org.camunda.bpm.engine.impl.interceptor.ProcessApplicationContextInterceptor.execute(ProcessApplicationContextInterceptor.java:70) at org.camunda.bpm.engine.impl.interceptor.CommandCounterInterceptor.execute(CommandCounterInterceptor.java:35) at org.camunda.bpm.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33) at org.camunda.bpm.engine.impl.FormServiceImpl.getStartFormKey(FormServiceImpl.java:99) ... user code{noformat} h3. Steps to reproduce (Required on creation): # Deploy a process definition with multiple start events # Call {{getFormService().getStartFormKey(processDefinitionId)}} for that process definition h3. Observed Behavior (Required on creation): NPE as described above h3. Expected behavior (Required on creation): A meaningful {{NullValueException}} as thrown in {{GetStartFormCmd}} for example in the same setting h3. Root Cause (Required on prioritization): * In [GetFormKeyCmd lines 83 and 84|https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/cmd/GetFormKeyCmd.java#L83-L84], we expect there always to be a FormDefinition, which is not the case in 7.17.0 given the preconditions above. {code:java} FormDefinition formDefinition = processDefinition.getStartFormDefinition(); formKeyExpression = formDefinition.getFormKey(); {code} h3. Solution Ideas (Optional): # Throw a {{NullValueException}} stating the absence of a form definition for the start event h3. Hints (optional): * Getting a form key behavior changed with regards to 7.16, where you would receive "null" instead of an NPE |
Description |
Original:
h3. Environment (Required on creation):
Camunda 7.17.0, all distros h3. Description (Required on creation; please attach any relevant screenshots, stacktraces, log files, etc. to the ticket): Calling `getFormService().getStartFormKey(processDefinitionId)` for a process definition with multiple start events leads to (on JDK 17): {noformat} Caused by: java.lang.NullPointerException: Cannot invoke "org.camunda.bpm.engine.impl.form.FormDefinition.getFormKey()" because "formDefinition" is null at org.camunda.bpm.engine.impl.cmd.GetFormKeyCmd.execute(GetFormKeyCmd.java:84) at org.camunda.bpm.engine.impl.cmd.GetFormKeyCmd.execute(GetFormKeyCmd.java:40) at org.camunda.bpm.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:28) at org.camunda.bpm.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:110) at org.camunda.bpm.engine.impl.interceptor.ProcessApplicationContextInterceptor.execute(ProcessApplicationContextInterceptor.java:70) at org.camunda.bpm.engine.impl.interceptor.CommandCounterInterceptor.execute(CommandCounterInterceptor.java:35) at org.camunda.bpm.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33) at org.camunda.bpm.engine.impl.FormServiceImpl.getStartFormKey(FormServiceImpl.java:99) ... user code{noformat} h3. Steps to reproduce (Required on creation): # Deploy a process definition with multiple start events # Call {{getFormService().getStartFormKey(processDefinitionId)}} for that process definition h3. Observed Behavior (Required on creation): NPE as described above h3. Expected behavior (Required on creation): A meaningful {{NullValueException}} as thrown in {{GetStartFormCmd}} for example in the same setting h3. Root Cause (Required on prioritization): * In [GetFormKeyCmd lines 83 and 84|https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/cmd/GetFormKeyCmd.java#L83-L84], we expect there always to be a FormDefinition, which is not the case in 7.17.0 given the preconditions above. {code:java} FormDefinition formDefinition = processDefinition.getStartFormDefinition(); formKeyExpression = formDefinition.getFormKey(); {code} h3. Solution Ideas (Optional): # Throw a {{NullValueException}} stating the absence of a form definition for the start event h3. Hints (optional): * Getting a form key behavior changed with regards to 7.16, where you would receive "null" instead of an NPE |
New:
h3. Environment (Required on creation):
Camunda 7.17.0, all distros h3. Description (Required on creation; please attach any relevant screenshots, stacktraces, log files, etc. to the ticket): Calling `getFormService().getStartFormKey(processDefinitionId)` for a process definition with multiple start events leads to (on JDK 17): {noformat} Caused by: java.lang.NullPointerException: Cannot invoke "org.camunda.bpm.engine.impl.form.FormDefinition.getFormKey()" because "formDefinition" is null at org.camunda.bpm.engine.impl.cmd.GetFormKeyCmd.execute(GetFormKeyCmd.java:84) at org.camunda.bpm.engine.impl.cmd.GetFormKeyCmd.execute(GetFormKeyCmd.java:40) at org.camunda.bpm.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:28) at org.camunda.bpm.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:110) at org.camunda.bpm.engine.impl.interceptor.ProcessApplicationContextInterceptor.execute(ProcessApplicationContextInterceptor.java:70) at org.camunda.bpm.engine.impl.interceptor.CommandCounterInterceptor.execute(CommandCounterInterceptor.java:35) at org.camunda.bpm.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33) at org.camunda.bpm.engine.impl.FormServiceImpl.getStartFormKey(FormServiceImpl.java:99) ... user code{noformat} h3. Steps to reproduce (Required on creation): # Deploy a process definition with multiple start events # Call {{getFormService().getStartFormKey(processDefinitionId)}} for that process definition h3. Observed Behavior (Required on creation): NPE as described above h3. Expected behavior (Required on creation): A meaningful {{NullValueException}} as thrown in {{GetStartFormCmd}} for example in the same setting h3. Root Cause (Required on prioritization): * In [GetFormKeyCmd lines 83 and 84|https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/cmd/GetFormKeyCmd.java#L83-L84], we expect there always to be a FormDefinition, which is not the case in 7.17.0 given the preconditions above. {code:java} FormDefinition formDefinition = processDefinition.getStartFormDefinition(); formKeyExpression = formDefinition.getFormKey(); {code} h3. Solution Ideas (Optional): # Throw a {{NullValueException}} stating the absence of a form definition for the start event h3. Hints (optional): * The "get form key" behavior changed with regards to 7.16, where you would receive "null" instead of an NPE |
Description |
Original:
h3. Environment (Required on creation):
Camunda 7.17.0, all distros h3. Description (Required on creation; please attach any relevant screenshots, stacktraces, log files, etc. to the ticket): Calling `getFormService().getStartFormKey(processDefinitionId)` for a process definition with multiple start events leads to (on JDK 17): {noformat} Caused by: java.lang.NullPointerException: Cannot invoke "org.camunda.bpm.engine.impl.form.FormDefinition.getFormKey()" because "formDefinition" is null at org.camunda.bpm.engine.impl.cmd.GetFormKeyCmd.execute(GetFormKeyCmd.java:84) at org.camunda.bpm.engine.impl.cmd.GetFormKeyCmd.execute(GetFormKeyCmd.java:40) at org.camunda.bpm.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:28) at org.camunda.bpm.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:110) at org.camunda.bpm.engine.impl.interceptor.ProcessApplicationContextInterceptor.execute(ProcessApplicationContextInterceptor.java:70) at org.camunda.bpm.engine.impl.interceptor.CommandCounterInterceptor.execute(CommandCounterInterceptor.java:35) at org.camunda.bpm.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33) at org.camunda.bpm.engine.impl.FormServiceImpl.getStartFormKey(FormServiceImpl.java:99) ... user code{noformat} h3. Steps to reproduce (Required on creation): # Deploy a process definition with multiple start events # Call {{getFormService().getStartFormKey(processDefinitionId)}} for that process definition h3. Observed Behavior (Required on creation): NPE as described above h3. Expected behavior (Required on creation): A meaningful {{NullValueException}} as thrown in {{GetStartFormCmd}} for example in the same setting h3. Root Cause (Required on prioritization): * In [GetFormKeyCmd lines 83 and 84|https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/cmd/GetFormKeyCmd.java#L83-L84], we expect there always to be a FormDefinition, which is not the case in 7.17.0 given the preconditions above. {code:java} FormDefinition formDefinition = processDefinition.getStartFormDefinition(); formKeyExpression = formDefinition.getFormKey(); {code} h3. Solution Ideas (Optional): # Throw a {{NullValueException}} stating the absence of a form definition for the start event h3. Hints (optional): * The "get form key" behavior changed with regards to 7.16, where you would receive "null" instead of an NPE |
New:
h3. Environment (Required on creation):
Camunda 7.17.0, all distros h3. Description (Required on creation; please attach any relevant screenshots, stacktraces, log files, etc. to the ticket): Calling `getFormService().getStartFormKey(processDefinitionId)` for a process definition with multiple start events leads to (on JDK 17): {noformat} Caused by: java.lang.NullPointerException: Cannot invoke "org.camunda.bpm.engine.impl.form.FormDefinition.getFormKey()" because "formDefinition" is null at org.camunda.bpm.engine.impl.cmd.GetFormKeyCmd.execute(GetFormKeyCmd.java:84) at org.camunda.bpm.engine.impl.cmd.GetFormKeyCmd.execute(GetFormKeyCmd.java:40) at org.camunda.bpm.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:28) at org.camunda.bpm.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:110) at org.camunda.bpm.engine.impl.interceptor.ProcessApplicationContextInterceptor.execute(ProcessApplicationContextInterceptor.java:70) at org.camunda.bpm.engine.impl.interceptor.CommandCounterInterceptor.execute(CommandCounterInterceptor.java:35) at org.camunda.bpm.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33) at org.camunda.bpm.engine.impl.FormServiceImpl.getStartFormKey(FormServiceImpl.java:99) ... user code{noformat} h3. Steps to reproduce (Required on creation): # Deploy a process definition with multiple start events # Call {{getFormService().getStartFormKey(processDefinitionId)}} for that process definition h3. Observed Behavior (Required on creation): NPE as described above h3. Expected behavior (Required on creation): A meaningful {{NullValueException}} as thrown in {{GetStartFormCmd}} for example in the same setting h3. Root Cause (Required on prioritization): * In [GetFormKeyCmd lines 83 and 84|https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/cmd/GetFormKeyCmd.java#L83-L84], we expect there always to be a FormDefinition, which is not the case in 7.17.0 given the preconditions above. {code:java} FormDefinition formDefinition = processDefinition.getStartFormDefinition(); formKeyExpression = formDefinition.getFormKey(); {code} h3. Solution Ideas (Optional): # Throw a {{NullValueException}} stating the absence of a form definition for the start event h3. Hints (optional): * The "get form key" behavior changed with regards to 7.16, where you would receive "null" instead of an NPE * Other form data related methods/commands throw NullValueExceptions in such setups |
Assignee | Original: Tobias Metzke-Bernstein [ tobias.metzke ] |