https://bugzilla.redhat.com/show_bug.cgi?id=1299674
Bug ID: 1299674 Summary: xmlpull.jar causes java.lang.LinkageError: loader constraint violation: when resolving method "javax.xml.ws.Service" Product: Fedora Version: 23 Component: groovy Severity: high Assignee: msrb@redhat.com Reporter: rc556677@outlook.com QA Contact: extras-qa@fedoraproject.org CC: java-sig-commits@lists.fedoraproject.org, mizdebsk@redhat.com, msrb@redhat.com
Description of problem: Running a SOAP client QName is loaded from xmlpull.jar and JVM rt.jar leading to
Caught: java.lang.LinkageError: loader constraint violation: when resolving method "javax.xml.ws.Service.<init>(Ljava/net/URL;Ljavax/xml/namespace/QName;)V" the class loader (instance of org/codehaus/groovy/tools/RootLoader) of the current class, org/ejbca/core/protocol/ws/client/gen/EjbcaWSService, and the class loader (instance of <bootloader>) for the method's defining class, javax/xml/ws/Service, have different Class objects for the type javax/xml/namespace/QName used in the signature java.lang.LinkageError: loader constraint violation: when resolving method "javax.xml.ws.Service.<init>(Ljava/net/URL;Ljavax/xml/namespace/QName;)V" the class loader (instance of org/codehaus/groovy/tools/RootLoader) of the current class, org/ejbca/core/protocol/ws/client/gen/EjbcaWSService, and the class loader (instance of <bootloader>) for the method's defining class, javax/xml/ws/Service, have different Class objects for the type javax/xml/namespace/QName used in the signature at org.ejbca.core.protocol.ws.client.gen.EjbcaWSService.<init>(EjbcaWSService.java:37) at com.example.ejbca.version.run(version.groovy:73)
Version-Release number of selected component (if applicable): 2.4.4
How reproducible: Always
Steps to Reproduce: 1. Run groovy script using EJBCA SOAP service
Name qname = new QName("http://ws.protocol.core.ejbca.org/", "EjbcaWSService") def ejbcasvc = new EjbcaWSService(new URL("https://example.com/ejbca/ejbcaws/ejbcaws?wsdl"), qname) def ejbcaws = ejbcasvc.getEjbcaWSPort() logger.info("Connected to EJBCA version: " + Ejbca.getVersion(ejbcaws)) 2. The SOAP service is from https://www.ejbca.org/ 3.
Actual results: Caught: java.lang.LinkageError: loader constraint violation: when resolving method "javax.xml.ws.Service.<init>(Ljava/net/URL;Ljavax/xml/namespace/QName;)V" the class loader (instance of org/codehaus/groovy/tools/RootLoader) of the current class, org/ejbca/core/protocol/ws/client/gen/EjbcaWSService, and the class loader (instance of <bootloader>) for the method's defining class, javax/xml/ws/Service, have different Class objects for the type javax/xml/namespace/QName used in the signature java.lang.LinkageError: loader constraint violation: when resolving method "javax.xml.ws.Service.<init>(Ljava/net/URL;Ljavax/xml/namespace/QName;)V" the class loader (instance of org/codehaus/groovy/tools/RootLoader) of the current class, org/ejbca/core/protocol/ws/client/gen/EjbcaWSService, and the class loader (instance of <bootloader>) for the method's defining class, javax/xml/ws/Service, have different Class objects for the type javax/xml/namespace/QName used in the signature at org.ejbca.core.protocol.ws.client.gen.EjbcaWSService.<init>(EjbcaWSService.java:37)
Expected results: [main] INFO ejbca - Connected to EJBCA version: EJBCA 6.3.1.1 Community (r21429)
Additional info: Upstream groovy-2.4.5 has xmlpull-1.1.3.1.jar. Not sure why that works but Fedora groovy doesn't.
Fedora 2.4.4: (with -verbose) [Loaded javax.xml.namespace.QName from file:/usr/share/groovy/lib/xmlpull.jar] [Loaded javax.xml.namespace.QName from /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.65-4.b17.fc23.x86_64/jre/lib/rt.jar] Caught: java.lang.LinkageError: loader constraint violation: when resolving method "javax.xml.ws.Service.<init>(Ljava/net/URL;Ljavax/xml/namespace/QName;)V" the class loader (instance of org/codehaus/groovy/tools/RootLoader) of the current class, org/ejbca/core/protocol/ws/client/gen/EjbcaWSService, and the class loader (instance of <bootloader>) for the method's defining class, javax/xml/ws/Service, have different Class objects for the type javax/xml/namespace/QName used in the signature
Upstream 2.4.5: (-verbose) [Loaded javax.xml.namespace.QName from /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.65-4.b17.fc23.x86_64/jre/lib/rt.jar] [Loaded javax.xml.namespace.QName$1 from /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.65-4.b17.fc23.x86_64/jre/lib/rt.jar]
Why upstream doesn't pull in its own groovy-2.4.5/lib/pull-1.1.3.1.jar and have the same error?
https://bugzilla.redhat.com/show_bug.cgi?id=1299674
--- Comment #1 from Richard Chan rc556677@outlook.com --- Can reproduce the error on RHEL 7. groovy 1.8
https://bugzilla.redhat.com/show_bug.cgi?id=1299674
--- Comment #2 from Richard Chan rc556677@outlook.com --- Same issue if I set JAVA_HOME to Oracle JDK. The issue may be the Fedora wrapper scripts.
With Oracle JDK: [Loaded javax.xml.namespace.QName from file:/usr/share/groovy/lib/xmlpull.jar] [Loaded javax.xml.namespace.QName from /opt/java/jdk1.8.0_60/jre/lib/rt.jar] Caught: java.lang.LinkageError: loader constraint violation:
https://bugzilla.redhat.com/show_bug.cgi?id=1299674
--- Comment #3 from Richard Chan rc556677@outlook.com --- A "hotfix" is to remove the link from /usr/share/groovy/xmlpull.jar to /usr/share/java/xpp3.jar OR link it to upstream's groovy-2.4.5/lib/xmlpull-1.1.3.1.jar.
I have verified that this works.
Maybe a bug in xpp3? It should not bundle javax/xml/namespace/QName.class
https://bugzilla.redhat.com/show_bug.cgi?id=1299674
Richard Chan rc556677@outlook.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Depends On| |1299679
Referenced Bugs:
https://bugzilla.redhat.com/show_bug.cgi?id=1299679 [Bug 1299679] Bundles javax.xml.namespace.QName
https://bugzilla.redhat.com/show_bug.cgi?id=1299674
--- Comment #4 from Richard Chan rc556677@outlook.com --- This may actually be a bug in xpp3.jar (not sure why it bundles QName). I have filed 1299679.
https://bugzilla.redhat.com/show_bug.cgi?id=1299674 Bug 1299674 depends on bug 1299679, which changed state.
Bug 1299679 Summary: Bundles javax.xml.namespace.QName https://bugzilla.redhat.com/show_bug.cgi?id=1299679
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |CLOSED Resolution|--- |NOTABUG
https://bugzilla.redhat.com/show_bug.cgi?id=1299674
Richard Chan rc556677@outlook.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Depends On|1299679 |
--- Comment #5 from Richard Chan rc556677@outlook.com --- Not a bug in xpp3 either: maybe groovy should link to xpp3_min
/usr/share/groovy/xmlpull.jar -> /usr/share/java/xpp3_min.jar instead of /usr/share/java/xpp3.jar.
This is what upstream seems to do: its xmlpull.jar looks more like xpp3_min.jar instead of xpp3.jar.
Referenced Bugs:
https://bugzilla.redhat.com/show_bug.cgi?id=1299679 [Bug 1299679] Bundles javax.xml.namespace.QName
https://bugzilla.redhat.com/show_bug.cgi?id=1299674
--- Comment #6 from Richard Chan rc556677@outlook.com --- On Fedora should be xpp3-minimal.jar
ln -fs /usr/share/java/xpp3-minimal.jar /usr/share/groovy/xmlpull.jar
https://bugzilla.redhat.com/show_bug.cgi?id=1299674
Richard Chan rc556677@outlook.com changed:
What |Removed |Added ---------------------------------------------------------------------------- External Bug ID| |Debian BTS 500909
https://bugzilla.redhat.com/show_bug.cgi?id=1299674
Mikolaj Izdebski mizdebsk@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|msrb@redhat.com |mizdebsk@redhat.com
https://bugzilla.redhat.com/show_bug.cgi?id=1299674
Mikolaj Izdebski mizdebsk@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Depends On| |1299774
Referenced Bugs:
https://bugzilla.redhat.com/show_bug.cgi?id=1299774 [Bug 1299774] kxml: Buldles classes from xpp3
https://bugzilla.redhat.com/show_bug.cgi?id=1299674
Michal Srb msrb@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Assignee|mizdebsk@redhat.com |msrb@redhat.com
https://bugzilla.redhat.com/show_bug.cgi?id=1299674
--- Comment #7 from Michal Srb msrb@redhat.com --- Thanks for the bug report Richard, and thanks for your analysis of the problem. You're right, the symlink should point to "minimal" version of the xpp3 library.
https://bugzilla.redhat.com/show_bug.cgi?id=1299674
--- Comment #8 from Fedora Update System updates@fedoraproject.org --- groovy-2.4.4-3.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-d814445cea
https://bugzilla.redhat.com/show_bug.cgi?id=1299674
Fedora Update System updates@fedoraproject.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |MODIFIED
https://bugzilla.redhat.com/show_bug.cgi?id=1299674
Fedora Update System updates@fedoraproject.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|MODIFIED |ON_QA
--- Comment #9 from Fedora Update System updates@fedoraproject.org --- groovy-2.4.4-3.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-d814445cea
https://bugzilla.redhat.com/show_bug.cgi?id=1299674
--- Comment #10 from Fedora Update System updates@fedoraproject.org --- groovy-2.4.4-3.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.
https://bugzilla.redhat.com/show_bug.cgi?id=1299674
Fedora Update System updates@fedoraproject.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|ON_QA |CLOSED Fixed In Version| |groovy-2.4.4-3.fc23 Resolution|--- |ERRATA Last Closed| |2016-02-29 17:22:42
java-sig-commits@lists.fedoraproject.org