简体   繁体   中英

Exception “java.lang.NoSuchMethodError: org.codehaus.stax2.ri.EmptyIterator.getInstance()Ljava/util/Iterator” After adding JDK11 dependencies

We are facing this issue after upgrading from JDK10 to JDK11. The only thing we changed is, we have added below dependencies.

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

Not understanding Why it's failing.

Try this dependency if you are using maven:

<dependency>
    <groupId>org.codehaus.jackson</groupId>
    <artifactId>jackson-core-lgpl</artifactId>
    <version>1.0.1</version>
</dependency>

I had this in my pom.xml:

<dependency>
    <groupId>org.codehaus.woodstox</groupId>
    <artifactId>stax2-api</artifactId>
<version>4.1</version> </dependency>

Removing that fixed the same exception. Maybe you've got the same dependency in your tree?

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