Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Split module conflict between eclipse and jakarta.jakartaee.api(Using jakarta.jakartaee.api (provided) and eclipselink (provided))
Split module conflict between eclipse and jakarta.jakartaee.api [message #1854567] Thu, 25 August 2022 19:42 Go to next message
John Manko is currently offline John MankoFriend
Messages: 2
Registered: August 2022
Junior Member
I'm in the process of converting a Java EE 8 library to Jakarta EE 9.1, but I'm running into conflicts between eclipselink and jakarta.jakartaee-api.

Without any exclusions defined, here is my pom. Notice eclipselink version is 4.0.0-M3, which matches the version on Payara 6 alpha. Switching eclipselink to version 3.0.3 fixes these problems.

    <dependencies>
        <dependency>
            <groupId>org.eclipse.persistence</groupId>
            <artifactId>eclipselink</artifactId>
            <version>4.0.0-M3</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
            <version>5.9.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.glassfish.jersey.core</groupId>
            <artifactId>jersey-client</artifactId>
            <version>3.0.6</version>
            <scope>provided</scope>      
        </dependency>
        <dependency>
            <groupId>org.glassfish.jersey.media</groupId>
            <artifactId>jersey-media-multipart</artifactId>
            <version>3.0.6</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
            <version>2.9.1</version>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <version>31.1-jre</version>
        </dependency>
        <dependency>
            <groupId>org.apache.pdfbox</groupId>
            <artifactId>pdfbox</artifactId>
            <version>2.0.26</version>
        </dependency>
        <dependency>
            <groupId>jakarta.platform</groupId>
            <artifactId>jakarta.jakartaee-api</artifactId>
            <version>9.1.0</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>


module-info.java:
module com.mydomain.base {
    
    requires com.google.common;
    requires com.google.gson;
    requires eclipselink;
    requires jakarta.jakartaee.api;
    requires java.logging;
    requires java.sql;
    requires jersey.client;
    requires jersey.media.multipart;
    requires org.apache.pdfbox;
    requires org.apache.fontbox;
    
}


Results:
[ERROR] the unnamed module reads package jakarta.annotation from both jakarta.annotation and jakarta.jakartaee.api
[ERROR] the unnamed module reads package jakarta.annotation.sql from both jakarta.annotation and jakarta.jakartaee.api
[ERROR] the unnamed module reads package jakarta.annotation.security from both jakarta.annotation and jakarta.jakartaee.api
[ERROR] the unnamed module reads package jakarta.activation from both jakarta.activation and jakarta.jakartaee.api
[ERROR] the unnamed module reads package jakarta.ws.rs from both jakarta.ws.rs and jakarta.jakartaee.api
[ERROR] the unnamed module reads package jakarta.ws.rs.client from both jakarta.ws.rs and jakarta.jakartaee.api
[ERROR] the unnamed module reads package jakarta.ws.rs.sse from both jakarta.ws.rs and jakarta.jakartaee.api
[ERROR] the unnamed module reads package jakarta.ws.rs.ext from both jakarta.ws.rs and jakarta.jakartaee.api
[ERROR] the unnamed module reads package jakarta.ws.rs.core from both jakarta.ws.rs and jakarta.jakartaee.api
[ERROR] the unnamed module reads package jakarta.ws.rs.container from both jakarta.ws.rs and jakarta.jakartaee.api
[ERROR] the unnamed module reads package jakarta.persistence from both jakarta.persistence and jakarta.jakartaee.api
[ERROR] the unnamed module reads package jakarta.persistence.spi from both jakarta.persistence and jakarta.jakartaee.api
[ERROR] the unnamed module reads package jakarta.persistence.metamodel from both jakarta.persistence and jakarta.jakartaee.api
[ERROR] the unnamed module reads package jakarta.persistence.criteria from both jakarta.persistence and jakarta.jakartaee.api
[ERROR] the unnamed module reads package jakarta.inject from both jakarta.inject and jakarta.jakartaee.api
[ERROR] the unnamed module reads package jakarta.xml.bind from both jakarta.xml.bind and jakarta.jakartaee.api
[ERROR] the unnamed module reads package jakarta.xml.bind.attachment from both jakarta.xml.bind and jakarta.jakartaee.api
[ERROR] the unnamed module reads package jakarta.xml.bind.annotation from both jakarta.xml.bind and jakarta.jakartaee.api
[ERROR] the unnamed module reads package jakarta.xml.bind.annotation.adapters from both jakarta.xml.bind and jakarta.jakartaee.api
[ERROR] the unnamed module reads package jakarta.xml.bind.util from both jakarta.xml.bind and jakarta.jakartaee.api
[ERROR] the unnamed module reads package jakarta.xml.bind.helpers from both jakarta.xml.bind and jakarta.jakartaee.api
[ERROR] module jakarta.jakartaee.api reads package jakarta.annotation from both jakarta.annotation and jakarta.jakartaee.api
[ERROR] module jakarta.jakartaee.api reads package jakarta.annotation.sql from both jakarta.annotation and jakarta.jakartaee.api
[ERROR] module jakarta.jakartaee.api reads package jakarta.annotation.security from both jakarta.annotation and jakarta.jakartaee.api
[ERROR] module jakarta.jakartaee.api reads package jakarta.activation from both jakarta.activation and jakarta.jakartaee.api
[ERROR] module jakarta.jakartaee.api reads package jakarta.ws.rs from both jakarta.ws.rs and jakarta.jakartaee.api
[ERROR] module jakarta.jakartaee.api reads package jakarta.ws.rs.client from both jakarta.ws.rs and jakarta.jakartaee.api
[ERROR] module jakarta.jakartaee.api reads package jakarta.ws.rs.sse from both jakarta.ws.rs and jakarta.jakartaee.api
[ERROR] module jakarta.jakartaee.api reads package jakarta.ws.rs.ext from both jakarta.ws.rs and jakarta.jakartaee.api
[ERROR] module jakarta.jakartaee.api reads package jakarta.ws.rs.core from both jakarta.ws.rs and jakarta.jakartaee.api
[ERROR] module jakarta.jakartaee.api reads package jakarta.ws.rs.container from both jakarta.ws.rs and jakarta.jakartaee.api
[ERROR] module jakarta.jakartaee.api reads package jakarta.persistence from both jakarta.persistence and jakarta.jakartaee.api
[ERROR] module jakarta.jakartaee.api reads package jakarta.persistence.spi from both jakarta.persistence and jakarta.jakartaee.api
[ERROR] module jakarta.jakartaee.api reads package jakarta.persistence.metamodel from both jakarta.persistence and jakarta.jakartaee.api
[ERROR] module jakarta.jakartaee.api reads package jakarta.persistence.criteria from both jakarta.persistence and jakarta.jakartaee.api
[ERROR] module jakarta.jakartaee.api reads package jakarta.inject from both jakarta.inject and jakarta.jakartaee.api
[ERROR] module jakarta.jakartaee.api reads package jakarta.xml.bind from both jakarta.xml.bind and jakarta.jakartaee.api
[ERROR] module jakarta.jakartaee.api reads package jakarta.xml.bind.attachment from both jakarta.xml.bind and jakarta.jakartaee.api
[ERROR] module jakarta.jakartaee.api reads package jakarta.xml.bind.annotation from both jakarta.xml.bind and jakarta.jakartaee.api
[ERROR] module jakarta.jakartaee.api reads package jakarta.xml.bind.annotation.adapters from both jakarta.xml.bind and jakarta.jakartaee.api
[ERROR] module jakarta.jakartaee.api reads package jakarta.xml.bind.util from both jakarta.xml.bind and jakarta.jakartaee.api
[ERROR] module jakarta.jakartaee.api reads package jakarta.xml.bind.helpers from both jakarta.xml.bind and jakarta.jakartaee.api


If I add exclusions into the pom, like such:

    <dependencies>
        <dependency>
            <groupId>org.eclipse.persistence</groupId>
            <artifactId>eclipselink</artifactId>
            <version>4.0.0-M3</version>
            <scope>provided</scope>        
            <exclusions>
                <exclusion>
                    <groupId>jakarta.activation</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>jakarta.persistence</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>jakarta.xml.bind</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.glassfish.jersey.core</groupId>
            <artifactId>jersey-client</artifactId>
            <version>3.0.6</version>
            <scope>provided</scope>     
            <exclusions>
                <exclusion>
                    <groupId>jakarta.annotation</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>jakarta.inject</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>jakarta.ws.rs</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
    </dependencies>


Results:
[ERROR] module not found: jakarta.xml.bind
[ERROR] module not found: jakarta.persistence


Any recommendations to get past this?
Re: Split module conflict between eclipse and jakarta.jakartaee.api [message #1854571 is a reply to message #1854567] Fri, 26 August 2022 00:43 Go to previous messageGo to next message
Lukas JungmannFriend
Messages: 42
Registered: November 2013
Location: Prague, Czech Republic
Member
3.0.3 is EE 9.x compatible, while 4.0.0 is EE 10 compatible. Either update the platform API to version 10 (some RC should be out already) or stick with EL 3.0.3
Re: Split module conflict between eclipse and jakarta.jakartaee.api [message #1854580 is a reply to message #1854571] Fri, 26 August 2022 13:15 Go to previous message
John Manko is currently offline John MankoFriend
Messages: 2
Registered: August 2022
Junior Member
Thanks. I'll stick with v3 for now.
Previous Topic:Toplink 10 to Eclipselink migration
Next Topic:Missing IN in criteria API SQL
Goto Forum:
  


Current Time: Wed Dec 11 16:05:46 GMT 2024

Powered by FUDForum. Page generated in 0.03202 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top