Camunda Migration to 7.20.0-alpha5 and Spring 3.1.3 incompatible types: jakarta.servlet.Filter and javax.servlet.Filter

I am migrating to camunda-7.20.0-alpha5 and Spring boot 3.1.3 and I have also setup my JDK to 17. From the Spring Boot 3 Release notes, they specified that they are moving from Javax to Jakarta.

InteliJ is highlighting this error on my SecurityConfig class:

Type parameter ‘org.camunda.bpm.engine.rest.security.auth.ProcessEngineAuthenticationFilter’ is not within its bound; should implement ‘jakarta.servlet.Filter’

org.camunda.bpm.engine.rest.security.auth public class ProcessEngineAuthenticationFilter
extends Object
implements javax.servlet.Filter
Maven: org.camunda.bpm:camunda-engine-rest-core:7.20.0-alpha5

And also getting this error when trying to build:

/config/CamundaSecurityConfig.java:[17,108] incompatible types: can
not infer type arguments for org.springframework.boot.web.servlet.FilterRegistrationBean<>
[ERROR] reason: inference variable T has incompatible bounds
[ERROR] equality constraints: org.camunda.bpm.engine.rest.security.auth.ProcessEngineAuthenticationFilter
[ERROR] lower bounds: jakarta.servlet.Filter

I’m struggling to get rid of this error, I think org.camunda.bpm.engine.rest.security.auth.ProcessEngineAuthenticationFilter should be implementing jakarta.servlet.Filter

Did you try downgrading one level down, i.e 7.20 and test the same scenario.

Hi @cpbpm, thank you for your response.

Yes I tried from 7.20.0-alpha1 until 7.20.0-alpha5.

I was also getting this error below:

/config/CamundaSecurityConfig.java:[15,34] cannot access javax.servlet.Filter
[ERROR] class file for javax.servlet.Filter not found

Then I added the javax-servlet-api dependency, and the error went away:

        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <version>4.0.1</version>
        </dependency>

Thanks.

Please note that Spring Boot Starter 7.20 (Spring Boot 3.1) depends on camunda-engine-rest-core-jakarta and not camunda-engine-rest-core.
Something is not migrated correctly if you see the latter dependency.
If you want help with checking that, please share a minimal example or pom.xml and application properties files.

Hi @Yana ,

Thank you very much, this worked. :smiley:

I added camunda-engine-rest-core-jakarta

Thanks.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.