[GIS] Deploying Geoserver 2.5 using JBoss 7.1.1

deploymentgeoserverjboss

I have geoserver deployed in tomcat Web container and i like to move the geoserver into JBOSS is it possible to deploy 'geoserver folder' directly to JBOSS??

I tried to deploy geoserver 2.5 war file under JBOSS 7.1.1 in windows XP, But when i try to enable it in JBoss management / deployment section following is the response am getting

enter image description here

and I also getting the following error in error console

Unknown error
Unexpected HTTP response: 500
Request
{
"address" => [("deployment" => "geoserver.war")],
"operation" => "deploy"
}

Response

Internal Server Error
{
"outcome" => "failed",
"failure-description" => {"JBAS014671: Failed services" =>     "jboss.deployment.unit.\"geoserver.war\".STRUCTURE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"geoserver.war\".STRUCTURE: Failed to process phase STRUCTURE of deployment \"geoserver.war\""}},
"rolled-back" => true
}

Best Answer

You should specify which JBoss version; for JBoss 7, check this thread in jboss community forum

In few words:

1. Add wo geoserver.war/WEB-INF the following xml

jboss-classloading.xml

<classloading xmlns="urn:jboss:classloading:1.0" 
    name="geoserver.war" 
    domain="GeoServerDomain" 
    export-all="NON_EMPTY" 
    import-all="true">
</classloading>

jboss-deployment-structure.xml

<?xml version="1.0" encoding="UTF-8"?>
    <jboss-deployment-structure> 
     <deployment>
       <exclusions>
        <module name="org.slf4j" />
        <module name="org.apache.log4j" />
        <module name="org.jboss.logging" />
        <module name="org.apache.commons.logging" />
        <module name="org.jboss.logging.jul-to-slf4j-stub" />
       </exclusions>
     <dependencies>   
       <system>
        <paths>
         <path name="com/sun/imageio/spi"/>
         <path name="com/sun/imageio/plugins/common"/>
        </paths>
       </system>
      </dependencies>
     </deployment>    

Then, you have to add some jdk class to the sun.jdk module by editing JBOSS_HOME/modules/sun/jdk/main/module.xml, this is mine:

<module xmlns="urn:jboss:module:1.1" name="sun.jdk">
<resources>
    <!-- currently jboss modules has not way of importing services from
    classes.jar so we duplicate them here -->
    <resource-root path="service-loader-resources"/>
</resources>
<dependencies>
    <system export="true">
        <paths>
            <path name="com/sun/script/javascript"/>
            <path name="com/sun/jndi/dns"/>
            <path name="com/sun/jndi/ldap"/>
            <path name="com/sun/jndi/url"/>
            <path name="com/sun/jndi/url/dns"/>
            <path name="com/sun/security/auth"/>
            <path name="com/sun/security/auth/login"/>
            <path name="com/sun/security/auth/module"/>
            <path name="sun/misc"/>
            <path name="sun/io"/>
            <path name="sun/nio"/>
            <path name="sun/nio/ch"/>
            <path name="sun/security"/>
            <path name="sun/security/krb5"/>
            <path name="sun/util"/>
            <path name="sun/util/calendar"/>
            <path name="sun/util/locale"/>
            <path name="sun/security/provider"/>
            <path name="META-INF/services"/>
        </paths>
        <exports>
            <include-set>
                <path name="META-INF/services"/>
            </include-set>
        </exports>
    </system>
</dependencies>
</module>
Related Question