简体   繁体   中英

dependencies of jaxws-rt 2.2.10 not working with Eclipse Neon

Today, I have found a bug with Eclipse Neon and Neon.1. On my project, when I use this dependency :

    <dependency>
        <groupId>com.sun.xml.ws</groupId>
        <artifactId>jaxws-rt</artifactId>
        <version>2.2.10</version>
    </dependency>

On screen "Dependency Hierarchy", I see my "jaxws-rt : 2.2.10", but no dependencies are linked with this library.

If I downgrade the library to version 2.2.7, it works correctly. If I use old Eclipse Mars, it works correctly with 2.2.10. If I run a maven build inside or outside Eclipse, it works fine.

I am looking for changes between Eclipse Mars and Neon. I found an upgrade of Maven Embedded version, from 3.3.3 to 3.3.9. It's not necessary to install a new runtime of maven, because Eclipse will use Embedded version for dependency resolution.

I compare pom of 2.2.10 and 2.2.7, and I see that last version is really different for dependencies, because I don't find any version of each dependency. I don't know how it works, but it works outside Eclipse Neon.

Do you think problems come from jaxws-rt library or maven version inside Eclipse Neon ?

Thanks for you help !

Ok, just faced this today with a new Eclipse installation. Turns out if your Eclipse is running on a JRE and not on a JDK, bad things are going to happen with the embedded maven.

The solution is to open eclipse.ini and add/change the below line

-vm C:/Java/JDK8/bin/javaw.exe

(Obviously the path needs to be pointing to javaw.exe inside a JDK installation directory.)

I think you have to endorse jaxws-rt dependcies. I got the same issue and found this post.

Got the same issue, nothing worked for me from all the answers. I tried:

  1. I downloaded Mars 1, Mars 2, Luna.
  2. Changed the -vm parameter in eclipse.ini file to use my jdk1.8.0_151
  3. Clear all references in eclipse that point to JRE jre.8.0_151.

I think the root cause of this issue is multiple version conflicts across JDK 1.8, jax, eclipse and even jaxws-spring(if you use one).

What worked for me: 1. finally upgrade the jaxws-rt from 2.2.10 to 2.3.0.2.

<!-- JAX-WS -->
    <dependency>
        <groupId>com.sun.xml.ws</groupId>
        <artifactId>jaxws-rt</artifactId>
        <version>2.3.0.2</version>
    </dependency>

2. Keep the 2.2.10, but manually include all child dependence for that version:

    <!-- https://mvnrepository.com/artifact/com.sun.xml.bind/jaxb-impl -->
<dependency>
    <groupId>com.sun.xml.bind</groupId>
    <artifactId>jaxb-core</artifactId>
    <version>2.2.10</version>
</dependency>

<!-- https://mvnrepository.com/artifact/com.sun.xml.stream.buffer/streambuffer -->
<dependency>
    <groupId>com.sun.xml.stream.buffer</groupId>
    <artifactId>streambuffer</artifactId>
    <version>1.5.4</version>
</dependency>


<!-- https://mvnrepository.com/artifact/com.sun.xml.bind/jaxb-impl -->
<dependency>
    <groupId>com.sun.xml.bind</groupId>
    <artifactId>jaxb-impl</artifactId>
    <version>2.2.10</version>
</dependency>


<!-- https://mvnrepository.com/artifact/com.sun.xml.ws/policy -->
<dependency>
    <groupId>com.sun.xml.ws</groupId>
    <artifactId>policy</artifactId>
    <version>2.7.2</version>
</dependency>

<!-- https://mvnrepository.com/artifact/org.jvnet.staxex/stax-ex -->
<dependency>
    <groupId>org.jvnet.staxex</groupId>
    <artifactId>stax-ex</artifactId>
    <version>1.7.8</version>
</dependency>

<!-- https://mvnrepository.com/artifact/org.glassfish.gmbal/gmbal-api-only -->
<dependency>
    <groupId>org.glassfish.gmbal</groupId>
    <artifactId>gmbal-api-only</artifactId>
    <version>3.2.0-b003</version>
</dependency>

<!-- https://mvnrepository.com/artifact/org.glassfish.ha/ha-api -->
<dependency>
    <groupId>org.glassfish.ha</groupId>
    <artifactId>ha-api</artifactId>
    <version>3.1.9</version>
</dependency>

Thankfully my project compiled and worked well after that.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM