When i try to upload the geoserver.war file through apache tomcat and then deploying by clicking on Deploy …..deployment failed
GeoServer – Deploying geoserver.war through Apache Tomcat
deploymentgeoservertomcat
Related Solutions
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>
The real cause of the issue is the max-file-size limit in WEB-INF/web.xml. It is set for 50MB while the geoserver.war (version 2.9.0) is over 65MB.
Open the file below for tomcat7: sudo nano /usr/share/tomcat7-admin/manager/WEB-INF/web.xml
Locate multipart-config tag and turn 50MB to 500MB.
Best Answer
I believe that is a problem of the filesize of the WAR file of geoserver.
At default tomcat only accepts 50MB in the WAR files to upload, open with notepad the file:
C:\Program Files (x86)\Apache Software Foundation\Tomcat 9.0\webapps\manager\WEB-INF\web.xml
and find the lines with the text:
<max-file-size>
and<max-request-size>
.Increase that value, for example:
Restart tomcat and try again.
Regards...