• 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

WAR deployment - XML parser issue

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am using Jboss 6. I have an issue while deploying my WAR file which has Oracle xml parser to this server. It seems to me that, Jboss web container or deployer is trying to use my Oracle XML parser present in my WAR file instead of its own XML parser. And i am getting following deployment error.



Could you please help in making Jboss web container to use its own parser?

Thanks,
Siva
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Leave out the parser jar from your application packaging.

 
Siva Vulchi
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Leave out the parser jar from your application packaging.



Getting classNotFoundException if i leave out that jar..

 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is a WAR file all that you have or do you have additional artifacts deployed? The class cast exception is usually due to two different class loaders loading the two classes in question. But since javax.xml.parsers.DocumentBuilderFactory is in the Java runtime, I suspect that there might be multiple JARs with that class.

Edit the run.conf (or run.conf.bat) file to add "-verbose:class" to the JAVA_OPTS and restart the app server. This option causes the JVM to print the location of the JAR file for each class loaded. This generates a lot of output to be sure to redirect stdout and stderr to a file. Then look through the file to see where javax.xml.parsers.DocumentBuilderFactory and oracle.xml.jaxp.JXDocumentBuilderFactory are being loaded from. That should give you some clue as to what went wrong.
 
Siva Vulchi
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes. I do not have any additional artifacts to be deployed.

Edit the run.conf (or run.conf.bat) file to add "-verbose:class" to the JAVA_OPTS and restart the app server. This option causes the JVM to print the location of the JAR file for each class loaded. This generates a lot of output to be sure to redirect stdout and stderr to a file. Then look through the file to see where javax.xml.parsers.DocumentBuilderFactory and oracle.xml.jaxp.JXDocumentBuilderFactory are being loaded from. That should give you some clue as to what went wrong.



Thanks for this good option!!! I will look for the clue with this.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic