Skip to content
Advertisement

Maven Jetty spams warning “scanned from multiple locations”

I’ve found a similar question here , but it points to a plugin that I’m not using (maven-failsafe-plugin), and the configuration that solution is referring to is not applicable for me.

The problem is that since I’ve updated my jetty plugin from

JavaScript

to <version>9.4.11.v20180605</version> , it started to spam hundreds of warnings like

JavaScript

I’ve searched everywhere but I can’t understand neither what that means or how to resolve this.

I’m using IntelliJ and maven compiler plugin

JavaScript

Thanks

Advertisement

Answer

Lets break it down …

[WARNING] org.apache.axis2.description.java2wsdl.bytecode.ClassReader scanned from multiple locations:

  • jar:file:///C:/Users/a0763323/.m2/repository/org/apache/axis2/axis2-kernel/1.4.1/axis2-kernel-1.4.1.jar!/org/apache/axis2/description/java2wsdl/bytecode/ClassReader.class,
  • jar:file:///C:/Users/a0763323/.m2/repository/it/aon/WSInfocar/1.2/WSInfocar-1.2.jar!/org/apache/axis2/description/java2wsdl/bytecode/ClassReader.class

You have the class org.apache.axis2.description.java2wsdl.bytecode.ClassReader coming from 2 different JARs (and seemingly on two different versions!)

Judging from your filesystem paths you likely have the following maven dependencies …

JavaScript

It’s unwise in the extreme to have two different versions of the same class on your classpath / classloader (it’s very easy to have 1 version be used and then passed to a different class on the other version that will not understand it or be able to use it)

You’ll need to resolve, manually, which one you should be using. You might want to ask the developers of the WSInfocar why they are bundling axis in their own artifact as well.

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement