Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

warnings when using JDK9 #1317

Closed
karussell opened this issue Mar 22, 2018 · 2 comments
Closed

warnings when using JDK9 #1317

karussell opened this issue Mar 22, 2018 · 2 comments

Comments

@karussell
Copy link
Member

There are problems for the build:

[java] WARNING: An illegal reflective access operation has occurred
[java] WARNING: Illegal reflective access by org.dom4j.io.SAXContentHandler (file:/home/travis/.m2/repository/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar) to method com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser$LocatorProxy.getEncoding()
[java] WARNING: Please consider reporting this to the maintainers of org.dom4j.io.SAXContentHandler

but there are also problems for GH itself:

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/home/travis/.m2/repository/com/google/inject/guice/4.1.0/guice-4.1.0.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

The issue is known to the guice people: google/guice#1133 as we don't use guice in dropwizard this should be fixed with #1314.

@karussell
Copy link
Member Author

This is fixed due to dropwizardification but for maven shade we get this:

[WARNING] jaxws-api-2.3.0.jar, javax.xml.soap-api-1.4.0.jar, jaxb-api-2.3.0.jar define 1 overlappping classes: 
[WARNING]   - module-info
[WARNING] maven-shade-plugin has detected that some .class files
[WARNING] are present in two or more JARs. When this happens, only
[WARNING] one single version of the class is copied in the uberjar.
[WARNING] Usually this is not harmful and you can skeep these
[WARNING] warnings, otherwise try to manually exclude artifacts
[WARNING] based on mvn dependency:tree -Ddetail=true and the above
[WARNING] output
[WARNING] See http://docs.codehaus.org/display/MAVENUSER/Shade+Plugin

@karussell
Copy link
Member Author

Upgrading to more recent plugin version removes this but gives:

[WARNING] Discovered module-info.class. Shading will break its strong encapsulation.

which I find acceptable for the web "fat jar" and we need to modularize our project at a later project in a different issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant