camunda / camunda-bpm-platform

Flexible framework for workflow and decision automation with BPMN and DMN. Integration with Quarkus, Spring, Spring Boot, CDI.
https://camunda.com/
Apache License 2.0
4.11k stars 1.55k forks source link

Job priority range properties cannot be applied on shared engine #2826

Closed ThorbenLindhauer closed 1 year ago

ThorbenLindhauer commented 2 years ago

This issue was imported from JIRA:

Field Value
JIRA Link CAM-14910
Reporter @yanavasileva
Has restricted visibility comments true

Environment (Required on creation):

Shared engine setup

Description (Required on creation; please attach any relevant screenshots, stacktraces, log files, etc. to the ticket):

The jobExecutorPriorityRangeMin and jobExecutorPriorityRangeMax properties cannot be configured. When provided in process engine configuration the engine fails to start with argument type mismatch Exception.

Stacktrace ``` 26-Sep-2022 10:14:50.233 SEVERE
org.apache.catalina.startup.Catalina.start The required Server component failed to start so Tomcat is unable to start. org.apache.catalina.LifecycleException: Failed to start component ] at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:440) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198) at org.apache.catalina.startup.Catalina.start(Catalina.java:772) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:345) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:476) Caused by: org.camunda.bpm.engine.ProcessEngineException: ENGINE-08043 Exception while performing 'deploy BPM platform' => 'Start process engine default': ENGINE-08039 Cannot set property 'jobExecutorPriorityRangeMax' on instance of class 'org.camunda.bpm.engine.impl.cfg.StandaloneProcessEngineConfiguration' at org.camunda.bpm.container.impl.ContainerIntegrationLogger.exceptionWhilePerformingOperationStep(ContainerIntegrationLogger.java:316) at org.camunda.bpm.container.impl.spi.DeploymentOperation.execute(DeploymentOperation.java:136) at org.camunda.bpm.container.impl.jmx.MBeanServiceContainer.executeDeploymentOperation(MBeanServiceContainer.java:160) at org.camunda.bpm.container.impl.spi.DeploymentOperation$DeploymentOperationBuilder.execute(DeploymentOperation.java:216) at org.camunda.bpm.container.impl.tomcat.TomcatBpmPlatformBootstrap.deployBpmPlatform(TomcatBpmPlatformBootstrap.java:83) at org.camunda.bpm.container.impl.tomcat.TomcatBpmPlatformBootstrap.lifecycleEvent(TomcatBpmPlatformBootstrap.java:61) at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123) at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:423) at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:366) at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:920) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ... 7 more Caused by: org.camunda.bpm.engine.ProcessEngineException: ENGINE-08039 Cannot set property 'jobExecutorPriorityRangeMax' on instance of class 'org.camunda.bpm.engine.impl.cfg.StandaloneProcessEngineConfiguration' at org.camunda.bpm.container.impl.ContainerIntegrationLogger.cannotSetValueForProperty(ContainerIntegrationLogger.java:285) at org.camunda.bpm.container.impl.metadata.PropertyHelper.applyProperty(PropertyHelper.java:95) at org.camunda.bpm.container.impl.metadata.PropertyHelper.applyProperties(PropertyHelper.java:121) at org.camunda.bpm.container.impl.metadata.PropertyHelper.applyProperties(PropertyHelper.java:135) at org.camunda.bpm.container.impl.deployment.StartProcessEngineStep.performOperationStep(StartProcessEngineStep.java:101) at org.camunda.bpm.container.impl.spi.DeploymentOperation.execute(DeploymentOperation.java:120) ... 16 more Caused by: java.lang.IllegalArgumentException: argument type mismatch at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at org.camunda.bpm.container.impl.metadata.PropertyHelper.applyProperty(PropertyHelper.java:92) ... 20 more ```

Steps to reproduce (Required on creation):

  1. Take Tomcat distribution (or any other server used for shared engine setup)
  2. Specify the properties in the bpm-platform.xml
    <properties>
    ...
       <property name="jobExecutorPriorityRangeMin">10</property>
       <property name="jobExecutorPriorityRangeMax">40</property>
    </properties>
  3. Start the server

Observed Behavior (Required on creation):

argument type mismatch Exception is thrown and the engine cannot be started.

Expected behavior (Required on creation):

The engine is started and the job priority range properties are applied.

Root Cause (Required on prioritization):

Wrapper objects (including Long) are not supported when parsing xml process engine configuration

Solution Ideas (Optional):

Hints (optional):

Links:

mboskamp commented 1 year ago

@yanavasileva, I approved the PRs. Please double-check the CI for related failures (I don't think they are related).

yanavasileva commented 1 year ago

The failures are related to:

yanavasileva commented 1 year ago

Extended the update guides with the type and default value change.