1
votes

I have moved from Glassfish v2.1 to Glasfiss 3.1.2.2. I had several web applications (WARs) deployed and running in Glassfish v2.1, but I have problems with the deployment of some of them in Glassfish v3.1.2.2.

When I try to deploy a WAR file in Gfv3, I always get a ClassNotFoundException related to the libraries defined in web.xml descriptor, such as:

<listener>
    <listener-class>org.directwebremoting.servlet.DwrListener
    </listener-class>
</listener>

or

    <init-param>
        <param-name>javax.xml.parsers.DocumentBuilderFactory</param-name>
        <param-value> com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl
        </param-value>
    </init-param>

These libraries are contained in web-app WEB-INF/lib directory. If I copy them to domains/domain1/lib folder in Glassfish installation, the problem dissapear and I can deploy the web-apps rightly. But I cannot use this approach, I need that each web-app use its own libraries.

Does anyone know what can be the problem?

Thanks in advance!

1
Are the jar files in proper place in your war file? (/WEB-INF/lib/)? - gaborsch
This is known to work in GlassFish 3.1.x, so I would double-check that the library jars are in WEB-INF/lib and also that they really do contain the classes named in your web.xml. Don't just look at your build configuration; extract the library .jars from the .war and look for the expected .class file in each library .jar. - VGR

1 Answers

0
votes

The problem was that my Web Application had 2 descriptor files: one web.xml and one sun-web.xml (for compatibility isues).

I removed sun-web.xml and the problem dissapeared. I could deploy the WAR without the problem related before.

Thanks for your answers.