3

I am adopting Jakarta EE 9 and developing an EE application with EJB and WAR modules. EJB is already done and deployed on GlassFish 6. Now I want to develop WAR module with PrimeFaces as part of the same EAR and deploy the EAR on GF 6.

I understood the first PrimeFaces version I can use is 10.0.0-RC2 because this is the first release supporting JSF 3.0 (part of Jakarta EE 9). Am I right? But I got below error:

java.lang.IllegalArgumentException: java.lang.NoClassDefFoundError: javax/servlet/ServletRequestListener

Why does PF 10.0.0-RC2 still depend on javax.* instead of jakarta.*?

The pom dependencies are:

<dependencies>
    <dependency>
        <groupId>jakarta.platform</groupId>
        <artifactId>jakarta.jakartaee-api</artifactId>
        <version>9.0.0</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>org.primefaces</groupId>
        <artifactId>primefaces</artifactId>
        <version>10.0.0-RC2</version>
    </dependency> 
</dependencies>
BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
KronosOne
  • 67
  • 2
  • 8

1 Answers1

10

PrimeFaces is since 10.0.0-RC2 available in 2 flavors, the default flavor using javax.* dependencies and the Jakartified flavor using jakarta.* dependencies. To switch between these you need to set the <classifier> of the PrimeFaces dependency to jakarta.

For example:

<dependency>
    <groupId>org.primefaces</groupId>
    <artifactId>primefaces</artifactId>
    <version><!-- 10.0.0-RC2, 11.0.0, 12.0.0, etc --></version>
    <classifier>jakarta</classifier>
</dependency> 
BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
Melloware
  • 10,435
  • 2
  • 32
  • 62