• 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

What does this error mean - "Class org/w3c/dom/Node violates loader constraints" ?

 
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What does "Class org/w3c/dom/Node violates loader constraints" mean? I've encountered this error while transforming a Document obj and displaying it thru "out". I noticed that this error occurs during transformation of document to a certain output/result. Please see the code below:
TransformerFactory tFactory =
TransformerFactory.newInstance();
Transformer transformer = tFactory.newTransformer
();
transformer.transform(new DOMSource(objXML), new
StreamResult(out)); //Error occurs at this
point.
Could it be that the Document objXML that I'm going to transform is not in the correct format or something like that?
What are the possible solutions regarding this error? Thanks!
 
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey Wendy, how's it going? I'm also having trouble with "violates loader constraints". What J2EE server are you using? Or is it just a java app? What JVM are you using?
Typically this is caused by having multiple different versions of the same jar (xalan, xerces, etc.) in the classpath. So it is finding org.w3c.dom.Node in more than one jar.
Dan'l
 
Krysty Sullivan
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Danl! => Sorry but I'm not Wendy. I checked out my jar files and remove some which contained the same classes. Nway, thanks for your tip, it really helped me! God bless!
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic