Loading...
понеділок, 13 січня 2014 р.

jBoss: Failed to create a new SAX parser

01:00:50,876 ERROR [JBossContextConfig] XML error parsing: context.xml
org.jboss.xb.binding.JBossXBRuntimeException: Failed to create a new SAX parser
blah-blah-blah...

Getting errors like this?

The reason is you have used xerces somewhere in your application (or just it is listed somewhere in dependencies). Check your WEB-INF/lib folder for xercesImpl jar. Here it is!
But how to avoid this jBoss error? One may advice removing xercers from your application, but this is not very nice solution.
Just create file named jboss-classloading.xml in your application WEB-INF folder. This will override the default class loading stuff. Than fill that file with the following:
<classloading xmlns="urn:jboss:classloading:1.0" name="mywar.war"  domain="mywar_domain">
          parent-domain="Ignored"
          export-all="NON_EMPTY"
          import-all="true">
</classloading>
Use EXACTLY this values (I mean don't replace mywar with your *.WAR file's name)
Worked for me and JBoss 5.1

0 коментарі:

 
TOP