Deal All:
I have some classes to deal with XML using Castor which are packaged into EJB jar lib.And i have put Castor.jar and xercesImpl.jar into WEB-INFO/lib.
But when EJB call my pojo to access Castor library,it will raise java.lang.RuntimeException: Could not instantiate parser org.apache.xerces.parsers.SAXParser: java.lang.ClassCastException: org.apache.xerces.parsers.XML11Configuration at following code:
mapping.loadMapping(new InputSource(mappingIn));where mapping is instance of Mapping class in Castor libarary.
Anyone can tell me how to resolve this problem?Is it class loading issue or conflict with JBoss library?
Thanks!
Kingofhawks
Try to use parsers libriaries from ${jboss_home}/lib/endorsed.