Solved: Digester.getParser: org.xml.sax. SAXNotRecognizedException: http://apache.org/xml/features/validation/dynamic
Posted in Java, programming on 06/03/2009 04:08 am by ashluxI ran into a nice little problem trying to get richfaces deployed on Oracle’s OC4J:
Digester.getParser:
org.xml.sax.SAXNotRecognizedException: http://apache.org/xml/features/validation/dynamic
at oracle.xml.jaxp.JXSAXParserFactory.setFeature(JXSAXParserFactory.java:128)
at org.apache.commons.digester.parser.XercesParser.configureXerces(XercesParser.java:185)
at org.apache.commons.digester.parser.XercesParser.newSAXParser(XercesParser.java:138)
... snip ...
From a little bit of googling, I found several people running into this problem or something very similar. Frustratingly, not a whole lot of solutions. One solution that did not work (but was confirmed by some to do the trick) was to run the OC4J standalone server with the following parameters:
-Dbootclasspath:/somepath/xerces-2.6.2.jar -Dorg.xml.sax.driver=org.apache.xerces.parsers.SAXParser -Djavax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactoryImpl -Djavax.xml.parsers.TransformerFactory=org.apache.xalan.processor.TransformerFactoryImpl -Djavax.xml.transform.TransformerFactory=org.apache.xalan.processor.TransformerFactoryImpl
Luckily a co-worker (who is waaaaaaay to humble for his own good and won’t let me use his name here) figured out that adding the following to orion-application.xml does the trick:
<orion-application> <imported-shared-libraries> <remove-inherited name="oracle.xml"/> <remove-inherited name="oracle.xml.security"/> <remove-inherited name="oracle.toplink"/> </imported-shared-libraries> </orion-application>
Oracle has details on what the above does in their documentation on utilizing the OC4J class loading framework. Good luck reading that, it looks terribly boring.






