• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

LinkageError while defining class: javax.xml.namespace.QName

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello All,

I am getting an exception i.e... Exception thrown : java.lang.LinkageError: LinkageError while defining class: javax.xml.namespace.QName.

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, RSA6.0.1.1 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
==>[0]
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 .

Thanks in advance..
Gangadhar
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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...
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic