Bug/Error when deploying DMN: java.lang.NoSuchMethodError: org.camunda.bpm.model.dmn.instance.Decision.getCamundaHistoryTimeToLive

Hi
I’ve created a simple DMN File.txt (1.6 KB) and wanted to deploy it using the repositoryService

public Map<String,String> upload( MultipartFile file, RepositoryService repositoryService ) {
boolean successful = super.check(file, FILE_EXTENSION);
if(successful) {
try {
// convert multipartfile into java.io.file
File convertedFile = super.convert(file);
String fileName = convFile.getName();

  Deployment d = repositoryService.createDeployment()
  			.addInputStream(fileName,new FileInputStream(convFile))
  			.name(fileName)
  			.deploy();
          ...

But calling the deploy results in an Deployment Execption.txt (3.8 KB)

What does “java.lang.NoSuchMethodError: org.camunda.bpm.model.dmn.instance.Decision.getCamundaHistoryTimeToLive()” mean?

I’m using Spring Boot and Camunda 7.7.0. In my POM I have the following settings:

>  <dependency>
>    <groupId>org.camunda.bpm.extension.springboot</groupId>
>    <artifactId>camunda-bpm-spring-boot-starter</artifactId>
>    <version>2.1.2</version>
>  </dependency>

>  <dependency>
>    <groupId>org.camunda.bpm</groupId>
>    <artifactId>camunda-engine-spring</artifactId>
>    <version>${camunda.version}</version>
>  </dependency>

>  <dependency>
>    <groupId>org.camunda.bpm.extension.dmn</groupId>
>    <artifactId>dmn-xlsx-converter</artifactId>
>    <version>0.1.1</version>
>  </dependency>

I added also a screenshot of my Eclipse environment
There you can see that in class org.camunda.bpm.engine.impl.dmn.transformer.DecisionDefinitionHandler the method createFromDecision is executed, but the decision parameter does not provide the required methodgetCamundaHistoryTimeToLive which will than result in an exception.

Here’s a second screenshot


Please have a look into class DefaultDmnTransform. As you can see in the Stacktrace, method transformIndividualDecisions is called where the “dDcision” objects are transferred into “DmnDecisionImpl” objects which do not offer an getCamundaHistoryTimeToLive() method

Best regards, Roland

Hi Roland,
are you sure you’re using Camunda 7.7? Are you explicitely defining it in your POM file, as by default Spring Boot Starter extension 2.1.2 is using Camunda 7.6?
Could you may be run mvn dependency:tree and check Camunda library versions? We’re specifically interested in camunda-dmn-model library.

Best regards,
Svetlana

Hi Svetlana
please find attached the mvn file
maven.tree.txt (5.4 KB)
Cheers Roland

Hi Roland,

I can’t see the version of camunda-dmn-model library in the file you posted. Have you truncated it?

Looking now at the POM extract that you’ve posted, I suspect that 7.6 dependency could come from dmn-xlsx-converter. To check this we would need full dependency tree here.

Hi Svetlana
I didn’t specify camunda-dmn-model explecitely.
I only truncated some internal entries. Here’s the full tree
maven.tree.txt (10.6 KB)
But you’re right, the XLSX converter has an entry
org.camunda.bpm.model:camunda-dmn-model:jar:7.6.0-alpha5:compile

Cheers, Roland

You can try to exclude camunda-dmn-model from dmn-xlsx-converter dependency.

Ok, I’ll give it a try, I added the following entry, is this correct?

<dependency>
    <groupId>org.camunda.bpm.extension.dmn</groupId>
    <artifactId>dmn-xlsx-converter</artifactId>
    <version>0.1.1</version>
    <exclusions>
      <exclusion>
                <groupId>org.camunda.bpm.model</groupId>
                <artifactId>camunda-dmn-model</artifactId>
      </exclusion>
   </exclusions>

Hi Svetlana

ok, it works!.
I excluded the dependency like described above, than I re-created the dmn file (to be sure that the converter is still running) and re-deployed the decision file.

Thanks for your help

Cheers, Roland

1 Like