Nuxeo classloader prevents embedded jars to load each other
-----------------------------------------------------------
Key: NXP-1918
URL: http://jira.nuxeo.org/browse/NXP-1918
Project: Nuxeo Enterprise Platform 5
Issue Type: Bug
Components: Runtime
Affects Versions: 5.1.2
Reporter: Olivier Grisel
Assignee: Bogdan Stefanescu
Fix For: 5.1.3, 5.2 M1
Use case:
You have a custom-project.jar (with MANIFEST.MF, OSGI-INF/, pom.xml as any
other standard nuxeo plugin). That project as a dependency on an external jar
(for instance xmlbeans 2.2.0). The dependency is declared in the pom.xml file
of custom-project along with a declaration for the maven-dependency-plugin to
include that jar at the root of custom-project.jar:
<artifactItem>
<groupId>org.apache.xmlbeans</groupId>
<artifactId>xmlbeans</artifactId>
</artifactItem>
Since xmlbeans 2.2.0 needs stax-api 1.0.1 to work, we add that dependency in
custom-project's pom.xml as well along with the maven-dependency-plugin
declaration as follows:
<artifactItem>
<groupId>stax</groupId>
<artifactId>stax-api</artifactId>
</artifactItem>
When building the custom-project.jar we now have the following content:
custom-project.jar/
xmlbeans-2.2.0.jar
stax-api-1.0.1.jar
classes/
...
After having deployed successfully custom-project.jar in nuxeo.ear/plugins,
when calling a method of a class of custom-project that needs a class of
xmlbeans, the nuxeo class loader finds the xmlbeans class but if that class
needs in turn a class of stax-api (such as javax.stream.QName) we get a
classloading exception (it cannot find QName).
When disabling the nuxeo specific classloader in the jboss-app.xml template of
the ear, everything works fine.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.nuxeo.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
_______________________________________________
ECM-tickets mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm-tickets