Question: I'm trying to deploy geoserver.war (2.2.1) on JBoss-AS 7.1.1-Final.

The log is uploaded to [Pastebin](http://pastebin.com/JE0kQxdJ), it's better readable there.

Beside two CNFE

* 07:23:51 java.lang.NoClassDefFoundError: com/sun/imageio/spi/FileImageOutputStreamSpi
* 07:24:01 java.lang.NoClassDefFoundError: com/sun/imageio/spi/FileImageOutputStreamSpi

I assume the main reason for failing is here

```
07:23:58,357 ERROR [org.apache.catalina.core.StandardContext]
                   (MSC service thread 1-6) Error listenerStart
07:23:58,357 ERROR [org.apache.catalina.core.StandardContext]
                   (MSC service thread 1-6) Context [/geoserver] startup failed due
                   to previous errors 

```

Unfortunately I cannot identify any significant errors beside the CNFE and the `Error listenerStart`.

Answer: 
I don't want to give a link-only reply, but this thread in the JBoss forums seems to describe the exact same problem, with solution:

<https://community.jboss.org/thread/177472>

I quote:

"I found that if I added

```
<path name="com/sun/imageio/spi"/>

```

to the module.xml file in the modules/sun/jdk/main directory then the ClassNotFoundException goes away."

Google: "classnotfound FileImageOutputStreamSpi"
An alternative is creating the file `jboss-deployment-structure.xml` geoserver.war/WEB-INF with the following content:

```
<?xml version="1.0" encoding="UTF-8"?>
<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.1">
  <deployment>
    <dependencies>
        <system>
            <paths>
                <path name="com/sun/imageio/spi"/>
                <path name="com/sun/imageio/plugins/common"/>
            </paths>
        </system>
    </dependencies>
  </deployment>
</jboss-deployment-structure>

```