GeoServer and JBoss 5.x
When deploying geoserver.war an a new installation of JBoss AS 5.x, most probably you will get an error caused by a conflict on the Xerces configuration classes.
java.lang.ClassCastException: org.apache.xerces.parsers.XML11Configuration cannot be cast to org.apache.xerces.xni.parser.XMLParserConfiguration
The error basically depends by the ClassLoader error which tries to instantiate the GeoServer XML parsing libraries by using the JBoss xerces interfaces instead.
A possible quick solution to avoid the conflict and allowing GeoServer working fine on JBoss is to isolate the WAR classloading by performing the following steps:
1> Isolate the WAR; you have two ways to do that:
- Editing the file \jboss-5.1.0.GA\server\default\deployers\jbossweb.deployer\META-INF\war-deployers-jboss-beans.xml and commenting the WarClassLoaderDeployer bean definition.
- Creating a specific classloading definition file for theGeoServer WAR by putting the file jboss-classloading.xml defined as below into the geoserver.war/WEB-INF directory.
2> Remove xalan and xerces jars from geoserver.war/WEB-INF/lib directory.
We have tried these instructions briefly on windows and linux with JBoss AS 5.0 and 5.1. Please, notice that we are still experimenting with JBoss 5.x due to the large amount of changes from JBoss 4.2.x which is our stadard version. Please, let us know if you experience problems following the steps on this post.
It is worth to point out that GeoSolutions strongly believes in JBoss as the base building block for a “real” Enterprise SDI. We have extensive epxerience with JBoss 4.2.x and 4.0.x and we are experimenting with JBOss 5.1 which is JEE5 compliant. We have been developing custom JBoss services to manage GeoServer and to allow data ingestion via FTP and SOAP-MTOM.
In case you need help customizing GeoServer for production use in JBoss feel free to ask our help, we’ll work hard to help you reach your goals.