Thursday, February 11, 2010

Upgrading to JBoss 5 - JBossXBRuntimeException: White spaces are required between publicId and systemId

I have a WAR file that deploys and starts fine in JBoss 4. When I deploy it to JBoss 5 though, deployment fails with approximately this stack-trace:



Directly above that trace, I notice that it's trying to resolve a bunch of Spring schemas. In particular:



A grep of my project tells me that that schema is referenced in only in my applicationContext-hibernate.xml. According to this post (), the error occurs because JBoss is attempting to validate that file, but fails for some as yet undetermined reason. The current solution is to move applicationContext-hibernate.xml to a sub-folder, on the classpath, below WEB-INF (ie. WEB-INF/classes/applicationContext-hibernate.xml). Make sure you update all of your references to applicationContext-hibernate.xml including the command that builds your WAR.

No comments: