users@glassfish.java.net

ClassNotFoundException: |CONFIG_LISTEN_CLASS|

From: Rodrigo Poblanno Balp <balpo_at_gmx.net>
Date: Mon, 06 Aug 2007 13:46:44 -0500

I set up a very simple JSF application using glassfish. When I point my
browser to the context I get the 404 message:

The requested resource () is not available.

And in the logs I get the message:
------------------------------------
[#|2007-08-06T03:10:24.321-0500|SEVERE|sun-appserver-pe9.0|javax.enterprise.system.container.web|_ThreadID=18;_ThreadName=Thread-34;_RequestID=09a10456-db1d-4126-931b-2784222a6c7b;|WebModule[/jsfia]Error


configuring application listener of class |CONFIG_LISTEN_CLASS|
java.lang.ClassNotFoundException: |CONFIG_LISTEN_CLASS|
    at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1511)
    at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1292)
    at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4181)
    at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4760)
    at com.sun.enterprise.web.WebModule.start(WebModule.java:292)
    at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:833)
    at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:817)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:662)
    at
com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1479)
    at
com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1143)
    ...
------------------------------------
I assume there's some variable that's not being properly interpreted,
thus the loader doesn't find it.


My application is very simple.
/
|___index.html
|___index.jsp
|___login.jsp
|___WEB-INF
      |___web.xml
      |___faces-config.xml
      |___sun-web.xml

web.xml contains:
------------------------------------
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5">
    <display-name>Draft</display-name>
    <description>Draft</description>
    <servlet>
        <servlet-name>Faces Servlet</servlet-name>
        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
        <servlet-name>Faces Servlet</servlet-name>
        <url-pattern>/faces/*</url-pattern>
    </servlet-mapping>
    <jsp-config>
        <taglib>
            <taglib-uri>http://java.sun.com/jsf/html</taglib-uri>
            <taglib-location>/WEB-INF/html_basic.tld</taglib-location>
        </taglib>
        <taglib>
            <taglib-uri>http://java.sun.com/jsf/core</taglib-uri>
            <taglib-location>/WEB-INF/jsf_core.tld</taglib-location>
        </taglib>
    </jsp-config>
    <welcome-file-list>
        <welcome-file>index.html</welcome-file>
    </welcome-file-list>
</web-app>

------------------------------------
faces-config.xml:
------------------------------------
<?xml version='1.0' encoding='UTF-8'?>
<faces-config xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd" version="1.2">
    <application>
        <message-bundle>CustomMessages</message-bundle>
        <locale-config>
            <default-locale>en</default-locale>
            <supported-locale>en</supported-locale>
            <supported-locale>es</supported-locale>
        </locale-config>
    </application>
    <navigation-rule>
        <description>Login page</description>
        <display-name>Login page</display-name>
        <from-view-id>/login.jsp</from-view-id>
        <navigation-case>
            <from-outcome>success</from-outcome>
            <to-view-id>/other.jsp</to-view-id>
        </navigation-case>
        <navigation-case>
            <from-outcome>failure</from-outcome>
            <to-view-id>/login.jsp</to-view-id>
        </navigation-case>
    </navigation-rule>
</faces-config>
------------------------------------
and sun-web.xml:
------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application
Server 8.1 Servlet 2.4//EN"
"http://www.sun.com/software/dtd/appserver/sun-web-app_2_4-1.dtd">
<sun-web-app>
    <context-root>/draft</context-root>
</sun-web-app>
------------------------------------

Then I generate a .war file following the structure already shown using
the admin console. Deploying the war file from the 'Web Applications'
section.
It does not show any error messages, but when I try to access the app, I
get the "The requested resource () is not available." message.

What could the problem be?

Thanx to you all in advance.