Hi All,
I don't know if anybody calls a Web Service from JBoss / Nuxeo 5.1.6
with success here now ?
As I explained in this old thread (see in attachment), we succeed in
calling a Web Service from Nuxeo 5.1.6 with XFire only if we patch
nuxeo-platform-transform-plugins-5.1.6.jar.
This works well ... but with JDK1.6 only.
With the JDK1.5, we obtain an exception like this :
10:23:58,855 ERROR [[Faces Servlet]] Servlet.service() for servlet Faces
Servlet threw exception
java.lang.NoClassDefFoundError
at
org.codehaus.xfire.transport.http.HttpChannel.writeWithoutAttachments(HttpChannel.java:54)
at
org.codehaus.xfire.transport.http.CommonsHttpMessageSender.getByteArrayRequestEntity(CommonsHttpMessageSender.java:422)
It seems that it's a problem of ClassLoader again.
My questions :
Can I use Nuxeo 5.1.6 with JDK/JRE 1.6 now ? [It seems that the
documentation says that JRE1.5 is no more required].
Is there a right way to call a Web Service from Nuxeo (so that it works
also with JDK1.5 for example) ?
We tried to call a Web Service with Axis1, JbossWS ... with no success
too because of problems of ClassLoader in the jboss environment.
Using our JUNIT Tests (extending NXRuntimeTestCase), it works well both
with JDK1.5 and JDK1.6 at each time (at each time problems seems to be
related with classloaders in jboss environment :-( ).
Thanks in advance,
Vincent.
--- Begin Message ---
Hi all,
Just a quick feedback about this problem of NoClassDefFoundError [ it
can be helpful if you have a java.lang.NoClassDefFoundError , not only
with the QName class ].
In fact there is a class loader violation when using
javax.xml.namespace.QName from a plugin.
Exactly the error is :
java.lang.LinkageError: loader constraint violation: loader (instance of
org/jboss/mx/loading/UnifiedClassLoader3) previously initiated loading
for a different type with name "javax/xml/namespace/QName"
[you can get this error if you try to load dynamically the
javax.xml.namespace.QName from the current class loader
(UnifiedClassLoader3) of the class] :
getClass().getClassLoader().loadClass("javax.xml.namespace.QName")
[from the class loader of the current thread, it works]
In playing with class loader, you can see that the first class load of
javax.xml.namespace.QName comes from xpp3-1.1.3.4.O.jar
=> A workaround for the problem of loading javax.xml.namespace.QName is
here to remove the class javax/xml/namespace/QName of the jar
xpp3-1.1.3.4.O.jar which itself is embedded inside the jar
nuxeo-platform-transform-plugins-5.1.4.jar.
After this, you can use XFire or others tools [which play with
javax.xml.namespace.QName], and so call some WebService from your
plugin, It works fine :-)
But certainly, if we have a problem with javax.xml.namespace.QName here,
it may be possible to have also others class loader violation with
others classes ...
=> so take care about the class loader violation if you have some
java.lang.NoClassDefFoundError problem with Nuxeo.
I don't know if the Nuxeo Team can easily modify the OSGI/Nuxeo Class
Loading System to avoid these problems ? It would be great :-)
Thanks in advance,
Vincent.
Vincent Bonamy wrote:
Hi all,
I have exactly the same problem already described here :
http://www.nuxeo.org/discussions/message.jspa?messageID=3922#3922
I tried to call my Web Service with Axis2, XFire, in generating or not
classes from wsdl file.
I tried with nuxeo-ep-5.1.4.GA, with nuxeo-ep-5.2.0.M1-1 ...
I tried to put jars like xml-apis.jar, axis-jaxrpc-1.4.jar and others
(jar which contain the javax/xml/namespace/QName class) in different lib
directories (nuxeo.ear/lib, jboss/lib, etc.) nothing works, I have
always the exception :
java.lang.NoClassDefFoundError: javax/xml/namespace/QName
I don't know if Luc had endly more success with this ... ?
Jboss class loader seems a bit complex and I don't know how to make at
less a workaround for this.
http://wiki.jboss.org/wiki/JBossClassLoadingUseCases
Have you any tips ?
Someone has investigate this ?
I don't know how we can consume a Web Service from Nuxeo if we can't
play with javax.xml.namespace.QName from a Nuxeo Plugin, it's a big
problem for me ...
Thanks for any helps ...
Vincent.
_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm
--- End Message ---
_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm