Problem:
- Product: BAS 6.6
- Patches: All
- OS: All
When you deploy your application and restart your partition, you might be getting "java.lang.ClassCastException: org.apache.xerces.jaxp.SAXParserFactoryImpl" exception similar to the following:
2008-09-29 12:30:41,096 ERROR - Digester.getParser:
java.lang.ClassCastException: org.apache.xerces.jaxp.SAXParserFactoryImpl
at javax.xml.parsers.SAXParserFactory.newInstance(SAXParserFactory.java:107)
at org.apache.tomcat.util.digester.Digester.getFactory(Digester.java:486)
at org.apache.tomcat.util.digester.Digester.getParser(Digester.java:691)
at org.apache.tomcat.util.digester.Digester.getXMLReader(Digester.java:899)
at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1561)
at org.apache.catalina.startup.ContextConfig.processDefaultWebConfig(ContextConfig.java:726)
Root Cause:
The "java.lang.ClassCastException" is happening because there are two jar or class files loading at two places.The exact class that is in conflict is org.apache.xerces.jaxp.SAXParserFactoryImpl. This is found in the file xercesImpl.jar (provided by the application server and located in /lib) and is loaded by the application server's Tomcat web container when started.
Resolution:
To resove this issue, set the system.classload.prefixes property in the partition configuration to include the following packages:
- javax.xml.parsers
- org.xml.sax
- org.w3c.dom
The steps are as follows:
------------------------
(1) Go to \\var\\domains\\base\\configurations\\\\mos\\\\adm\\properties
(2) Edit the file partition.xml
(3) Include the 3 packages mentioned above in the system.classload.prefixes property (eg. )
(4) Restart the partition.
#xerces
#VisiBroker
#Security
#ClassCastException