• 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

three day headache - ClassCastException

 
Ranch Hand
Posts: 399
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I'm new to JBoss, and till now only I've used Tomcat.
However I wanted to deploy some application on JBoss, which I've previously deployed successfully on Tomcat.
The simple servlet/Jsp based application, I can engage on IBoss.
But any of my other application, inside what I use additional technologies like:
Struts2, Hibernate 3, String 2x, which also successfully were deployed on Tomcat, cannot be engaged on JBoss.
The exception I get is :





However, if I remove Xerces.jar from my application's lib directory, and redeploy application, I get little changed exception :



I would appreciate if someone indicate at problem solution... Thanks
 
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
I'm guessing that your app contains a JAR file containing javax.xml.parsers.DocumentBuilderFactory. Please list the contents of your WAR file (use "jar -tf xxx.war")
 
Goran Markovic
Ranch Hand
Posts: 399
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I founded that it's an issue about class loading. The classes which my application use have been already loaded by application level classloader.
I try to exclude some files potentially loaded by an application classloader, and it's work. However, some of excluded classes was crucial for engaging some parts of application.
Then I try to 'fine grain' what libraries are used by application loader, and what libraries are not, so the later one will be present in my application. After such a selection, sever was start at all. I figure out that I need to perform isolated classloading. There is a n article on JBoss community forum, but I still cannot perform such an isolation so only libraries stored in my application/lib, to be used?! Even I do not that solution, The also good one will be if someone explain me either how to use libraries of JBoss, but not to be in conflict with unique application libraries?
 
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
This will be a good start http://www.jboss.org/community/docs/DOC-9287
 
Goran Markovic
Ranch Hand
Posts: 399
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, I read it by probably I didn't figure out at right way. As I understand, to make isolated class loading (to constrain loading of applications libraries) I should make this elemnts in jboss-web.xml, file, place it in the WEB-INF/ directorium of my web application, and than make .war file, which will be deployed.
This is the content of jboss-web.xml file :


Is it ok? Also I'm in doubt, what need to stay here

where test.war is the name of war.In the article you post here says :


Please, correct me in my mistakes ...
 
Goran Markovic
Ranch Hand
Posts: 399
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have done everything I could found from either books, or jboss specification, or from any place on net, and it still wot work. I've configured server.xml file to use isolated lcass loading, and also make modification in jboss-web.xml file to perform isolated classs loading but it wont!?!?
This is the content of mentioned files:


and



and this is all configuration I could fined on mentioned locations and it wont work. I would really appreciate HELP!?
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic