Friday, February 12, 2010

Loader constraint violation when trying to generate an AXIS WSDL.

I've got an RPC style web service implemented using Apache AXIS. It was developed using JBoss 4, but when I deployed it on JBoss 5, I got this nasty error:

There seems to be a conflict between axis-jaxrpc*.jar and JbossWS. Both of them contain definitions for the QName class.

The solution? When using JBoss 5, exclude axis-jaxrpc*.jar from your WAR files.

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.