I am using jaxb JWSDP 1.4, the jar files which I am using are::jaxb-libs.jar jaxb-xjc.jar jaxb-impl.jar jaxb-qname.jar jaxb-api.jar jaxen-full.jar
My jaxb is working very much fine. Now the problem is I have a webservice to be consumed.I have generated client components using, RSA220.127.116.11 and in a webproject which uses servlet version 2.3 .
Many of the client component classes use javax.xml.namespace.QName and I found this class name in these jar files. jaxb-libs.jar jaxb-xjc.jar jaxb-impl.jar jaxb-api.jar jaxen-full.jar.
When I am instatiating my proxy class to consume webservcie I am getting the following exception , I am just giving the trace..
Exception thrown : java.lang.LinkageError: LinkageError while defining class: javax.xml.namespace.QName Could not be defined due to: Class javax/xml/namespace/QName violates loader constraints: parent and child already loaded different classes This is often caused by having a class defined at multiple locations within the classloader hierarchy. Other potential causes include compiling against an older or newer version of the class that has an incompatible method signature. Dumping the current context classloader hierarchy: ==> indicates defining classloader ==> com.ibm.ws.classloader.CompoundClassLoader@3d6f0289....
WebSphere_PortalV5.1 Run time does contain, the jar files which has this QName class .
Please guide me as to how this problem can be resolved .
Have you looked up LinkageError in the Java API documentation? The description of it says:
Subclasses of LinkageError indicate that a class has some dependency on another class; however, the latter class has incompatibly changed after the compilation of the former class.
It looks like you are mixing different versions of Java, or different versions of an XML parser. Are you compiling and running on a Sun JRE or on an IBM JRE? Check which XML parser you are using and if it conflicts with something else in your system. This can be complicated to find out, so you'll have to watch very carefully...