You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by di...@petrobras.com.br on 2007/12/20 12:51:06 UTC

Bug using tomcat 6 and myfaces 1.2

I have a problem when i try to deploy this happens

======================================================================================================================================================
20/12/2007 09:19:55 org.apache.catalina.core.AprLifecycleListener init
INFO: The Apache Tomcat Native library which allows optimal performance in
production environments was not found on the java.library.path: C:\Arquivos
de programas\Java\jdk1.5.0
_01\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\Arquivos de
programas\Java\jdk1.5.0_01\bin\..\jre\bin\client;C:\Arquivos de
programas\Java\jdk1.5.0_01\bin\..\jre\bin;C:\Arquivos de
programas\Java\jdk1.5.0_01\bin;D:\oracle\ora92\bin;C:\Arquivos de
programas\Oracle\jre\1.3.1\bin;C:\Arquivos de programas\Oracle\jre\1.1.8
\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Arquivos de
programas\Arquivos comuns\Autodesk Shared\;C:\Arquivos de
programas\Autodesk\DWG TrueView\;C:\Arquivos de
programas\Rational\common;C:\Arquivos de
programas\Rational\ClearCase\bin;D:\dev\CVSNT\
20/12/2007 09:19:56 org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
20/12/2007 09:19:56 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 871 ms
20/12/2007 09:19:56 org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
20/12/2007 09:19:56 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.14
log4j:WARN No appenders could be found for logger
(org.apache.myfaces.shared_impl.webapp.webxml.WebXmlParser).
log4j:WARN Please initialize the log4j system properly.
20/12/2007 09:20:10 org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
20/12/2007 09:20:19 org.apache.catalina.core.ApplicationContext log
SEVERE: StandardWrapper.Throwable
java.lang.IllegalStateException: No Factories configured for this
Application. This happens if the faces-initialization does not work at all
- make sure that you properly include all configuration settings necessary
for a basic faces application and that all the necessary libs are included.
Also check the logging output of your web application and your container
for any exceptions!
If you did that and find nothing, the mistake might be due to the fact that
you use some special web-containers which do not support registering
context-listeners via TLD files and a context listener is not setup in your
web.xml.
A typical config looks like this;
<listener>

<listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
</listener>

      at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:90)
      at javax.faces.webapp.FacesServlet.init(FacesServlet.java:88)
      at org.apache.catalina.core.StandardWrapper.loadServlet(
StandardWrapper.java:1161)
      at org.apache.catalina.core.StandardWrapper.load(
StandardWrapper.java:981)
      at org.apache.catalina.core.StandardContext.loadOnStartup(
StandardContext.java:4045)
      at org.apache.catalina.core.StandardContext.start(
StandardContext.java:4351)
      at org.apache.catalina.core.ContainerBase.start(
ContainerBase.java:1045)
      at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
      at org.apache.catalina.core.ContainerBase.start(
ContainerBase.java:1045)
      at org.apache.catalina.core.StandardEngine.start(
StandardEngine.java:443)
      at org.apache.catalina.core.StandardService.start(
StandardService.java:516)
      at org.apache.catalina.core.StandardServer.start(
StandardServer.java:710)
      at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(
NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
      at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
20/12/2007 09:20:19 org.apache.catalina.core.StandardContext loadOnStartup
SEVERE: Servlet /sigea threw load() exception
java.lang.IllegalStateException: No Factories configured for this
Application. This happens if the faces-initialization does not work at all
- make sure that you properly include all configuration settings necessary
for a basic faces application and that all the necessary libs are included.
Also check the logging output of your web application and your container
for any exceptions!
If you did that and find nothing, the mistake might be due to the fact that
you use some special web-containers which do not support registering
context-listeners via TLD files and a context listener is not setup in your
web.xml.
A typical config looks like this;
<listener>

<listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
</listener>

      at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:90)
      at javax.faces.webapp.FacesServlet.init(FacesServlet.java:88)
      at org.apache.catalina.core.StandardWrapper.loadServlet(
StandardWrapper.java:1161)
      at org.apache.catalina.core.StandardWrapper.load(
StandardWrapper.java:981)
      at org.apache.catalina.core.StandardContext.loadOnStartup(
StandardContext.java:4045)
      at org.apache.catalina.core.StandardContext.start(
StandardContext.java:4351)
      at org.apache.catalina.core.ContainerBase.start(
ContainerBase.java:1045)
      at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
      at org.apache.catalina.core.ContainerBase.start(
ContainerBase.java:1045)
      at org.apache.catalina.core.StandardEngine.start(
StandardEngine.java:443)
      at org.apache.catalina.core.StandardService.start(
StandardService.java:516)
      at org.apache.catalina.core.StandardServer.start(
StandardServer.java:710)
      at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(
NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
      at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
20/12/2007 09:20:19 org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
20/12/2007 09:20:19 org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
20/12/2007 09:20:19 org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/62  config=null
20/12/2007 09:20:19 org.apache.catalina.startup.Catalina start
INFO: Server startup in 23815 ms

======================================================================================================================================================

Debugging i find out that  _registeredFactoryNames  is empty
and i notice this in one class
//TODO: null-check for Weblogic, that tries to initialize Servlet before
ContextListener
following goes my web.xml and faces
=====================================================================================================================================================
/*
 * Copyright 2004 The Apache Software Foundation.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package javax.faces;


import javax.faces.application.ApplicationFactory;
import javax.faces.context.FacesContextFactory;
import javax.faces.lifecycle.LifecycleFactory;
import javax.faces.render.RenderKitFactory;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.util.*;

/**
 * see Javadoc of <a
href="http://java.sun.com/javaee/javaserverfaces/1.2/docs/api/index.html">JSF
 Specification</a>
 *
 * @author Manfred Geiler (latest modification by $Author: mbr $)
 * @version $Revision: 512227 $ $Date: 2007-02-27 13:25:16 +0100 (Di, 27
Feb 2007) $
 */
public final class FactoryFinder
{
    public static final String APPLICATION_FACTORY =
"javax.faces.application.ApplicationFactory";
    public static final String FACES_CONTEXT_FACTORY =
"javax.faces.context.FacesContextFactory";
    public static final String LIFECYCLE_FACTORY =
"javax.faces.lifecycle.LifecycleFactory";
    public static final String RENDER_KIT_FACTORY =
"javax.faces.render.RenderKitFactory";

    private static Map<ClassLoader, Map> _registeredFactoryNames = new
HashMap<ClassLoader, Map>();
    /**
     * Maps from classLoader to another map, the container (i.e. Tomcat)
will create a class loader for
     * each web app that it controls (typically anyway) and that class
loader is used as the key.
     *
     * The secondary map maps the factory name (i.e.
FactoryFinder.APPLICATION_FACTORY) to actual instances
     * that are created via getFactory. The instances will be of the class
specified in the setFactory method
     * for the factory name, i.e.
FactoryFinder.setFactory(FactoryFinder.APPLICATION_FACTORY,
MyFactory.class).
     */
    private static Map<ClassLoader, Map> _factories = new
HashMap<ClassLoader, Map>();

    private static final Set<String> VALID_FACTORY_NAMES = new
HashSet<String>();
    private static final Map<String, Class> ABSTRACT_FACTORY_CLASSES = new
HashMap<String, Class>();
    static {
        VALID_FACTORY_NAMES.add(APPLICATION_FACTORY);
        VALID_FACTORY_NAMES.add(FACES_CONTEXT_FACTORY);
        VALID_FACTORY_NAMES.add(LIFECYCLE_FACTORY);
        VALID_FACTORY_NAMES.add(RENDER_KIT_FACTORY);

        ABSTRACT_FACTORY_CLASSES.put(APPLICATION_FACTORY,
ApplicationFactory.class);
        ABSTRACT_FACTORY_CLASSES.put(FACES_CONTEXT_FACTORY,
FacesContextFactory.class);
        ABSTRACT_FACTORY_CLASSES.put(LIFECYCLE_FACTORY,
LifecycleFactory.class);
        ABSTRACT_FACTORY_CLASSES.put(RENDER_KIT_FACTORY,
RenderKitFactory.class);
    }


  // avoid instantiation
  FactoryFinder() {
  }

  public static Object getFactory(String factoryName)
            throws FacesException
    {
        if(factoryName == null)
            throw new NullPointerException("factoryName may not be null");

        ClassLoader classLoader = getClassLoader();
        Map factoryClassNames = _registeredFactoryNames.get(classLoader);

        if (factoryClassNames == null)
        {
            String message = "No Factories configured for this Application.
This happens if the faces-initialization "+
            "does not work at all - make sure that you properly include all
configuration settings necessary for a basic faces application " +
            "and that all the necessary libs are included. Also check the
logging output of your web application and your container for any
exceptions!" +
            "\nIf you did that and find nothing, the mistake might be due
to the fact that you use some special web-containers which "+
            "do not support registering context-listeners via TLD files and
" +
            "a context listener is not setup in your web.xml.\n" +
            "A typical config looks like this;\n<listener>\n" +
            "
<listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>\n"
 +
            "</listener>\n";
            throw new IllegalStateException(message);
        }

        if (! factoryClassNames.containsKey(factoryName)) {
            throw new IllegalArgumentException("no factory " + factoryName
+ " configured for this application.");
        }

        Map<String, Object> factoryMap = _factories.get(classLoader);

        if (factoryMap == null) {
            factoryMap = new HashMap<String, Object>();
            _factories.put(classLoader, factoryMap);
        }
        Object factory = factoryMap.get(factoryName);

        if (factory == null) {
            List classNames = (List) factoryClassNames.get(factoryName);
            factory =
newFactoryInstance(ABSTRACT_FACTORY_CLASSES.get(factoryName),
classNames.iterator(), classLoader);
            factoryMap.put(factoryName, factory);
        }
        return factory;
    }


    private static Object newFactoryInstance(Class interfaceClass, Iterator
classNamesIterator, ClassLoader classLoader)
    {
        try
        {
            Object current = null;

            while (classNamesIterator.hasNext())
            {
                String implClassName = (String) classNamesIterator.next();
                Class implClass = classLoader.loadClass(implClassName);

                // check, if class is of expected interface type
                if (!interfaceClass.isAssignableFrom(implClass))
                {
                    throw new IllegalArgumentException("Class " +
implClassName + " is no " + interfaceClass.getName());
                }

                if (current == null)
                {
                    // nothing to decorate
                    current = implClass.newInstance();
                } else
                {
                    // let's check if class supports the decorator pattern
                    try
                    {
                        Constructor delegationConstructor =
implClass.getConstructor(new Class[]{interfaceClass});
                        // impl class supports decorator pattern,
                        try
                        {
                            // create new decorator wrapping current
                            current = delegationConstructor.newInstance(new
Object[]{current});
                        } catch (InstantiationException e)
                        {
                            throw new FacesException(e);
                        } catch (IllegalAccessException e)
                        {
                            throw new FacesException(e);
                        } catch (InvocationTargetException e)
                        {
                            throw new FacesException(e);
                        }
                    } catch (NoSuchMethodException e)
                    {
                        // no decorator pattern support
                        current = implClass.newInstance();
                    }
                }
            }

            return current;
        } catch (ClassNotFoundException e)
        {
            throw new FacesException(e);
        } catch (InstantiationException e)
        {
            throw new FacesException(e);
        } catch (IllegalAccessException e)
        {
            throw new FacesException(e);
        }
    }


    public static void setFactory(String factoryName,
                                  String implName)
    {
        checkFactoryName(factoryName);

        ClassLoader classLoader = getClassLoader();
        synchronized(_registeredFactoryNames)
        {
            Map factories = _factories.get(classLoader);

            if (factories != null && factories.containsKey(factoryName)) {
                // Javadoc says ... This method has no effect if
getFactory() has already been
                // called looking for a factory for this factoryName.
                return;
            }

            Map<String, List> factoryClassNames =
_registeredFactoryNames.get(classLoader);

            if (factoryClassNames == null)
            {
                factoryClassNames = new HashMap<String, List>();
                _registeredFactoryNames.put(classLoader,
factoryClassNames);
            }

            List<String> classNameList =
factoryClassNames.get(factoryName);

            if (classNameList == null) {
                classNameList = new ArrayList<String>();
                factoryClassNames.put(factoryName, classNameList);
            }
            classNameList.add(implName);
        }
    }


    public static void releaseFactories()
            throws FacesException
    {
        ClassLoader classLoader = getClassLoader();
        _factories.remove(classLoader);
    }

    private static void checkFactoryName(String factoryName)
    {
        if (! VALID_FACTORY_NAMES.contains(factoryName)) {
            throw new IllegalArgumentException("factoryName '" +
factoryName + "'");
        }
    }


    private static ClassLoader getClassLoader()
    {
        try
        {
            ClassLoader classLoader =
Thread.currentThread().getContextClassLoader();
            if (classLoader == null)
            {
                throw new FacesException("web application class loader
cannot be identified", null);
            }
            return classLoader;
        }
        catch (Exception e)
        {
            throw new FacesException("web application class loader cannot
be identified", e);
        }
    }
}
=====================================================================================================================================================
<?xml version="1.0" encoding="UTF-8"?>

<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
    version="2.4">

  <display-name>Fwj - Framework Web Java</display-name>

      <!-- ============================================ -->
      <!-- CONFIGURACOES DA APLICACAO                   -->
      <!-- ============================================ -->
      <welcome-file-list>
      <welcome-file>/index.jsp</welcome-file>
      </welcome-file-list>

    <context-param>
        <param-name>javax.faces.CONFIG_FILES</param-name>
        <param-value>
            /WEB-INF/conf/fwj_faces-config.xml
        </param-value>
    </context-param>

      <!-- ============================================ -->
      <!-- TAG LIBS UTILIZADAS PELO FRAMEWORK           -->
      <!-- ============================================ -->
      <jsp-config>
            <taglib>
                  <taglib-uri>jstl_core</taglib-uri>
                  <taglib-location>/WEB-INF/tags/jstl/c.tld</
taglib-location>
            </taglib>
            <taglib>
                  <taglib-uri>jstl_fmt</taglib-uri>
                  <taglib-location>/WEB-INF/tags/jstl/fmt.tld</
taglib-location>
            </taglib>
      </jsp-config>

      <!-- ============================================ -->
      <!-- SETA O LOCALE NO CONTEXTO JSF: O LOCALE      -->
      <!-- SERA RECEBIDO COMO PARAMETRO                 -->
      <!-- ============================================ -->
<!--
=============================================================================================
 -->
      <filter>
          <filter-name>fwjUserLocaleFilter</filter-name>
      <filter-class>br.com.petrobras.fwj.web.filter.FwjUserLocaleFilter</
filter-class>
      </filter>
      <filter-mapping>
      <filter-name>fwjUserLocaleFilter</filter-name>
      <url-pattern>/index.jsp</url-pattern>
      </filter-mapping>
<!--
=============================================================================================
 -->
      <!-- ============================================ -->
      <!-- CASO A SESSAO TENHA EXPIRADO, REDIRECIONA    -->
      <!-- PARA A PAGINA DE LOGIN                       -->
      <!-- ============================================ -->
<!--
=============================================================================================
 -->
      <filter>
      <filter-name>fwjSessionCheckFilter</filter-name>
      <filter-class>br.com.petrobras.fwj.web.filter.FwjSessionCheckFilter</
filter-class>
      </filter>
      <filter-mapping>
      <filter-name>fwjSessionCheckFilter</filter-name>
      <url-pattern>/paginas/*</url-pattern>
      </filter-mapping>
<!--
=============================================================================================
 -->
      <!-- ============================================ -->
      <!-- FILTRO PARA EXTENDER OS COMPONENTES VISUAIS  -->
      <!-- DO TOBAGO                                    -->
      <!-- ============================================ -->
<!--
=============================================================================================
 -->
      <filter>
            <filter-name>fwjPaginaFilter</filter-name>
            <filter-class>
br.com.petrobras.sigea.ext.web.filter.PaginaFilter</filter-class>
            <init-param>
                  <param-name>encoding</param-name>
                  <param-value>ISO-8859-1</param-value>
            </init-param>
      </filter>
    <filter-mapping>
      <filter-name>fwjPaginaFilter</filter-name>
          <url-pattern>/paginas/view/*</url-pattern>
      </filter-mapping>
<!--
=============================================================================================
 -->

      <!-- ============================================ -->
      <!-- SERVLET DE AUTENTICACAO                      -->
      <!-- ============================================ -->
 <!--
=============================================================================================
 -->
      <servlet>
      <servlet-name>fwjAutenticacaoServlet</servlet-name>
      <servlet-class>
br.com.petrobras.fwj.web.servlet.FwjAutenticacaoServlet</servlet-class>
      </servlet>
      <servlet-mapping>
      <servlet-name>fwjAutenticacaoServlet</servlet-name>
            <url-pattern>/fwjAutenticacaoServlet</url-pattern>
      </servlet-mapping>
 <!--
=============================================================================================
 -->
 <!-- ============================================ -->
 <!-- CONFIGURACOES DO TOBAGO                      -->
 <!-- ============================================ -->
      <servlet>
      <servlet-name>FacesServlet</servlet-name>
      <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
      <load-on-startup>5</load-on-startup>
      </servlet>
      <servlet-mapping>
      <servlet-name>FacesServlet</servlet-name>
            <url-pattern>/paginas/*</url-pattern>
      </servlet-mapping>
 <!--
=============================================================================================
 -->
      <context-param>
        <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
        <param-value>server</param-value>
    </context-param>

    <context-param>
        <param-name>net.sourceforge.myfaces.PRETTY_HTML</param-name>
        <param-value>true</param-value>
    </context-param>

    <context-param>
        <param-name>net.sourceforge.myfaces.ALLOW_JAVASCRIPT</param-name>
        <param-value>true</param-value>
    </context-param>

    <context-param>
        <param-name>net.sourceforge.myfaces.DETECT_JAVASCRIPT</param-name>
        <param-value>false</param-value>
    </context-param>
 <!--
=============================================================================================
 -->
      <listener>
            <listener-class>
org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
      </listener>

      <listener>
      <listener-class>
org.apache.myfaces.tobago.webapp.TobagoServletContextListener</
listener-class>
      </listener>
 <!--
=============================================================================================
 -->
      <filter>
      <filter-name>multipartFormdataFilter</filter-name>
      <filter-class>
org.apache.myfaces.tobago.webapp.TobagoMultipartFormdataFilter</
filter-class>
      </filter>

      <filter-mapping>
      <filter-name>multipartFormdataFilter</filter-name>
      <url-pattern>/paginas/*</url-pattern>
      </filter-mapping>
 <!--
=============================================================================================
 -->

 <!--
=============================================================================================
 -->
 <!-- ============================================ -->
 <!-- CONFIGURACOES DO SPRING                      -->
 <!-- ============================================ -->

 <!-- Substituido pelo listener  -->
 <!--
      <servlet>
            <servlet-name>context</servlet-name>

<servlet-class>org.springframework.web.context.ContextLoaderServlet
            </servlet-class>
            <load-on-startup>1</load-on-startup>
      </servlet>
 -->
      <listener>
      <listener-class>org.springframework.web.context.ContextLoaderListener
</listener-class>
      </listener>
      <context-param>
      <param-name>contextConfigLocation</param-name>
      <param-value>
            /WEB-INF/conf/_spring/aplicacao_contexto-service.xml,

            /WEB-INF/conf/_spring/aplicacao_contexto-jdbc.xml,
                  /WEB-INF/conf/_spring/aplicacao_contexto-dao.xml,


/WEB-INF/conf/componenteMolecular/comp_molecular-servico.xml,
                  /WEB-INF/conf/componenteMolecular/comp_molecular-dao.xml,


/WEB-INF/conf/tipoEstruturaOrganizacional/tipo_estrutura_organizacional-servico.xml,

/WEB-INF/conf/tipoEstruturaOrganizacional/tipo_estrutura_organizacional-dao.xml,


/WEB-INF/conf/tipoCombustivel/tipo_combustivel-servico.xml,
                  /WEB-INF/conf/tipoCombustivel/tipo_combustivel-dao.xml,


/WEB-INF/conf/combustivelPadrao/combustivel_padrao-servico.xml,

/WEB-INF/conf/combustivelPadrao/combustivel_padrao-dao.xml,


/WEB-INF/conf/tipoFonteEmissora/tipo_fonte_emissora-servico.xml,

/WEB-INF/conf/tipoFonteEmissora/tipo_fonte_emissora-dao.xml,


/WEB-INF/conf/estruturaOrganizacionalPadrao/estrutura_organizacional_padrao-servico.xml,

/WEB-INF/conf/estruturaOrganizacionalPadrao/estrutura_organizacional_padrao-dao.xml,

                  /WEB-INF/conf/fonteEmissora/fonte_emissora-servico.xml,
                  /WEB-INF/conf/fonteEmissora/fonte_emissora-dao.xml,


/WEB-INF/conf/estruturaOrganizacional/estrutura_organizacional-servico.xml,

/WEB-INF/conf/estruturaOrganizacional/estrutura_organizacional-dao.xml

            </param-value>
      </context-param>

 <!-- Spring MVC não utilizado pelo fwj -->
 <!--
      <servlet>
      <servlet-name>action</servlet-name>

<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
      <load-on-startup>1</load-on-startup>
      </servlet>
 -->
 <!-- ============================================ -->
 <!-- CONFIGURACOES DO HIBERNATE                   -->
 <!-- ============================================ -->

      <filter>
            <filter-name>hibernateFilter</filter-name>
            <filter-class>
org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</
filter-class>
      </filter>
      <filter-mapping>
            <filter-name>hibernateFilter</filter-name>
            <url-pattern>*.jsp</url-pattern>
      </filter-mapping>

</web-app>
=====================================================================================================================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE faces-config PUBLIC
  "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
  "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">

<faces-config>
      <factory>
            <application-factory>
                   org.apache.myfaces.application.ApplicationFactoryImpl
            </application-factory>
            <faces-context-factory>

org.apache.myfaces.tobago.lifecycle.TobagoLifecycleFactory
            </faces-context-factory>
            <faces-context-factory>
                  org.apache.myfaces.context.FacesContextFactoryImpl
            </faces-context-factory>
            <render-kit-factory>
                  org.apache.myfaces.renderkit.RenderKitFactoryImpl
            </render-kit-factory>
      </factory>


      <application>
            <variable-resolver>
org.springframework.web.jsf.DelegatingVariableResolver</variable-resolver>
      <message-bundle>fwjJSFMessages</message-bundle>

      <locale-config>
                  <default-locale>pt_BR</default-locale>
                  <supported-locale>en_US</supported-locale>
                  <supported-locale>en_GB</supported-locale>
                  <supported-locale>de</supported-locale>
                  <supported-locale>de_DE</supported-locale>
                  <supported-locale>de_AT</supported-locale>
                  <supported-locale>de_CH</supported-locale>
                  <supported-locale>ja_JP</supported-locale>
                  <supported-locale>ru_RU</supported-locale>
      </locale-config>
      </application>


      <managed-bean>
      <description>FWJ - CACHE NO ESCOPO DE APLICACAO</description>
      <managed-bean-name>fwjCacheAplicacaoBean</managed-bean-name>
      <managed-bean-class>
br.com.petrobras.fwj.web.beans.FwjCacheAplicacaoBean</managed-bean-class>
      <managed-bean-scope>application</managed-bean-scope>
      </managed-bean>

      <managed-bean>
      <description>FWJ - CACHE SESSAO</description>
      <managed-bean-name>fwjCacheSessaoBean</managed-bean-name>
      <managed-bean-class>br.com.petrobras.fwj.web.beans.FwjCacheSessaoBean
</managed-bean-class>
      <managed-bean-scope>session</managed-bean-scope>
      </managed-bean>

      <managed-bean>
      <description>FWJ - SEGURANCA</description>
      <managed-bean-name>fwjSegurancaBean</managed-bean-name>
      <managed-bean-class>br.com.petrobras.fwj.web.beans.FwjSegurancaBean</
managed-bean-class>
      <managed-bean-scope>session</managed-bean-scope>
      </managed-bean>

      <managed-bean>
      <description>FWJ - ORDENACAO</description>
      <managed-bean-name>fwjOrdenacaoBean</managed-bean-name>
      <managed-bean-class>br.com.petrobras.fwj.web.beans.FwjOrdenacaoBean</
managed-bean-class>
      <managed-bean-scope>session</managed-bean-scope>
      </managed-bean>

      <managed-bean>
      <description>FWJ - PROTOTIPO</description>
      <managed-bean-name>prototipoBean</managed-bean-name>
      <managed-bean-class>
br.com.petrobras.fwj.web.prototipo.beans.PrototipoBean</managed-bean-class>
      <managed-bean-scope>session</managed-bean-scope>
      </managed-bean>

      <managed-bean>
      <description>FWJ - CONTROLADOR</description>
      <managed-bean-name>fwjControlador</managed-bean-name>
      <managed-bean-class>
br.com.petrobras.fwj.web.controlador.FwjControlador</managed-bean-class>
      <managed-bean-scope>request</managed-bean-scope>
      </managed-bean>

      <managed-bean>
      <description>FWJ - LISTA BUSCA</description>
      <managed-bean-name>fwjListaBuscaBean</managed-bean-name>
      <managed-bean-class>br.com.petrobras.fwj.web.beans.FwjListaBuscaBean
</managed-bean-class>
      <managed-bean-scope>session</managed-bean-scope>
      </managed-bean>

      <managed-bean>
      <description>FWJ - PROTOTIPO</description>
      <managed-bean-name>fwjPrototipoBean</managed-bean-name>
      <managed-bean-class>br.com.petrobras.fwj.web.beans.FwjPrototipoBean</
managed-bean-class>
      <managed-bean-scope>session</managed-bean-scope>
      </managed-bean>

      <managed-bean>
      <description>FWJ - GERENCIA O LAYOUT DA PAGINA (TAMANHO DA JANELA)</
description>
      <managed-bean-name>layout</managed-bean-name>
      <managed-bean-class>br.com.petrobras.fwj.web.beans.FwjLayoutBean</
managed-bean-class>
      <managed-bean-scope>session</managed-bean-scope>
      <managed-property>
                  <property-name>width</property-name>
                  <property-class>int</property-class>
                  <value>800</value>
      </managed-property>
      <managed-property>
<property-name>height</property-name>
                  <property-class>int</property-class>
                  <value>600</value>
      </managed-property>
      <managed-property>
                  <property-name>minimumWidth</property-name>
                  <property-class>int</property-class>
                  <value>700</value>
      </managed-property>
      <managed-property>
                  <property-name>minimumHeight</property-name>
                  <property-class>int</property-class>
                  <value>600</value>
      </managed-property>
      <managed-property>
                  <property-name>maximumWidth</property-name>
                  <property-class>int</property-class>
                  <value>1300</value>
      </managed-property>
      <managed-property>
                  <property-name>maximumHeight</property-name>
                  <property-class>int</property-class>
                  <value>700</value>
      </managed-property>
      </managed-bean>

      <!-- SEGURANCA -->
      <navigation-rule>
      <from-view-id>*</from-view-id>
      <navigation-case>
                  <from-outcome>acesso_nao_permitido</from-outcome>
                  <to-view-id>/view/common/acessoNaoPermitido.jsp</
to-view-id>
      </navigation-case>
      </navigation-rule>

      <!-- PAGINA DE ERRO -->
      <navigation-rule>
      <from-view-id>*</from-view-id>
      <navigation-case>
                  <from-outcome>erro</from-outcome>
                  <to-view-id>/view/common/erro.jsp</to-view-id>
      </navigation-case>
      </navigation-rule>


      <!-- CONVERSORES -->
      <converter>
            <converter-id>fwjBooleanStringConverter</converter-id>
            <converter-class>
br.com.petrobras.fwj.utils.FwjBooleanStringConverter</converter-class>
      </converter>

      <!-- VALIDADORES -->
      <validator>
            <validator-id>fwjEmailValidator</validator-id>
            <validator-class>br.com.petrobras.fwj.utils.FwjEmailValidator</
validator-class>
      </validator>
      <validator>
            <validator-id>fwjTextoRequeridoValidator</validator-id>
            <validator-class>
br.com.petrobras.fwj.web.validator.FwjTextoRequeridoValidator</
validator-class>
      </validator>

</faces-config>
=====================================================================================================================================================


"O emitente desta mensagem é responsável por seu conteúdo e endereçamento.
Cabe ao destinatário cuidar quanto ao tratamento adequado. Sem a devida
autorização, a divulgação, a reprodução, a distribuição ou qualquer outra
ação em desconformidade com as normas internas do Sistema Petrobras são
proibidas e passíveis de sanção disciplinar, cível e criminal."

"The sender of this message is responsible for its content and addressing.
The receiver shall take proper care of it. Without due authorization, the
publication, reproduction, distribution or the performance of  any other
action not conforming to Petrobras System internal policies and procedures
is forbidden and liable to disciplinary, civil or criminal  sanctions."

" El emisor de este mensaje es responsable por su contenido y
direccionamiento. Cabe al destinatario darle el tratamiento adecuado. Sin
la debida autorización, su divulgación, reproducción, distribución o
cualquier otra acción no conforme a las normas internas del Sistema
Petrobras están prohibidas y serán pasibles de sanción disciplinaria, civil
y penal."


Re: Bug using tomcat 6 and myfaces 1.2

Posted by Gerald Müllan <ge...@gmail.com>.
Hi,

i have also observed this problem. I think it that WebXmlParser tries to get the
dtd definition via an internet connection which causes the exception
if you are working offline.

Initialize your log4j configuration the right way and you will see the
correct logging message.

But an internet connection should definitely not be mandatory.

cheers,

Gerald

On Dec 24, 2007 9:52 AM, Ognjen Blagojevic <og...@etf.bg.ac.yu> wrote:
> Hi Matthias,
>
> I had similar problem. I tried to add the listener in web.xml, but that
> didn't help.
>
> It seems to me that it has something to do with the internet connection.
> Starting tomcat (6.0.13) without internet connection causes application
> to throw this exception as soon as I try to view application home page.
> If the internet connection is enabled during tomcat startup everything
> works just fine.
>
> Although exception message is verbose, I think it is misleading, because
> I cannot figure out what is the exact resource that application is
> trying to get from the internet.
>
> BTW, that looks very similar to Tomahawk problem with DTD.
>
> Regards,
> Ognjen
>
>
> HTTP Status 500 - type Exception report
>
> message description: The server encountered an internal error () that
> prevented it from fulfilling this request.
>
> exception
>
> javax.servlet.ServletException: Servlet.init() for servlet Faces Servlet
> threw exception
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:563)
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)
> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
>      java.lang.Thread.run(Thread.java:619)
>
> root cause
>
> java.lang.IllegalStateException: No Factories configured for this
> Application. This happens if the faces-initialization does not work at
> all - make sure that you properly include all configuration settings
> necessary for a basic faces application and that all the necessary libs
> are included. Also check the logging output of your web application and
> your container for any exceptions!
> If you did that and find nothing, the mistake might be due to the fact
> that you use some special web-containers which do not support
> registering context-listeners via TLD files and a context listener is
> not setup in your web.xml.
> A typical config looks like this;
> <listener>
>
> <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
> </listener>
>
>      javax.faces.FactoryFinder.getFactory(FactoryFinder.java:90)
>      javax.faces.webapp.FacesServlet.init(FacesServlet.java:88)
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:563)
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)
> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
>      java.lang.Thread.run(Thread.java:619)
>
> note The full stack trace of the root cause is available in the Apache
> Tomcat/6.0.13 logs.
> Apache Tomcat/6.0.13
>
>
>
> Matthias Wessendorf wrote:
> > you need to conf the <listener> in your web.xml
> >
> > -M
> >
> > On Dec 20, 2007 2:07 PM, Alonso Isidoro Roman <al...@gmail.com> wrote:
> >> SEVERE: StandardWrapper.Throwable
> >> java.lang.IllegalStateExceptio
> >> n: No Factories configured for this
> >> Application. This happens if the faces-initialization does not work at all
> >> - make sure that you properly include all configuration settings necessary
> >> for a basic faces application and that all the necessary libs are included.
> >> Also check the logging output of your web application and your container
> >> for any exceptions!
> >>  If you did that and find nothing, the mistake might be due to the fact that
> >> you use some special web-containers which do not support registering
> >> context-listeners via TLD files and a context listener is not setup in your
> >> web.xml.
> >> A typical config looks like this;
> >> <listener>
> >>
> >> <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
> >> </listener>
> >>
> >>
> >>
> >>  2007/12/20, diego.vieira.vivo.ACCENTURE@petrobras.com.br
> >> <diego.vieira.vivo.ACCENTURE@petrobras.com.br >:
> >>
> >>> I have a problem when i try to deploy this happens
> >>>
> >>>
> >> ======================================================================================================================================================
> >>> 20/12/2007 09:19:55 org.apache.catalina.core.AprLifecycleListener init
> >>> INFO: The Apache Tomcat Native library which allows optimal performance in
> >>> production environments was not found on the java.library.path:
> >> C:\Arquivos
> >>> de programas\Java\jdk1.5.0
> >>> _01\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\Arquivos de
> >>> programas\Java\jdk1.5.0_01\bin\..\jre\bin\client;C:\Arquivos de
> >>> programas\Java\jdk1.5.0_01\bin\..\jre\bin;C:\Arquivos de
> >>> programas\Java\jdk1.5.0_01\bin;D:\oracle\ora92\bin;C:\Arquivos de
> >>> programas\Oracle\jre\1.3.1\bin;C:\Arquivos de programas\Oracle\jre\1.1.8
> >>> \bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Arquivos
> >> de
> >>> programas\Arquivos comuns\Autodesk Shared\;C:\Arquivos de
> >>> programas\Autodesk\DWG TrueView\;C:\Arquivos de
> >>> programas\Rational\common;C:\Arquivos de
> >>> programas\Rational\ClearCase\bin;D:\dev\CVSNT\
> >>> 20/12/2007 09:19:56 org.apache.coyote.http11.Http11Protocol init
> >>> INFO: Initializing Coyote HTTP/1.1 on http-8080
> >>> 20/12/2007 09:19:56 org.apache.catalina.startup.Catalina load
> >>> INFO: Initialization processed in 871 ms
> >>> 20/12/2007 09:19:56 org.apache.catalina.core.StandardService start
> >>> INFO: Starting service Catalina
> >>> 20/12/2007 09:19:56 org.apache.catalina.core.StandardEngine start
> >>> INFO: Starting Servlet Engine: Apache Tomcat/6.0.14
> >>> log4j:WARN No appenders could be found for logger
> >>> (org.apache.myfaces.shared_impl.webapp.webxml.WebXmlParser).
> >>> log4j:WARN Please initialize the log4j system properly.
> >>> 20/12/2007 09:20:10 org.apache.catalina.core.ApplicationContext log
> >>> INFO: Initializing Spring root WebApplicationContext
> >>> 20/12/2007 09:20:19 org.apache.catalina.core.ApplicationContext log
> >>> SEVERE: StandardWrapper.Throwable
> >>> java.lang.IllegalStateException: No Factories configured for this
> >>> Application. This happens if the faces-initialization does not work at all
> >>> - make sure that you properly include all configuration settings necessary
> >>> for a basic faces application and that all the necessary libs are
> >> included.
> >>> Also check the logging output of your web application and your container
> >>> for any exceptions!
> >>> If you did that and find nothing, the mistake might be due to the fact
> >> that
> >>> you use some special web-containers which do not support registering
> >>> context-listeners via TLD files and a context listener is not setup in
> >> your
> >>> web.xml.
> >>> A typical config looks like this;
> >>> <listener>
> >>>
> >>>
> >> <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
> >>> </listener>
> >>>
> >>>       at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:90)
> >>>       at javax.faces.webapp.FacesServlet.init (FacesServlet.java:88)
> >>>       at org.apache.catalina.core.StandardWrapper.loadServlet(
> >>> StandardWrapper.java:1161)
> >>>       at org.apache.catalina.core.StandardWrapper.load(
> >>> StandardWrapper.java:981)
> >>>       at org.apache.catalina.core.StandardContext.loadOnStartup (
> >>> StandardContext.java:4045)
> >>>       at org.apache.catalina.core.StandardContext.start(
> >>> StandardContext.java:4351)
> >>>       at org.apache.catalina.core.ContainerBase.start(
> >>> ContainerBase.java:1045)
> >>>       at org.apache.catalina.core.StandardHost.start
> >> (StandardHost.java:719)
> >>>       at org.apache.catalina.core.ContainerBase.start(
> >>> ContainerBase.java:1045)
> >>>       at org.apache.catalina.core.StandardEngine.start(
> >>> StandardEngine.java:443)
> >>>       at org.apache.catalina.core.StandardService.start (
> >>> StandardService.java:516)
> >>>       at org.apache.catalina.core.StandardServer.start(
> >>> StandardServer.java:710)
> >>>       at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
> >>>       at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
> >>>       at sun.reflect.NativeMethodAccessorImpl.invoke(
> >>> NativeMethodAccessorImpl.java:39)
> >>>       at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> >>> DelegatingMethodAccessorImpl.java:25)
> >>>       at java.lang.reflect.Method.invoke(Method.java:585)
> >>>       at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
> >>>       at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
> >>> 20/12/2007 09:20:19 org.apache.catalina.core.StandardContext loadOnStartup
> >>> SEVERE: Servlet /sigea threw load() exception
> >>> java.lang.IllegalStateException: No Factories configured for this
> >>> Application. This happens if the faces-initialization does not work at all
> >>> - make sure that you properly include all configuration settings necessary
> >>> for a basic faces application and that all the necessary libs are
> >> included.
> >>> Also check the logging output of your web application and your container
> >>> for any exceptions!
> >>> If you did that and find nothing, the mistake might be due to the fact
> >> that
> >>> you use some special web-containers which do not support registering
> >>> context-listeners via TLD files and a context listener is not setup in
> >> your
> >>> web.xml.
> >>> A typical config looks like this;
> >>> <listener>
> >>>
> >>>
> >> <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
> >>> </listener>
> >>>
> >>>       at javax.faces.FactoryFinder.getFactory (FactoryFinder.java:90)
> >>>       at javax.faces.webapp.FacesServlet.init(FacesServlet.java:88)
> >>>       at org.apache.catalina.core.StandardWrapper.loadServlet(
> >>> StandardWrapper.java:1161)
> >>>       at org.apache.catalina.core.StandardWrapper.load (
> >>> StandardWrapper.java:981)
> >>>       at org.apache.catalina.core.StandardContext.loadOnStartup(
> >>> StandardContext.java:4045)
> >>>       at org.apache.catalina.core.StandardContext.start(
> >>> StandardContext.java:4351)
> >>>       at org.apache.catalina.core.ContainerBase.start(
> >>> ContainerBase.java:1045)
> >>>       at
> >> org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
> >>>       at org.apache.catalina.core.ContainerBase.start(
> >>> ContainerBase.java:1045)
> >>>       at org.apache.catalina.core.StandardEngine.start(
> >>> StandardEngine.java:443)
> >>>       at org.apache.catalina.core.StandardService.start(
> >>> StandardService.java:516)
> >>>       at org.apache.catalina.core.StandardServer.start (
> >>> StandardServer.java:710)
> >>>       at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
> >>>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >>>       at sun.reflect.NativeMethodAccessorImpl.invoke (
> >>> NativeMethodAccessorImpl.java:39)
> >>>       at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> >>> DelegatingMethodAccessorImpl.java:25)
> >>>       at java.lang.reflect.Method.invoke(Method.java:585)
> >>>       at org.apache.catalina.startup.Bootstrap.start (Bootstrap.java:288)
> >>>       at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
> >>> 20/12/2007 09:20:19 org.apache.coyote.http11.Http11Protocol start
> >>> INFO: Starting Coyote HTTP/1.1 on http-8080
> >>> 20/12/2007 09:20:19 org.apache.jk.common.ChannelSocket init
> >>> INFO: JK: ajp13 listening on /0.0.0.0:8009
> >>> 20/12/2007 09:20:19 org.apache.jk.server.JkMain start
> >>> INFO: Jk running ID=0 time=0/62  config=null
> >>> 20/12/2007 09:20:19 org.apache.catalina.startup.Catalina start
> >>> INFO: Server startup in 23815 ms
> >>>
> >>>
> >> ======================================================================================================================================================
> >>> Debugging i find out that  _registeredFactoryNames  is empty
> >>> and i notice this in one class
> >>> //TODO: null-check for Weblogic, that tries to initialize Servlet before
> >>> ContextListener
> >>> following goes my web.xml and faces
> >>>
> >> =====================================================================================================================================================
> >>> /*
> >>> * Copyright 2004 The Apache Software Foundation.
> >>> *
> >>> * Licensed under the Apache License, Version 2.0 (the "License");
> >>> * you may not use this file except in compliance with the License.
> >>> * You may obtain a copy of the License at
> >>> *
> >>> *      http://www.apache.org/licenses/LICENSE-2.0
> >>> *
> >>> * Unless required by applicable law or agreed to in writing, software
> >>> * distributed under the License is distributed on an "AS IS" BASIS,
> >>> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
> >>> * See the License for the specific language governing permissions and
> >>> * limitations under the License.
> >>> */
> >>> package javax.faces;
> >>>
> >>>
> >>> import javax.faces.application.ApplicationFactory;
> >>> import javax.faces.context.FacesContextFactory;
> >>> import javax.faces.lifecycle.LifecycleFactory;
> >>> import javax.faces.render.RenderKitFactory;
> >>> import java.lang.reflect.Constructor;
> >>> import java.lang.reflect.InvocationTargetException;
> >>> import java.util.*;
> >>>
> >>> /**
> >>> * see Javadoc of <a
> >>> href="
> >> http://java.sun.com/javaee/javaserverfaces/1.2/docs/api/index.html">JSF
> >>> Specification</a>
> >>> *
> >>> * @author Manfred Geiler (latest modification by $Author: mbr $)
> >>> * @version $Revision: 512227 $ $Date: 2007-02-27 13:25:16 +0100 (Di, 27
> >>> Feb 2007) $
> >>> */
> >>> public final class FactoryFinder
> >>> {
> >>>     public static final String APPLICATION_FACTORY =
> >>> "javax.faces.application.ApplicationFactory";
> >>>     public static final String FACES_CONTEXT_FACTORY =
> >>> "javax.faces.context.FacesContextFactory";
> >>>     public static final String LIFECYCLE_FACTORY =
> >>> "javax.faces.lifecycle.LifecycleFactory";
> >>>     public static final String RENDER_KIT_FACTORY =
> >>> "javax.faces.render.RenderKitFactory";
> >>>
> >>>     private static Map<ClassLoader, Map> _registeredFactoryNames = new
> >>> HashMap<ClassLoader, Map>();
> >>>     /**
> >>>      * Maps from classLoader to another map, the container ( i.e. Tomcat)
> >>> will create a class loader for
> >>>      * each web app that it controls (typically anyway) and that class
> >>> loader is used as the key.
> >>>      *
> >>>      * The secondary map maps the factory name (i.e.
> >>> FactoryFinder.APPLICATION_FACTORY ) to actual instances
> >>>      * that are created via getFactory. The instances will be of the class
> >>> specified in the setFactory method
> >>>      * for the factory name, i.e.
> >>> FactoryFinder.setFactory(FactoryFinder.APPLICATION_FACTORY ,
> >>> MyFactory.class).
> >>>      */
> >>>     private static Map<ClassLoader, Map> _factories = new
> >>> HashMap<ClassLoader, Map>();
> >>>
> >>>     private static final Set<String> VALID_FACTORY_NAMES = new
> >>> HashSet<String>();
> >>>     private static final Map<String, Class> ABSTRACT_FACTORY_CLASSES = new
> >>> HashMap<String, Class>();
> >>>     static {
> >>>         VALID_FACTORY_NAMES.add(APPLICATION_FACTORY);
> >>>         VALID_FACTORY_NAMES.add(FACES_CONTEXT_FACTORY);
> >>>         VALID_FACTORY_NAMES.add(LIFECYCLE_FACTORY);
> >>>         VALID_FACTORY_NAMES.add(RENDER_KIT_FACTORY);
> >>>
> >>>         ABSTRACT_FACTORY_CLASSES.put(APPLICATION_FACTORY,
> >>> ApplicationFactory.class);
> >>>         ABSTRACT_FACTORY_CLASSES.put(FACES_CONTEXT_FACTORY,
> >>> FacesContextFactory.class);
> >>>         ABSTRACT_FACTORY_CLASSES.put(LIFECYCLE_FACTORY,
> >>> LifecycleFactory.class);
> >>>         ABSTRACT_FACTORY_CLASSES.put(RENDER_KIT_FACTORY,
> >>> RenderKitFactory.class);
> >>>     }
> >>>
> >>>
> >>>   // avoid instantiation
> >>>   FactoryFinder() {
> >>>   }
> >>>
> >>>   public static Object getFactory(String factoryName)
> >>>             throws FacesException
> >>>     {
> >>>         if(factoryName == null)
> >>>             throw new NullPointerException("factoryName may not be null");
> >>>
> >>>         ClassLoader classLoader = getClassLoader();
> >>>         Map factoryClassNames = _registeredFactoryNames.get(classLoader);
> >>>
> >>>         if (factoryClassNames == null)
> >>>         {
> >>>             String message = "No Factories configured for this
> >> Application.
> >>> This happens if the faces-initialization "+
> >>>             "does not work at all - make sure that you properly include
> >> all
> >>> configuration settings necessary for a basic faces application " +
> >>>             "and that all the necessary libs are included. Also check the
> >>> logging output of your web application and your container for any
> >>> exceptions!" +
> >>>             "\nIf you did that and find nothing, the mistake might be due
> >>> to the fact that you use some special web-containers which "+
> >>>             "do not support registering context-listeners via TLD files
> >> and
> >>> " +
> >>>             "a context listener is not setup in your web.xml.\n" +
> >>>             "A typical config looks like this;\n<listener>\n" +
> >>>             "
> >>>
> >> <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>\n"
> >>> +
> >>>             "</listener>\n";
> >>>             throw new IllegalStateException(message);
> >>>         }
> >>>
> >>>         if (! factoryClassNames.containsKey(factoryName)) {
> >>>             throw new IllegalArgumentException("no factory " + factoryName
> >>> + " configured for this application.");
> >>>         }
> >>>
> >>>         Map<String, Object> factoryMap = _factories.get(classLoader);
> >>>
> >>>         if (factoryMap == null) {
> >>>             factoryMap = new HashMap<String, Object>();
> >>>             _factories.put(classLoader, factoryMap);
> >>>         }
> >>>         Object factory = factoryMap.get(factoryName);
> >>>
> >>>         if (factory == null) {
> >>>             List classNames = (List) factoryClassNames.get(factoryName);
> >>>             factory =
> >>> newFactoryInstance(ABSTRACT_FACTORY_CLASSES.get(factoryName),
> >>> classNames.iterator(), classLoader);
> >>>             factoryMap.put(factoryName, factory);
> >>>         }
> >>>         return factory;
> >>>     }
> >>>
> >>>
> >>>     private static Object newFactoryInstance(Class interfaceClass,
> >> Iterator
> >>> classNamesIterator, ClassLoader classLoader)
> >>>     {
> >>>         try
> >>>         {
> >>>             Object current = null;
> >>>
> >>>             while (classNamesIterator.hasNext())
> >>>             {
> >>>                 String implClassName = (String) classNamesIterator.next();
> >>>                 Class implClass = classLoader.loadClass(implClassName);
> >>>
> >>>                 // check, if class is of expected interface type
> >>>                 if (!interfaceClass.isAssignableFrom(implClass))
> >>>                 {
> >>>                     throw new IllegalArgumentException("Class " +
> >>> implClassName + " is no " + interfaceClass.getName());
> >>>                 }
> >>>
> >>>                 if (current == null)
> >>>                 {
> >>>                     // nothing to decorate
> >>>                     current = implClass.newInstance();
> >>>                 } else
> >>>                 {
> >>>                     // let's check if class supports the decorator pattern
> >>>                     try
> >>>                     {
> >>>                         Constructor delegationConstructor =
> >>> implClass.getConstructor(new Class[]{interfaceClass});
> >>>                         // impl class supports decorator pattern,
> >>>                         try
> >>>                         {
> >>>                             // create new decorator wrapping current
> >>>                             current =
> >> delegationConstructor.newInstance(new
> >>> Object[]{current});
> >>>                         } catch (InstantiationException e)
> >>>                         {
> >>>                             throw new FacesException(e);
> >>>                         } catch (IllegalAccessException e)
> >>>                         {
> >>>                             throw new FacesException(e);
> >>>                         } catch (InvocationTargetException e)
> >>>                         {
> >>>                             throw new FacesException(e);
> >>>                         }
> >>>                     } catch (NoSuchMethodException e)
> >>>                     {
> >>>                         // no decorator pattern support
> >>>                         current = implClass.newInstance();
> >>>                     }
> >>>                 }
> >>>             }
> >>>
> >>>             return current;
> >>>         } catch (ClassNotFoundException e)
> >>>         {
> >>>             throw new FacesException(e);
> >>>         } catch (InstantiationException e)
> >>>         {
> >>>             throw new FacesException(e);
> >>>         } catch (IllegalAccessException e)
> >>>         {
> >>>             throw new FacesException(e);
> >>>         }
> >>>     }
> >>>
> >>>
> >>>     public static void setFactory(String factoryName,
> >>>                                   String implName)
> >>>     {
> >>>         checkFactoryName(factoryName);
> >>>
> >>>         ClassLoader classLoader = getClassLoader();
> >>>         synchronized(_registeredFactoryNames)
> >>>         {
> >>>             Map factories = _factories.get(classLoader);
> >>>
> >>>             if (factories != null && factories.containsKey(factoryName)) {
> >>>                 // Javadoc says ... This method has no effect if
> >>> getFactory() has already been
> >>>                 // called looking for a factory for this factoryName.
> >>>                 return;
> >>>             }
> >>>
> >>>             Map<String, List> factoryClassNames =
> >>> _registeredFactoryNames.get(classLoader);
> >>>
> >>>             if (factoryClassNames == null)
> >>>             {
> >>>                 factoryClassNames = new HashMap<String, List>();
> >>>                 _registeredFactoryNames.put(classLoader,
> >>> factoryClassNames);
> >>>             }
> >>>
> >>>             List<String> classNameList =
> >>> factoryClassNames.get(factoryName);
> >>>
> >>>             if (classNameList == null) {
> >>>                 classNameList = new ArrayList<String>();
> >>>                 factoryClassNames.put(factoryName, classNameList);
> >>>             }
> >>>             classNameList.add(implName);
> >>>         }
> >>>     }
> >>>
> >>>
> >>>     public static void releaseFactories()
> >>>             throws FacesException
> >>>     {
> >>>         ClassLoader classLoader = getClassLoader();
> >>>         _factories.remove(classLoader);
> >>>     }
> >>>
> >>>     private static void checkFactoryName(String factoryName)
> >>>     {
> >>>         if (! VALID_FACTORY_NAMES.contains(factoryName)) {
> >>>             throw new IllegalArgumentException("factoryName '" +
> >>> factoryName + "'");
> >>>         }
> >>>     }
> >>>
> >>>
> >>>     private static ClassLoader getClassLoader()
> >>>     {
> >>>         try
> >>>         {
> >>>             ClassLoader classLoader =
> >>> Thread.currentThread().getContextClassLoader();
> >>>             if (classLoader == null)
> >>>             {
> >>>                 throw new FacesException("web application class loader
> >>> cannot be identified", null);
> >>>             }
> >>>             return classLoader;
> >>>         }
> >>>         catch (Exception e)
> >>>         {
> >>>             throw new FacesException("web application class loader cannot
> >>> be identified", e);
> >>>         }
> >>>     }
> >>> }
> >>>
> >> =====================================================================================================================================================
> >>> <?xml version=" 1.0" encoding="UTF-8"?>
> >>>
> >>> <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
> >>>     xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance"
> >>>     xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
> >>> http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
> >>>     version="2.4">
> >>>
> >>>   <display-name>Fwj - Framework Web Java</display-name>
> >>>
> >>>       <!-- ============================================ -->
> >>>       <!-- CONFIGURACOES DA APLICACAO                   -->
> >>>       <!-- ============================================ -->
> >>>       <welcome-file-list>
> >>>       <welcome-file>/index.jsp</welcome-file>
> >>>       </welcome-file-list>
> >>>
> >>>     <context-param>
> >>>         <param-name>javax.faces.CONFIG_FILES</param-name>
> >>>         <param-value>
> >>>             /WEB-INF/conf/fwj_faces-config.xml
> >>>         </param-value>
> >>>     </context-param>
> >>>
> >>>       <!-- ============================================ -->
> >>>       <!-- TAG LIBS UTILIZADAS PELO FRAMEWORK           -->
> >>>       <!-- ============================================ -->
> >>>       <jsp-config>
> >>>             <taglib>
> >>>                   <taglib-uri>jstl_core</taglib-uri>
> >>>                   <taglib-location>/WEB-INF/tags/jstl/c.tld</
> >>> taglib-location>
> >>>             </taglib>
> >>>             <taglib>
> >>>                   <taglib-uri>jstl_fmt</taglib-uri>
> >>>                   <taglib-location>/WEB-INF/tags/jstl/fmt.tld</
> >>> taglib-location>
> >>>             </taglib>
> >>>       </jsp-config>
> >>>
> >>>       <!-- ============================================ -->
> >>>       <!-- SETA O LOCALE NO CONTEXTO JSF: O LOCALE      -->
> >>>       <!-- SERA RECEBIDO COMO PARAMETRO                 -->
> >>>       <!-- ============================================ -->
> >>> <!--
> >>>
> >> =============================================================================================
> >>> -->
> >>>       <filter>
> >>>           <filter-name>fwjUserLocaleFilter</filter-name>
> >>>       <filter-class>br.com.petrobras.fwj.web.filter.FwjUserLocaleFilter</
> >>> filter-class>
> >>>       </filter>
> >>>       <filter-mapping>
> >>>       <filter-name>fwjUserLocaleFilter</filter-name>
> >>>       <url-pattern>/index.jsp</url-pattern>
> >>>       </filter-mapping>
> >>> <!--
> >>>
> >> =============================================================================================
> >>> -->
> >>>       <!-- ============================================ -->
> >>>       <!-- CASO A SESSAO TENHA EXPIRADO, REDIRECIONA    -->
> >>>       <!-- PARA A PAGINA DE LOGIN                       -->
> >>>       <!-- ============================================ -->
> >>> <!--
> >>>
> >> =============================================================================================
> >>> -->
> >>>       <filter>
> >>>       <filter-name>fwjSessionCheckFilter</filter-name>
> >>>       <filter-class>
> >> br.com.petrobras.fwj.web.filter.FwjSessionCheckFilter</
> >>> filter-class>
> >>>       </filter>
> >>>       <filter-mapping>
> >>>       <filter-name>fwjSessionCheckFilter</filter-name>
> >>>       <url-pattern>/paginas/*</url-pattern>
> >>>       </filter-mapping>
> >>> <!--
> >>>
> >> =============================================================================================
> >>> -->
> >>>       <!-- ============================================ -->
> >>>       <!-- FILTRO PARA EXTENDER OS COMPONENTES VISUAIS  -->
> >>>       <!-- DO TOBAGO                                    -->
> >>>       <!-- ============================================ -->
> >>> <!--
> >>>
> >> =============================================================================================
> >>> -->
> >>>       <filter>
> >>>             <filter-name>fwjPaginaFilter</filter-name>
> >>>             <filter-class>
> >>> br.com.petrobras.sigea.ext.web.filter.PaginaFilter</filter-class>
> >>>             <init-param>
> >>>                   <param-name>encoding</param-name>
> >>>                   <param-value>ISO-8859-1</param-value>
> >>>             </init-param>
> >>>       </filter>
> >>>     <filter-mapping>
> >>>       <filter-name>fwjPaginaFilter</filter-name>
> >>>           <url-pattern>/paginas/view/*</url-pattern>
> >>>       </filter-mapping>
> >>> <!--
> >>>
> >> =============================================================================================
> >>> -->
> >>>
> >>>       <!-- ============================================ -->
> >>>       <!-- SERVLET DE AUTENTICACAO                      -->
> >>>       <!-- ============================================ -->
> >>> <!--
> >>>
> >> =============================================================================================
> >>> -->
> >>>       <servlet>
> >>>       <servlet-name>fwjAutenticacaoServlet</servlet-name>
> >>>       <servlet-class>
> >>> br.com.petrobras.fwj.web.servlet.FwjAutenticacaoServlet</servlet-class>
> >>>       </servlet>
> >>>       <servlet-mapping>
> >>>       <servlet-name>fwjAutenticacaoServlet</servlet-name>
> >>>             <url-pattern>/fwjAutenticacaoServlet</url-pattern>
> >>>       </servlet-mapping>
> >>> <!--
> >>>
> >> =============================================================================================
> >>> -->
> >>> <!-- ============================================ -->
> >>> <!-- CONFIGURACOES DO TOBAGO                      -->
> >>> <!-- ============================================ -->
> >>>       <servlet>
> >>>       <servlet-name>FacesServlet</servlet-name>
> >>>       <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
> >>>       <load-on-startup>5</load-on-startup>
> >>>       </servlet>
> >>>       <servlet-mapping>
> >>>       <servlet-name>FacesServlet</servlet-name>
> >>>             <url-pattern>/paginas/*</url-pattern>
> >>>       </servlet-mapping>
> >>> <!--
> >>>
> >> =============================================================================================
> >>> -->
> >>>       <context-param>
> >>>         <param-name>javax.faces.STATE_SAVING_METHOD </param-name>
> >>>         <param-value>server</param-value>
> >>>     </context-param>
> >>>
> >>>     <context-param>
> >>>         <param-name>net.sourceforge.myfaces.PRETTY_HTML</param-name>
> >>>         <param-value>true</param-value>
> >>>     </context-param>
> >>>
> >>>     <context-param>
> >>>         <param-name>net.sourceforge.myfaces.ALLOW_JAVASCRIPT</param-name>
> >>>         <param-value>true</param-value>
> >>>     </context-param>
> >>>
> >>>     <context-param>
> >>>         <param-name>net.sourceforge.myfaces.DETECT_JAVASCRIPT</param-name>
> >>>         <param-value>false</param-value>
> >>>     </context-param>
> >>> <!--
> >>>
> >> =============================================================================================
> >>> -->
> >>>       <listener>
> >>>             <listener-class>
> >>> org.apache.myfaces.webapp.StartupServletContextListener </listener-class>
> >>>       </listener>
> >>>
> >>>       <listener>
> >>>       <listener-class>
> >>> org.apache.myfaces.tobago.webapp.TobagoServletContextListener</
> >>> listener-class>
> >>>       </listener>
> >>> <!--
> >>>
> >> =============================================================================================
> >>> -->
> >>>       <filter>
> >>>       <filter-name>multipartFormdataFilter</filter-name>
> >>>       <filter-class>
> >>> org.apache.myfaces.tobago.webapp.TobagoMultipartFormdataFilter</
> >>> filter-class>
> >>>       </filter>
> >>>
> >>>       <filter-mapping>
> >>>       <filter-name>multipartFormdataFilter</filter-name>
> >>>       <url-pattern>/paginas/*</url-pattern>
> >>>       </filter-mapping>
> >>> <!--
> >>>
> >> =============================================================================================
> >>> -->
> >>>
> >>> <!--
> >>>
> >> =============================================================================================
> >>> -->
> >>> <!-- ============================================ -->
> >>> <!-- CONFIGURACOES DO SPRING                      -->
> >>> <!-- ============================================ -->
> >>>
> >>> <!-- Substituido pelo listener  -->
> >>> <!--
> >>>       <servlet>
> >>>             <servlet-name>context</servlet-name>
> >>>
> >>> <servlet-class>org.springframework.web.context.ContextLoaderServlet
> >>>             </servlet-class>
> >>>             <load-on-startup>1</load-on-startup>
> >>>       </servlet>
> >>> -->
> >>>       <listener>
> >>>
> >> <listener-class>org.springframework.web.context.ContextLoaderListener
> >>> </listener-class>
> >>>       </listener>
> >>>       <context-param>
> >>>       <param-name>contextConfigLocation</param-name>
> >>>       <param-value>
> >>>             /WEB-INF/conf/_spring/aplicacao_contexto-service.xml,
> >>>
> >>>             /WEB-INF/conf/_spring/aplicacao_contexto-jdbc.xml,
> >>>                   /WEB-INF/conf/_spring/aplicacao_contexto- dao.xml,
> >>>
> >>>
> >>> /WEB-INF/conf/componenteMolecular/comp_molecular-servico.xml,
> >>>
> >> /WEB-INF/conf/componenteMolecular/comp_molecular-dao.xml,
> >>>
> >>> /WEB-INF/conf/tipoEstruturaOrganizacional/tipo_estrutura_organizacional-
> >> servico.xml,
> >>>
> >> /WEB-INF/conf/tipoEstruturaOrganizacional/tipo_estrutura_organizacional-dao.xml,
> >>>
> >>> /WEB-INF/conf/tipoCombustivel/tipo_combustivel-servico.xml,
> >>>                   /WEB-INF/conf/tipoCombustivel/tipo_combustivel- dao.xml,
> >>>
> >>>
> >>> /WEB-INF/conf/combustivelPadrao/combustivel_padrao-servico.xml,
> >>>
> >>> /WEB-INF/conf/combustivelPadrao/combustivel_padrao-dao.xml,
> >>>
> >>>
> >>> /WEB-INF/conf/tipoFonteEmissora/tipo_fonte_emissora-servico.xml ,
> >>>
> >>> /WEB-INF/conf/tipoFonteEmissora/tipo_fonte_emissora-dao.xml,
> >>>
> >>>
> >>>
> >> /WEB-INF/conf/estruturaOrganizacionalPadrao/estrutura_organizacional_padrao-servico.xml,
> >>>
> >> /WEB-INF/conf/estruturaOrganizacionalPadrao/estrutura_organizacional_padrao-
> >> dao.xml,
> >>>                   /WEB-INF/conf/fonteEmissora/fonte_emissora-servico.xml,
> >>>                   /WEB-INF/conf/fonteEmissora/fonte_emissora-dao.xml,
> >>>
> >>>
> >>> /WEB-INF/conf/estruturaOrganizacional/estrutura_organizacional-
> >> servico.xml,
> >>> /WEB-INF/conf/estruturaOrganizacional/estrutura_organizacional-dao.xml
> >>>
> >>>             </param-value>
> >>>       </context-param>
> >>>
> >>> <!-- Spring MVC não utilizado pelo fwj -->
> >>> <!--
> >>>       <servlet>
> >>>       <servlet-name>action</servlet-name>
> >>>
> >>>
> >> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
> >>>       <load-on-startup>1</load-on-startup>
> >>>       </servlet>
> >>> -->
> >>> <!-- ============================================ -->
> >>> <!-- CONFIGURACOES DO HIBERNATE                   -->
> >>> <!-- ============================================ -->
> >>>
> >>>       <filter>
> >>>             <filter-name>hibernateFilter</filter-name>
> >>>             <filter-class>
> >>> org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</
> >>> filter-class>
> >>>       </filter>
> >>>       <filter-mapping>
> >>>             <filter-name>hibernateFilter</filter-name>
> >>>             <url-pattern>*.jsp</url-pattern>
> >>>       </filter-mapping>
> >>>
> >>> </web-app>
> >>>
> >> =====================================================================================================================================================
> >>> <?xml version="1.0" encoding="UTF-8"?>
> >>> <!DOCTYPE faces-config PUBLIC
> >>>   "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
> >>>   "http://java.sun.com/dtd/web-facesconfig_1_1.dtd ">
> >>>
> >>> <faces-config>
> >>>       <factory>
> >>>             <application-factory>
> >>>                    org.apache.myfaces.application.ApplicationFactoryImpl
> >>>             </application-factory>
> >>>             <faces-context-factory>
> >>>
> >>> org.apache.myfaces.tobago.lifecycle.TobagoLifecycleFactory
> >>>             </faces-context-factory>
> >>>             <faces-context-factory>
> >>>                    org.apache.myfaces.context.FacesContextFactoryImpl
> >>>             </faces-context-factory>
> >>>             <render-kit-factory>
> >>>                   org.apache.myfaces.renderkit.RenderKitFactoryImpl
> >>>             </render-kit-factory>
> >>>       </factory>
> >>>
> >>>
> >>>       <application>
> >>>             <variable-resolver>
> >>> org.springframework.web.jsf.DelegatingVariableResolver</variable-resolver>
> >>>       <message-bundle>fwjJSFMessages</message-bundle>
> >>>
> >>>       <locale-config>
> >>>                   <default-locale>pt_BR</default-locale>
> >>>                   <supported-locale>en_US</supported-locale>
> >>>                   <supported-locale>en_GB</supported-locale>
> >>>                   <supported-locale>de</supported-locale>
> >>>                   <supported-locale>de_DE</supported-locale>
> >>>                   <supported-locale>de_AT</supported-locale>
> >>>                   <supported-locale>de_CH</supported-locale>
> >>>                   <supported-locale>ja_JP</supported-locale>
> >>>                   <supported-locale>ru_RU</supported-locale>
> >>>       </locale-config>
> >>>       </application>
> >>>
> >>>
> >>>       <managed-bean>
> >>>       <description>FWJ - CACHE NO ESCOPO DE APLICACAO</description>
> >>>       <managed-bean-name>fwjCacheAplicacaoBean</managed-bean-name>
> >>>       <managed-bean-class>
> >>> br.com.petrobras.fwj.web.beans.FwjCacheAplicacaoBean</managed-bean-class>
> >>>       <managed-bean-scope>application</managed-bean-scope>
> >>>       </managed-bean>
> >>>
> >>>       <managed-bean>
> >>>       <description>FWJ - CACHE SESSAO</description>
> >>>       <managed-bean-name>fwjCacheSessaoBean</managed-bean-name>
> >>>
> >> <managed-bean-class>br.com.petrobras.fwj.web.beans.FwjCacheSessaoBean
> >>> </managed-bean-class>
> >>>       <managed-bean-scope>session</managed-bean-scope>
> >>>       </managed-bean>
> >>>
> >>>       <managed-bean>
> >>>       <description>FWJ - SEGURANCA</description>
> >>>       <managed-bean-name>fwjSegurancaBean</managed-bean-name>
> >>>
> >> <managed-bean-class>br.com.petrobras.fwj.web.beans.FwjSegurancaBean</
> >>> managed-bean-class>
> >>>       <managed-bean-scope>session</managed-bean-scope>
> >>>       </managed-bean>
> >>>
> >>>       <managed-bean>
> >>>       <description>FWJ - ORDENACAO</description>
> >>>       <managed-bean-name>fwjOrdenacaoBean</managed-bean-name>
> >>>       <managed-bean-class>
> >> br.com.petrobras.fwj.web.beans.FwjOrdenacaoBean</
> >>> managed-bean-class>
> >>>       <managed-bean-scope>session</managed-bean-scope>
> >>>       </managed-bean>
> >>>
> >>>       <managed-bean>
> >>>       <description>FWJ - PROTOTIPO</description>
> >>>       <managed-bean-name>prototipoBean</managed-bean-name>
> >>>       <managed-bean-class>
> >>>
> >> br.com.petrobras.fwj.web.prototipo.beans.PrototipoBean</managed-bean-class>
> >>>       <managed-bean-scope>session</managed-bean-scope>
> >>>       </managed-bean>
> >>>
> >>>       <managed-bean>
> >>>       <description>FWJ - CONTROLADOR</description>
> >>>       <managed-bean-name>fwjControlador</managed-bean-name>
> >>>       <managed-bean-class>
> >>> br.com.petrobras.fwj.web.controlador.FwjControlador</managed-bean-class>
> >>>       <managed-bean-scope>request</managed-bean-scope>
> >>>       </managed-bean>
> >>>
> >>>       <managed-bean>
> >>>       <description>FWJ - LISTA BUSCA</description>
> >>>       <managed-bean-name>fwjListaBuscaBean</managed-bean-name>
> >>>       <managed-bean-class>br.com.petrobras.fwj.web.beans.FwjListaBuscaBean
> >>> </managed-bean-class>
> >>>       <managed-bean-scope>session</managed-bean-scope>
> >>>       </managed-bean>
> >>>
> >>>       <managed-bean>
> >>>       <description>FWJ - PROTOTIPO</description>
> >>>       <managed-bean-name>fwjPrototipoBean</managed-bean-name>
> >>>
> >> <managed-bean-class>br.com.petrobras.fwj.web.beans.FwjPrototipoBean</
> >>> managed-bean-class>
> >>>       <managed-bean-scope>session</managed-bean-scope>
> >>>       </managed-bean>
> >>>
> >>>       <managed-bean>
> >>>       <description>FWJ - GERENCIA O LAYOUT DA PAGINA (TAMANHO DA JANELA)</
> >>> description>
> >>>       <managed-bean-name>layout</managed-bean-name>
> >>>       <managed-bean-class>br.com.petrobras.fwj.web.beans.FwjLayoutBean</
> >>> managed-bean-class>
> >>>       <managed-bean-scope>session</managed-bean-scope>
> >>>       <managed-property>
> >>>                   <property-name>width</property-name>
> >>>                   <property-class>int</property-class>
> >>>                   <value>800</value>
> >>>       </managed-property>
> >>>       <managed-property>
> >>> <property-name>height</property-name>
> >>>                   <property-class>int</property-class>
> >>>                   <value>600</value>
> >>>       </managed-property>
> >>>       <managed-property>
> >>>                   <property-name>minimumWidth</property-name>
> >>>                   <property-class>int</property-class>
> >>>                   <value>700</value>
> >>>       </managed-property>
> >>>       <managed-property>
> >>>                   <property-name>minimumHeight</property-name>
> >>>                   <property-class>int</property-class>
> >>>                   <value>600</value>
> >>>       </managed-property>
> >>>       <managed-property>
> >>>                   <property-name>maximumWidth</property-name>
> >>>                   <property-class>int</property-class>
> >>>                   <value>1300</value>
> >>>       </managed-property>
> >>>       <managed-property>
> >>>                   <property-name>maximumHeight</property-name>
> >>>                   <property-class>int</property-class>
> >>>                   <value>700</value>
> >>>       </managed-property>
> >>>       </managed-bean>
> >>>
> >>>       <!-- SEGURANCA -->
> >>>       <navigation-rule>
> >>>       <from-view-id>*</from-view-id>
> >>>       <navigation-case>
> >>>                   <from-outcome>acesso_nao_permitido</from-outcome>
> >>>                   <to-view-id>/view/common/acessoNaoPermitido.jsp</
> >>> to-view-id>
> >>>       </navigation-case>
> >>>       </navigation-rule>
> >>>
> >>>       <!-- PAGINA DE ERRO -->
> >>>       <navigation-rule>
> >>>       <from-view-id>*</from-view-id>
> >>>       <navigation-case>
> >>>                   <from-outcome>erro</from-outcome>
> >>>                   <to-view-id>/view/common/erro.jsp</to-view-id>
> >>>       </navigation-case>
> >>>       </navigation-rule>
> >>>
> >>>
> >>>       <!-- CONVERSORES -->
> >>>       <converter>
> >>>             <converter-id>fwjBooleanStringConverter</converter-id>
> >>>             <converter-class>
> >>> br.com.petrobras.fwj.utils.FwjBooleanStringConverter </converter-class>
> >>>       </converter>
> >>>
> >>>       <!-- VALIDADORES -->
> >>>       <validator>
> >>>             <validator-id>fwjEmailValidator</validator-id>
> >>>             <validator-class>
> >> br.com.petrobras.fwj.utils.FwjEmailValidator</
> >>> validator-class>
> >>>       </validator>
> >>>       <validator>
> >>>             <validator-id>fwjTextoRequeridoValidator</validator-id>
> >>>             <validator-class>
> >>> br.com.petrobras.fwj.web.validator.FwjTextoRequeridoValidator</
> >>> validator-class>
> >>>       </validator>
> >>>
> >>> </faces-config>
> >>>
> >> =====================================================================================================================================================
> >>>
> >>> "O emitente desta mensagem é responsável por seu conteúdo e endereçamento.
> >>> Cabe ao destinatário cuidar quanto ao tratamento adequado. Sem a devida
> >>> autorização, a divulgação, a reprodução, a distribuição ou qualquer outra
> >>> ação em desconformidade com as normas internas do Sistema Petrobras são
> >>> proibidas e passíveis de sanção disciplinar, cível e criminal."
> >>>
> >>> "The sender of this message is responsible for its content and addressing.
> >>> The receiver shall take proper care of it. Without due authorization, the
> >>> publication, reproduction, distribution or the performance of  any other
> >>> action not conforming to Petrobras System internal policies and procedures
> >>> is forbidden and liable to disciplinary, civil or criminal  sanctions."
> >>>
> >>> " El emisor de este mensaje es responsable por su contenido y
> >>> direccionamiento. Cabe al destinatario darle el tratamiento adecuado. Sin
> >>> la debida autorización, su divulgación, reproducción, distribución o
> >>> cualquier otra acción no conforme a las normas internas del Sistema
> >>> Petrobras están prohibidas y serán pasibles de sanción disciplinaria,
> >> civil
> >>> y penal."
> >>>
> >>>
> >>
> >>
> >> --
> >> Alonso Isidoro Roman.
> >
> >
> >
>
>



-- 
http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces

Re: Bug using tomcat 6 and myfaces 1.2

Posted by Ognjen Blagojevic <og...@etf.bg.ac.yu>.
Hi Matthias,

I had similar problem. I tried to add the listener in web.xml, but that 
didn't help.

It seems to me that it has something to do with the internet connection. 
Starting tomcat (6.0.13) without internet connection causes application 
to throw this exception as soon as I try to view application home page. 
If the internet connection is enabled during tomcat startup everything 
works just fine.

Although exception message is verbose, I think it is misleading, because 
I cannot figure out what is the exact resource that application is 
trying to get from the internet.

BTW, that looks very similar to Tomahawk problem with DTD.

Regards,
Ognjen


HTTP Status 500 - type Exception report

message description: The server encountered an internal error () that 
prevented it from fulfilling this request.

exception

javax.servlet.ServletException: Servlet.init() for servlet Faces Servlet 
threw exception
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:563)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
     java.lang.Thread.run(Thread.java:619)

root cause

java.lang.IllegalStateException: No Factories configured for this 
Application. This happens if the faces-initialization does not work at 
all - make sure that you properly include all configuration settings 
necessary for a basic faces application and that all the necessary libs 
are included. Also check the logging output of your web application and 
your container for any exceptions!
If you did that and find nothing, the mistake might be due to the fact 
that you use some special web-containers which do not support 
registering context-listeners via TLD files and a context listener is 
not setup in your web.xml.
A typical config looks like this;
<listener>

<listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
</listener>

     javax.faces.FactoryFinder.getFactory(FactoryFinder.java:90)
     javax.faces.webapp.FacesServlet.init(FacesServlet.java:88)
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:563)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
     java.lang.Thread.run(Thread.java:619)

note The full stack trace of the root cause is available in the Apache 
Tomcat/6.0.13 logs.
Apache Tomcat/6.0.13


Matthias Wessendorf wrote:
> you need to conf the <listener> in your web.xml
> 
> -M
> 
> On Dec 20, 2007 2:07 PM, Alonso Isidoro Roman <al...@gmail.com> wrote:
>> SEVERE: StandardWrapper.Throwable
>> java.lang.IllegalStateExceptio
>> n: No Factories configured for this
>> Application. This happens if the faces-initialization does not work at all
>> - make sure that you properly include all configuration settings necessary
>> for a basic faces application and that all the necessary libs are included.
>> Also check the logging output of your web application and your container
>> for any exceptions!
>>  If you did that and find nothing, the mistake might be due to the fact that
>> you use some special web-containers which do not support registering
>> context-listeners via TLD files and a context listener is not setup in your
>> web.xml.
>> A typical config looks like this;
>> <listener>
>>
>> <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
>> </listener>
>>
>>
>>
>>  2007/12/20, diego.vieira.vivo.ACCENTURE@petrobras.com.br
>> <diego.vieira.vivo.ACCENTURE@petrobras.com.br >:
>>
>>> I have a problem when i try to deploy this happens
>>>
>>>
>> ======================================================================================================================================================
>>> 20/12/2007 09:19:55 org.apache.catalina.core.AprLifecycleListener init
>>> INFO: The Apache Tomcat Native library which allows optimal performance in
>>> production environments was not found on the java.library.path:
>> C:\Arquivos
>>> de programas\Java\jdk1.5.0
>>> _01\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\Arquivos de
>>> programas\Java\jdk1.5.0_01\bin\..\jre\bin\client;C:\Arquivos de
>>> programas\Java\jdk1.5.0_01\bin\..\jre\bin;C:\Arquivos de
>>> programas\Java\jdk1.5.0_01\bin;D:\oracle\ora92\bin;C:\Arquivos de
>>> programas\Oracle\jre\1.3.1\bin;C:\Arquivos de programas\Oracle\jre\1.1.8
>>> \bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Arquivos
>> de
>>> programas\Arquivos comuns\Autodesk Shared\;C:\Arquivos de
>>> programas\Autodesk\DWG TrueView\;C:\Arquivos de
>>> programas\Rational\common;C:\Arquivos de
>>> programas\Rational\ClearCase\bin;D:\dev\CVSNT\
>>> 20/12/2007 09:19:56 org.apache.coyote.http11.Http11Protocol init
>>> INFO: Initializing Coyote HTTP/1.1 on http-8080
>>> 20/12/2007 09:19:56 org.apache.catalina.startup.Catalina load
>>> INFO: Initialization processed in 871 ms
>>> 20/12/2007 09:19:56 org.apache.catalina.core.StandardService start
>>> INFO: Starting service Catalina
>>> 20/12/2007 09:19:56 org.apache.catalina.core.StandardEngine start
>>> INFO: Starting Servlet Engine: Apache Tomcat/6.0.14
>>> log4j:WARN No appenders could be found for logger
>>> (org.apache.myfaces.shared_impl.webapp.webxml.WebXmlParser).
>>> log4j:WARN Please initialize the log4j system properly.
>>> 20/12/2007 09:20:10 org.apache.catalina.core.ApplicationContext log
>>> INFO: Initializing Spring root WebApplicationContext
>>> 20/12/2007 09:20:19 org.apache.catalina.core.ApplicationContext log
>>> SEVERE: StandardWrapper.Throwable
>>> java.lang.IllegalStateException: No Factories configured for this
>>> Application. This happens if the faces-initialization does not work at all
>>> - make sure that you properly include all configuration settings necessary
>>> for a basic faces application and that all the necessary libs are
>> included.
>>> Also check the logging output of your web application and your container
>>> for any exceptions!
>>> If you did that and find nothing, the mistake might be due to the fact
>> that
>>> you use some special web-containers which do not support registering
>>> context-listeners via TLD files and a context listener is not setup in
>> your
>>> web.xml.
>>> A typical config looks like this;
>>> <listener>
>>>
>>>
>> <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
>>> </listener>
>>>
>>>       at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:90)
>>>       at javax.faces.webapp.FacesServlet.init (FacesServlet.java:88)
>>>       at org.apache.catalina.core.StandardWrapper.loadServlet(
>>> StandardWrapper.java:1161)
>>>       at org.apache.catalina.core.StandardWrapper.load(
>>> StandardWrapper.java:981)
>>>       at org.apache.catalina.core.StandardContext.loadOnStartup (
>>> StandardContext.java:4045)
>>>       at org.apache.catalina.core.StandardContext.start(
>>> StandardContext.java:4351)
>>>       at org.apache.catalina.core.ContainerBase.start(
>>> ContainerBase.java:1045)
>>>       at org.apache.catalina.core.StandardHost.start
>> (StandardHost.java:719)
>>>       at org.apache.catalina.core.ContainerBase.start(
>>> ContainerBase.java:1045)
>>>       at org.apache.catalina.core.StandardEngine.start(
>>> StandardEngine.java:443)
>>>       at org.apache.catalina.core.StandardService.start (
>>> StandardService.java:516)
>>>       at org.apache.catalina.core.StandardServer.start(
>>> StandardServer.java:710)
>>>       at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
>>>       at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
>>>       at sun.reflect.NativeMethodAccessorImpl.invoke(
>>> NativeMethodAccessorImpl.java:39)
>>>       at sun.reflect.DelegatingMethodAccessorImpl.invoke(
>>> DelegatingMethodAccessorImpl.java:25)
>>>       at java.lang.reflect.Method.invoke(Method.java:585)
>>>       at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
>>>       at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
>>> 20/12/2007 09:20:19 org.apache.catalina.core.StandardContext loadOnStartup
>>> SEVERE: Servlet /sigea threw load() exception
>>> java.lang.IllegalStateException: No Factories configured for this
>>> Application. This happens if the faces-initialization does not work at all
>>> - make sure that you properly include all configuration settings necessary
>>> for a basic faces application and that all the necessary libs are
>> included.
>>> Also check the logging output of your web application and your container
>>> for any exceptions!
>>> If you did that and find nothing, the mistake might be due to the fact
>> that
>>> you use some special web-containers which do not support registering
>>> context-listeners via TLD files and a context listener is not setup in
>> your
>>> web.xml.
>>> A typical config looks like this;
>>> <listener>
>>>
>>>
>> <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
>>> </listener>
>>>
>>>       at javax.faces.FactoryFinder.getFactory (FactoryFinder.java:90)
>>>       at javax.faces.webapp.FacesServlet.init(FacesServlet.java:88)
>>>       at org.apache.catalina.core.StandardWrapper.loadServlet(
>>> StandardWrapper.java:1161)
>>>       at org.apache.catalina.core.StandardWrapper.load (
>>> StandardWrapper.java:981)
>>>       at org.apache.catalina.core.StandardContext.loadOnStartup(
>>> StandardContext.java:4045)
>>>       at org.apache.catalina.core.StandardContext.start(
>>> StandardContext.java:4351)
>>>       at org.apache.catalina.core.ContainerBase.start(
>>> ContainerBase.java:1045)
>>>       at
>> org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
>>>       at org.apache.catalina.core.ContainerBase.start(
>>> ContainerBase.java:1045)
>>>       at org.apache.catalina.core.StandardEngine.start(
>>> StandardEngine.java:443)
>>>       at org.apache.catalina.core.StandardService.start(
>>> StandardService.java:516)
>>>       at org.apache.catalina.core.StandardServer.start (
>>> StandardServer.java:710)
>>>       at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
>>>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>       at sun.reflect.NativeMethodAccessorImpl.invoke (
>>> NativeMethodAccessorImpl.java:39)
>>>       at sun.reflect.DelegatingMethodAccessorImpl.invoke(
>>> DelegatingMethodAccessorImpl.java:25)
>>>       at java.lang.reflect.Method.invoke(Method.java:585)
>>>       at org.apache.catalina.startup.Bootstrap.start (Bootstrap.java:288)
>>>       at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
>>> 20/12/2007 09:20:19 org.apache.coyote.http11.Http11Protocol start
>>> INFO: Starting Coyote HTTP/1.1 on http-8080
>>> 20/12/2007 09:20:19 org.apache.jk.common.ChannelSocket init
>>> INFO: JK: ajp13 listening on /0.0.0.0:8009
>>> 20/12/2007 09:20:19 org.apache.jk.server.JkMain start
>>> INFO: Jk running ID=0 time=0/62  config=null
>>> 20/12/2007 09:20:19 org.apache.catalina.startup.Catalina start
>>> INFO: Server startup in 23815 ms
>>>
>>>
>> ======================================================================================================================================================
>>> Debugging i find out that  _registeredFactoryNames  is empty
>>> and i notice this in one class
>>> //TODO: null-check for Weblogic, that tries to initialize Servlet before
>>> ContextListener
>>> following goes my web.xml and faces
>>>
>> =====================================================================================================================================================
>>> /*
>>> * Copyright 2004 The Apache Software Foundation.
>>> *
>>> * Licensed under the Apache License, Version 2.0 (the "License");
>>> * you may not use this file except in compliance with the License.
>>> * You may obtain a copy of the License at
>>> *
>>> *      http://www.apache.org/licenses/LICENSE-2.0
>>> *
>>> * Unless required by applicable law or agreed to in writing, software
>>> * distributed under the License is distributed on an "AS IS" BASIS,
>>> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
>>> * See the License for the specific language governing permissions and
>>> * limitations under the License.
>>> */
>>> package javax.faces;
>>>
>>>
>>> import javax.faces.application.ApplicationFactory;
>>> import javax.faces.context.FacesContextFactory;
>>> import javax.faces.lifecycle.LifecycleFactory;
>>> import javax.faces.render.RenderKitFactory;
>>> import java.lang.reflect.Constructor;
>>> import java.lang.reflect.InvocationTargetException;
>>> import java.util.*;
>>>
>>> /**
>>> * see Javadoc of <a
>>> href="
>> http://java.sun.com/javaee/javaserverfaces/1.2/docs/api/index.html">JSF
>>> Specification</a>
>>> *
>>> * @author Manfred Geiler (latest modification by $Author: mbr $)
>>> * @version $Revision: 512227 $ $Date: 2007-02-27 13:25:16 +0100 (Di, 27
>>> Feb 2007) $
>>> */
>>> public final class FactoryFinder
>>> {
>>>     public static final String APPLICATION_FACTORY =
>>> "javax.faces.application.ApplicationFactory";
>>>     public static final String FACES_CONTEXT_FACTORY =
>>> "javax.faces.context.FacesContextFactory";
>>>     public static final String LIFECYCLE_FACTORY =
>>> "javax.faces.lifecycle.LifecycleFactory";
>>>     public static final String RENDER_KIT_FACTORY =
>>> "javax.faces.render.RenderKitFactory";
>>>
>>>     private static Map<ClassLoader, Map> _registeredFactoryNames = new
>>> HashMap<ClassLoader, Map>();
>>>     /**
>>>      * Maps from classLoader to another map, the container ( i.e. Tomcat)
>>> will create a class loader for
>>>      * each web app that it controls (typically anyway) and that class
>>> loader is used as the key.
>>>      *
>>>      * The secondary map maps the factory name (i.e.
>>> FactoryFinder.APPLICATION_FACTORY ) to actual instances
>>>      * that are created via getFactory. The instances will be of the class
>>> specified in the setFactory method
>>>      * for the factory name, i.e.
>>> FactoryFinder.setFactory(FactoryFinder.APPLICATION_FACTORY ,
>>> MyFactory.class).
>>>      */
>>>     private static Map<ClassLoader, Map> _factories = new
>>> HashMap<ClassLoader, Map>();
>>>
>>>     private static final Set<String> VALID_FACTORY_NAMES = new
>>> HashSet<String>();
>>>     private static final Map<String, Class> ABSTRACT_FACTORY_CLASSES = new
>>> HashMap<String, Class>();
>>>     static {
>>>         VALID_FACTORY_NAMES.add(APPLICATION_FACTORY);
>>>         VALID_FACTORY_NAMES.add(FACES_CONTEXT_FACTORY);
>>>         VALID_FACTORY_NAMES.add(LIFECYCLE_FACTORY);
>>>         VALID_FACTORY_NAMES.add(RENDER_KIT_FACTORY);
>>>
>>>         ABSTRACT_FACTORY_CLASSES.put(APPLICATION_FACTORY,
>>> ApplicationFactory.class);
>>>         ABSTRACT_FACTORY_CLASSES.put(FACES_CONTEXT_FACTORY,
>>> FacesContextFactory.class);
>>>         ABSTRACT_FACTORY_CLASSES.put(LIFECYCLE_FACTORY,
>>> LifecycleFactory.class);
>>>         ABSTRACT_FACTORY_CLASSES.put(RENDER_KIT_FACTORY,
>>> RenderKitFactory.class);
>>>     }
>>>
>>>
>>>   // avoid instantiation
>>>   FactoryFinder() {
>>>   }
>>>
>>>   public static Object getFactory(String factoryName)
>>>             throws FacesException
>>>     {
>>>         if(factoryName == null)
>>>             throw new NullPointerException("factoryName may not be null");
>>>
>>>         ClassLoader classLoader = getClassLoader();
>>>         Map factoryClassNames = _registeredFactoryNames.get(classLoader);
>>>
>>>         if (factoryClassNames == null)
>>>         {
>>>             String message = "No Factories configured for this
>> Application.
>>> This happens if the faces-initialization "+
>>>             "does not work at all - make sure that you properly include
>> all
>>> configuration settings necessary for a basic faces application " +
>>>             "and that all the necessary libs are included. Also check the
>>> logging output of your web application and your container for any
>>> exceptions!" +
>>>             "\nIf you did that and find nothing, the mistake might be due
>>> to the fact that you use some special web-containers which "+
>>>             "do not support registering context-listeners via TLD files
>> and
>>> " +
>>>             "a context listener is not setup in your web.xml.\n" +
>>>             "A typical config looks like this;\n<listener>\n" +
>>>             "
>>>
>> <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>\n"
>>> +
>>>             "</listener>\n";
>>>             throw new IllegalStateException(message);
>>>         }
>>>
>>>         if (! factoryClassNames.containsKey(factoryName)) {
>>>             throw new IllegalArgumentException("no factory " + factoryName
>>> + " configured for this application.");
>>>         }
>>>
>>>         Map<String, Object> factoryMap = _factories.get(classLoader);
>>>
>>>         if (factoryMap == null) {
>>>             factoryMap = new HashMap<String, Object>();
>>>             _factories.put(classLoader, factoryMap);
>>>         }
>>>         Object factory = factoryMap.get(factoryName);
>>>
>>>         if (factory == null) {
>>>             List classNames = (List) factoryClassNames.get(factoryName);
>>>             factory =
>>> newFactoryInstance(ABSTRACT_FACTORY_CLASSES.get(factoryName),
>>> classNames.iterator(), classLoader);
>>>             factoryMap.put(factoryName, factory);
>>>         }
>>>         return factory;
>>>     }
>>>
>>>
>>>     private static Object newFactoryInstance(Class interfaceClass,
>> Iterator
>>> classNamesIterator, ClassLoader classLoader)
>>>     {
>>>         try
>>>         {
>>>             Object current = null;
>>>
>>>             while (classNamesIterator.hasNext())
>>>             {
>>>                 String implClassName = (String) classNamesIterator.next();
>>>                 Class implClass = classLoader.loadClass(implClassName);
>>>
>>>                 // check, if class is of expected interface type
>>>                 if (!interfaceClass.isAssignableFrom(implClass))
>>>                 {
>>>                     throw new IllegalArgumentException("Class " +
>>> implClassName + " is no " + interfaceClass.getName());
>>>                 }
>>>
>>>                 if (current == null)
>>>                 {
>>>                     // nothing to decorate
>>>                     current = implClass.newInstance();
>>>                 } else
>>>                 {
>>>                     // let's check if class supports the decorator pattern
>>>                     try
>>>                     {
>>>                         Constructor delegationConstructor =
>>> implClass.getConstructor(new Class[]{interfaceClass});
>>>                         // impl class supports decorator pattern,
>>>                         try
>>>                         {
>>>                             // create new decorator wrapping current
>>>                             current =
>> delegationConstructor.newInstance(new
>>> Object[]{current});
>>>                         } catch (InstantiationException e)
>>>                         {
>>>                             throw new FacesException(e);
>>>                         } catch (IllegalAccessException e)
>>>                         {
>>>                             throw new FacesException(e);
>>>                         } catch (InvocationTargetException e)
>>>                         {
>>>                             throw new FacesException(e);
>>>                         }
>>>                     } catch (NoSuchMethodException e)
>>>                     {
>>>                         // no decorator pattern support
>>>                         current = implClass.newInstance();
>>>                     }
>>>                 }
>>>             }
>>>
>>>             return current;
>>>         } catch (ClassNotFoundException e)
>>>         {
>>>             throw new FacesException(e);
>>>         } catch (InstantiationException e)
>>>         {
>>>             throw new FacesException(e);
>>>         } catch (IllegalAccessException e)
>>>         {
>>>             throw new FacesException(e);
>>>         }
>>>     }
>>>
>>>
>>>     public static void setFactory(String factoryName,
>>>                                   String implName)
>>>     {
>>>         checkFactoryName(factoryName);
>>>
>>>         ClassLoader classLoader = getClassLoader();
>>>         synchronized(_registeredFactoryNames)
>>>         {
>>>             Map factories = _factories.get(classLoader);
>>>
>>>             if (factories != null && factories.containsKey(factoryName)) {
>>>                 // Javadoc says ... This method has no effect if
>>> getFactory() has already been
>>>                 // called looking for a factory for this factoryName.
>>>                 return;
>>>             }
>>>
>>>             Map<String, List> factoryClassNames =
>>> _registeredFactoryNames.get(classLoader);
>>>
>>>             if (factoryClassNames == null)
>>>             {
>>>                 factoryClassNames = new HashMap<String, List>();
>>>                 _registeredFactoryNames.put(classLoader,
>>> factoryClassNames);
>>>             }
>>>
>>>             List<String> classNameList =
>>> factoryClassNames.get(factoryName);
>>>
>>>             if (classNameList == null) {
>>>                 classNameList = new ArrayList<String>();
>>>                 factoryClassNames.put(factoryName, classNameList);
>>>             }
>>>             classNameList.add(implName);
>>>         }
>>>     }
>>>
>>>
>>>     public static void releaseFactories()
>>>             throws FacesException
>>>     {
>>>         ClassLoader classLoader = getClassLoader();
>>>         _factories.remove(classLoader);
>>>     }
>>>
>>>     private static void checkFactoryName(String factoryName)
>>>     {
>>>         if (! VALID_FACTORY_NAMES.contains(factoryName)) {
>>>             throw new IllegalArgumentException("factoryName '" +
>>> factoryName + "'");
>>>         }
>>>     }
>>>
>>>
>>>     private static ClassLoader getClassLoader()
>>>     {
>>>         try
>>>         {
>>>             ClassLoader classLoader =
>>> Thread.currentThread().getContextClassLoader();
>>>             if (classLoader == null)
>>>             {
>>>                 throw new FacesException("web application class loader
>>> cannot be identified", null);
>>>             }
>>>             return classLoader;
>>>         }
>>>         catch (Exception e)
>>>         {
>>>             throw new FacesException("web application class loader cannot
>>> be identified", e);
>>>         }
>>>     }
>>> }
>>>
>> =====================================================================================================================================================
>>> <?xml version=" 1.0" encoding="UTF-8"?>
>>>
>>> <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
>>>     xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance"
>>>     xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
>>> http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
>>>     version="2.4">
>>>
>>>   <display-name>Fwj - Framework Web Java</display-name>
>>>
>>>       <!-- ============================================ -->
>>>       <!-- CONFIGURACOES DA APLICACAO                   -->
>>>       <!-- ============================================ -->
>>>       <welcome-file-list>
>>>       <welcome-file>/index.jsp</welcome-file>
>>>       </welcome-file-list>
>>>
>>>     <context-param>
>>>         <param-name>javax.faces.CONFIG_FILES</param-name>
>>>         <param-value>
>>>             /WEB-INF/conf/fwj_faces-config.xml
>>>         </param-value>
>>>     </context-param>
>>>
>>>       <!-- ============================================ -->
>>>       <!-- TAG LIBS UTILIZADAS PELO FRAMEWORK           -->
>>>       <!-- ============================================ -->
>>>       <jsp-config>
>>>             <taglib>
>>>                   <taglib-uri>jstl_core</taglib-uri>
>>>                   <taglib-location>/WEB-INF/tags/jstl/c.tld</
>>> taglib-location>
>>>             </taglib>
>>>             <taglib>
>>>                   <taglib-uri>jstl_fmt</taglib-uri>
>>>                   <taglib-location>/WEB-INF/tags/jstl/fmt.tld</
>>> taglib-location>
>>>             </taglib>
>>>       </jsp-config>
>>>
>>>       <!-- ============================================ -->
>>>       <!-- SETA O LOCALE NO CONTEXTO JSF: O LOCALE      -->
>>>       <!-- SERA RECEBIDO COMO PARAMETRO                 -->
>>>       <!-- ============================================ -->
>>> <!--
>>>
>> =============================================================================================
>>> -->
>>>       <filter>
>>>           <filter-name>fwjUserLocaleFilter</filter-name>
>>>       <filter-class>br.com.petrobras.fwj.web.filter.FwjUserLocaleFilter</
>>> filter-class>
>>>       </filter>
>>>       <filter-mapping>
>>>       <filter-name>fwjUserLocaleFilter</filter-name>
>>>       <url-pattern>/index.jsp</url-pattern>
>>>       </filter-mapping>
>>> <!--
>>>
>> =============================================================================================
>>> -->
>>>       <!-- ============================================ -->
>>>       <!-- CASO A SESSAO TENHA EXPIRADO, REDIRECIONA    -->
>>>       <!-- PARA A PAGINA DE LOGIN                       -->
>>>       <!-- ============================================ -->
>>> <!--
>>>
>> =============================================================================================
>>> -->
>>>       <filter>
>>>       <filter-name>fwjSessionCheckFilter</filter-name>
>>>       <filter-class>
>> br.com.petrobras.fwj.web.filter.FwjSessionCheckFilter</
>>> filter-class>
>>>       </filter>
>>>       <filter-mapping>
>>>       <filter-name>fwjSessionCheckFilter</filter-name>
>>>       <url-pattern>/paginas/*</url-pattern>
>>>       </filter-mapping>
>>> <!--
>>>
>> =============================================================================================
>>> -->
>>>       <!-- ============================================ -->
>>>       <!-- FILTRO PARA EXTENDER OS COMPONENTES VISUAIS  -->
>>>       <!-- DO TOBAGO                                    -->
>>>       <!-- ============================================ -->
>>> <!--
>>>
>> =============================================================================================
>>> -->
>>>       <filter>
>>>             <filter-name>fwjPaginaFilter</filter-name>
>>>             <filter-class>
>>> br.com.petrobras.sigea.ext.web.filter.PaginaFilter</filter-class>
>>>             <init-param>
>>>                   <param-name>encoding</param-name>
>>>                   <param-value>ISO-8859-1</param-value>
>>>             </init-param>
>>>       </filter>
>>>     <filter-mapping>
>>>       <filter-name>fwjPaginaFilter</filter-name>
>>>           <url-pattern>/paginas/view/*</url-pattern>
>>>       </filter-mapping>
>>> <!--
>>>
>> =============================================================================================
>>> -->
>>>
>>>       <!-- ============================================ -->
>>>       <!-- SERVLET DE AUTENTICACAO                      -->
>>>       <!-- ============================================ -->
>>> <!--
>>>
>> =============================================================================================
>>> -->
>>>       <servlet>
>>>       <servlet-name>fwjAutenticacaoServlet</servlet-name>
>>>       <servlet-class>
>>> br.com.petrobras.fwj.web.servlet.FwjAutenticacaoServlet</servlet-class>
>>>       </servlet>
>>>       <servlet-mapping>
>>>       <servlet-name>fwjAutenticacaoServlet</servlet-name>
>>>             <url-pattern>/fwjAutenticacaoServlet</url-pattern>
>>>       </servlet-mapping>
>>> <!--
>>>
>> =============================================================================================
>>> -->
>>> <!-- ============================================ -->
>>> <!-- CONFIGURACOES DO TOBAGO                      -->
>>> <!-- ============================================ -->
>>>       <servlet>
>>>       <servlet-name>FacesServlet</servlet-name>
>>>       <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
>>>       <load-on-startup>5</load-on-startup>
>>>       </servlet>
>>>       <servlet-mapping>
>>>       <servlet-name>FacesServlet</servlet-name>
>>>             <url-pattern>/paginas/*</url-pattern>
>>>       </servlet-mapping>
>>> <!--
>>>
>> =============================================================================================
>>> -->
>>>       <context-param>
>>>         <param-name>javax.faces.STATE_SAVING_METHOD </param-name>
>>>         <param-value>server</param-value>
>>>     </context-param>
>>>
>>>     <context-param>
>>>         <param-name>net.sourceforge.myfaces.PRETTY_HTML</param-name>
>>>         <param-value>true</param-value>
>>>     </context-param>
>>>
>>>     <context-param>
>>>         <param-name>net.sourceforge.myfaces.ALLOW_JAVASCRIPT</param-name>
>>>         <param-value>true</param-value>
>>>     </context-param>
>>>
>>>     <context-param>
>>>         <param-name>net.sourceforge.myfaces.DETECT_JAVASCRIPT</param-name>
>>>         <param-value>false</param-value>
>>>     </context-param>
>>> <!--
>>>
>> =============================================================================================
>>> -->
>>>       <listener>
>>>             <listener-class>
>>> org.apache.myfaces.webapp.StartupServletContextListener </listener-class>
>>>       </listener>
>>>
>>>       <listener>
>>>       <listener-class>
>>> org.apache.myfaces.tobago.webapp.TobagoServletContextListener</
>>> listener-class>
>>>       </listener>
>>> <!--
>>>
>> =============================================================================================
>>> -->
>>>       <filter>
>>>       <filter-name>multipartFormdataFilter</filter-name>
>>>       <filter-class>
>>> org.apache.myfaces.tobago.webapp.TobagoMultipartFormdataFilter</
>>> filter-class>
>>>       </filter>
>>>
>>>       <filter-mapping>
>>>       <filter-name>multipartFormdataFilter</filter-name>
>>>       <url-pattern>/paginas/*</url-pattern>
>>>       </filter-mapping>
>>> <!--
>>>
>> =============================================================================================
>>> -->
>>>
>>> <!--
>>>
>> =============================================================================================
>>> -->
>>> <!-- ============================================ -->
>>> <!-- CONFIGURACOES DO SPRING                      -->
>>> <!-- ============================================ -->
>>>
>>> <!-- Substituido pelo listener  -->
>>> <!--
>>>       <servlet>
>>>             <servlet-name>context</servlet-name>
>>>
>>> <servlet-class>org.springframework.web.context.ContextLoaderServlet
>>>             </servlet-class>
>>>             <load-on-startup>1</load-on-startup>
>>>       </servlet>
>>> -->
>>>       <listener>
>>>
>> <listener-class>org.springframework.web.context.ContextLoaderListener
>>> </listener-class>
>>>       </listener>
>>>       <context-param>
>>>       <param-name>contextConfigLocation</param-name>
>>>       <param-value>
>>>             /WEB-INF/conf/_spring/aplicacao_contexto-service.xml,
>>>
>>>             /WEB-INF/conf/_spring/aplicacao_contexto-jdbc.xml,
>>>                   /WEB-INF/conf/_spring/aplicacao_contexto- dao.xml,
>>>
>>>
>>> /WEB-INF/conf/componenteMolecular/comp_molecular-servico.xml,
>>>
>> /WEB-INF/conf/componenteMolecular/comp_molecular-dao.xml,
>>>
>>> /WEB-INF/conf/tipoEstruturaOrganizacional/tipo_estrutura_organizacional-
>> servico.xml,
>>>
>> /WEB-INF/conf/tipoEstruturaOrganizacional/tipo_estrutura_organizacional-dao.xml,
>>>
>>> /WEB-INF/conf/tipoCombustivel/tipo_combustivel-servico.xml,
>>>                   /WEB-INF/conf/tipoCombustivel/tipo_combustivel- dao.xml,
>>>
>>>
>>> /WEB-INF/conf/combustivelPadrao/combustivel_padrao-servico.xml,
>>>
>>> /WEB-INF/conf/combustivelPadrao/combustivel_padrao-dao.xml,
>>>
>>>
>>> /WEB-INF/conf/tipoFonteEmissora/tipo_fonte_emissora-servico.xml ,
>>>
>>> /WEB-INF/conf/tipoFonteEmissora/tipo_fonte_emissora-dao.xml,
>>>
>>>
>>>
>> /WEB-INF/conf/estruturaOrganizacionalPadrao/estrutura_organizacional_padrao-servico.xml,
>>>
>> /WEB-INF/conf/estruturaOrganizacionalPadrao/estrutura_organizacional_padrao-
>> dao.xml,
>>>                   /WEB-INF/conf/fonteEmissora/fonte_emissora-servico.xml,
>>>                   /WEB-INF/conf/fonteEmissora/fonte_emissora-dao.xml,
>>>
>>>
>>> /WEB-INF/conf/estruturaOrganizacional/estrutura_organizacional-
>> servico.xml,
>>> /WEB-INF/conf/estruturaOrganizacional/estrutura_organizacional-dao.xml
>>>
>>>             </param-value>
>>>       </context-param>
>>>
>>> <!-- Spring MVC não utilizado pelo fwj -->
>>> <!--
>>>       <servlet>
>>>       <servlet-name>action</servlet-name>
>>>
>>>
>> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
>>>       <load-on-startup>1</load-on-startup>
>>>       </servlet>
>>> -->
>>> <!-- ============================================ -->
>>> <!-- CONFIGURACOES DO HIBERNATE                   -->
>>> <!-- ============================================ -->
>>>
>>>       <filter>
>>>             <filter-name>hibernateFilter</filter-name>
>>>             <filter-class>
>>> org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</
>>> filter-class>
>>>       </filter>
>>>       <filter-mapping>
>>>             <filter-name>hibernateFilter</filter-name>
>>>             <url-pattern>*.jsp</url-pattern>
>>>       </filter-mapping>
>>>
>>> </web-app>
>>>
>> =====================================================================================================================================================
>>> <?xml version="1.0" encoding="UTF-8"?>
>>> <!DOCTYPE faces-config PUBLIC
>>>   "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
>>>   "http://java.sun.com/dtd/web-facesconfig_1_1.dtd ">
>>>
>>> <faces-config>
>>>       <factory>
>>>             <application-factory>
>>>                    org.apache.myfaces.application.ApplicationFactoryImpl
>>>             </application-factory>
>>>             <faces-context-factory>
>>>
>>> org.apache.myfaces.tobago.lifecycle.TobagoLifecycleFactory
>>>             </faces-context-factory>
>>>             <faces-context-factory>
>>>                    org.apache.myfaces.context.FacesContextFactoryImpl
>>>             </faces-context-factory>
>>>             <render-kit-factory>
>>>                   org.apache.myfaces.renderkit.RenderKitFactoryImpl
>>>             </render-kit-factory>
>>>       </factory>
>>>
>>>
>>>       <application>
>>>             <variable-resolver>
>>> org.springframework.web.jsf.DelegatingVariableResolver</variable-resolver>
>>>       <message-bundle>fwjJSFMessages</message-bundle>
>>>
>>>       <locale-config>
>>>                   <default-locale>pt_BR</default-locale>
>>>                   <supported-locale>en_US</supported-locale>
>>>                   <supported-locale>en_GB</supported-locale>
>>>                   <supported-locale>de</supported-locale>
>>>                   <supported-locale>de_DE</supported-locale>
>>>                   <supported-locale>de_AT</supported-locale>
>>>                   <supported-locale>de_CH</supported-locale>
>>>                   <supported-locale>ja_JP</supported-locale>
>>>                   <supported-locale>ru_RU</supported-locale>
>>>       </locale-config>
>>>       </application>
>>>
>>>
>>>       <managed-bean>
>>>       <description>FWJ - CACHE NO ESCOPO DE APLICACAO</description>
>>>       <managed-bean-name>fwjCacheAplicacaoBean</managed-bean-name>
>>>       <managed-bean-class>
>>> br.com.petrobras.fwj.web.beans.FwjCacheAplicacaoBean</managed-bean-class>
>>>       <managed-bean-scope>application</managed-bean-scope>
>>>       </managed-bean>
>>>
>>>       <managed-bean>
>>>       <description>FWJ - CACHE SESSAO</description>
>>>       <managed-bean-name>fwjCacheSessaoBean</managed-bean-name>
>>>
>> <managed-bean-class>br.com.petrobras.fwj.web.beans.FwjCacheSessaoBean
>>> </managed-bean-class>
>>>       <managed-bean-scope>session</managed-bean-scope>
>>>       </managed-bean>
>>>
>>>       <managed-bean>
>>>       <description>FWJ - SEGURANCA</description>
>>>       <managed-bean-name>fwjSegurancaBean</managed-bean-name>
>>>
>> <managed-bean-class>br.com.petrobras.fwj.web.beans.FwjSegurancaBean</
>>> managed-bean-class>
>>>       <managed-bean-scope>session</managed-bean-scope>
>>>       </managed-bean>
>>>
>>>       <managed-bean>
>>>       <description>FWJ - ORDENACAO</description>
>>>       <managed-bean-name>fwjOrdenacaoBean</managed-bean-name>
>>>       <managed-bean-class>
>> br.com.petrobras.fwj.web.beans.FwjOrdenacaoBean</
>>> managed-bean-class>
>>>       <managed-bean-scope>session</managed-bean-scope>
>>>       </managed-bean>
>>>
>>>       <managed-bean>
>>>       <description>FWJ - PROTOTIPO</description>
>>>       <managed-bean-name>prototipoBean</managed-bean-name>
>>>       <managed-bean-class>
>>>
>> br.com.petrobras.fwj.web.prototipo.beans.PrototipoBean</managed-bean-class>
>>>       <managed-bean-scope>session</managed-bean-scope>
>>>       </managed-bean>
>>>
>>>       <managed-bean>
>>>       <description>FWJ - CONTROLADOR</description>
>>>       <managed-bean-name>fwjControlador</managed-bean-name>
>>>       <managed-bean-class>
>>> br.com.petrobras.fwj.web.controlador.FwjControlador</managed-bean-class>
>>>       <managed-bean-scope>request</managed-bean-scope>
>>>       </managed-bean>
>>>
>>>       <managed-bean>
>>>       <description>FWJ - LISTA BUSCA</description>
>>>       <managed-bean-name>fwjListaBuscaBean</managed-bean-name>
>>>       <managed-bean-class>br.com.petrobras.fwj.web.beans.FwjListaBuscaBean
>>> </managed-bean-class>
>>>       <managed-bean-scope>session</managed-bean-scope>
>>>       </managed-bean>
>>>
>>>       <managed-bean>
>>>       <description>FWJ - PROTOTIPO</description>
>>>       <managed-bean-name>fwjPrototipoBean</managed-bean-name>
>>>
>> <managed-bean-class>br.com.petrobras.fwj.web.beans.FwjPrototipoBean</
>>> managed-bean-class>
>>>       <managed-bean-scope>session</managed-bean-scope>
>>>       </managed-bean>
>>>
>>>       <managed-bean>
>>>       <description>FWJ - GERENCIA O LAYOUT DA PAGINA (TAMANHO DA JANELA)</
>>> description>
>>>       <managed-bean-name>layout</managed-bean-name>
>>>       <managed-bean-class>br.com.petrobras.fwj.web.beans.FwjLayoutBean</
>>> managed-bean-class>
>>>       <managed-bean-scope>session</managed-bean-scope>
>>>       <managed-property>
>>>                   <property-name>width</property-name>
>>>                   <property-class>int</property-class>
>>>                   <value>800</value>
>>>       </managed-property>
>>>       <managed-property>
>>> <property-name>height</property-name>
>>>                   <property-class>int</property-class>
>>>                   <value>600</value>
>>>       </managed-property>
>>>       <managed-property>
>>>                   <property-name>minimumWidth</property-name>
>>>                   <property-class>int</property-class>
>>>                   <value>700</value>
>>>       </managed-property>
>>>       <managed-property>
>>>                   <property-name>minimumHeight</property-name>
>>>                   <property-class>int</property-class>
>>>                   <value>600</value>
>>>       </managed-property>
>>>       <managed-property>
>>>                   <property-name>maximumWidth</property-name>
>>>                   <property-class>int</property-class>
>>>                   <value>1300</value>
>>>       </managed-property>
>>>       <managed-property>
>>>                   <property-name>maximumHeight</property-name>
>>>                   <property-class>int</property-class>
>>>                   <value>700</value>
>>>       </managed-property>
>>>       </managed-bean>
>>>
>>>       <!-- SEGURANCA -->
>>>       <navigation-rule>
>>>       <from-view-id>*</from-view-id>
>>>       <navigation-case>
>>>                   <from-outcome>acesso_nao_permitido</from-outcome>
>>>                   <to-view-id>/view/common/acessoNaoPermitido.jsp</
>>> to-view-id>
>>>       </navigation-case>
>>>       </navigation-rule>
>>>
>>>       <!-- PAGINA DE ERRO -->
>>>       <navigation-rule>
>>>       <from-view-id>*</from-view-id>
>>>       <navigation-case>
>>>                   <from-outcome>erro</from-outcome>
>>>                   <to-view-id>/view/common/erro.jsp</to-view-id>
>>>       </navigation-case>
>>>       </navigation-rule>
>>>
>>>
>>>       <!-- CONVERSORES -->
>>>       <converter>
>>>             <converter-id>fwjBooleanStringConverter</converter-id>
>>>             <converter-class>
>>> br.com.petrobras.fwj.utils.FwjBooleanStringConverter </converter-class>
>>>       </converter>
>>>
>>>       <!-- VALIDADORES -->
>>>       <validator>
>>>             <validator-id>fwjEmailValidator</validator-id>
>>>             <validator-class>
>> br.com.petrobras.fwj.utils.FwjEmailValidator</
>>> validator-class>
>>>       </validator>
>>>       <validator>
>>>             <validator-id>fwjTextoRequeridoValidator</validator-id>
>>>             <validator-class>
>>> br.com.petrobras.fwj.web.validator.FwjTextoRequeridoValidator</
>>> validator-class>
>>>       </validator>
>>>
>>> </faces-config>
>>>
>> =====================================================================================================================================================
>>>
>>> "O emitente desta mensagem é responsável por seu conteúdo e endereçamento.
>>> Cabe ao destinatário cuidar quanto ao tratamento adequado. Sem a devida
>>> autorização, a divulgação, a reprodução, a distribuição ou qualquer outra
>>> ação em desconformidade com as normas internas do Sistema Petrobras são
>>> proibidas e passíveis de sanção disciplinar, cível e criminal."
>>>
>>> "The sender of this message is responsible for its content and addressing.
>>> The receiver shall take proper care of it. Without due authorization, the
>>> publication, reproduction, distribution or the performance of  any other
>>> action not conforming to Petrobras System internal policies and procedures
>>> is forbidden and liable to disciplinary, civil or criminal  sanctions."
>>>
>>> " El emisor de este mensaje es responsable por su contenido y
>>> direccionamiento. Cabe al destinatario darle el tratamiento adecuado. Sin
>>> la debida autorización, su divulgación, reproducción, distribución o
>>> cualquier otra acción no conforme a las normas internas del Sistema
>>> Petrobras están prohibidas y serán pasibles de sanción disciplinaria,
>> civil
>>> y penal."
>>>
>>>
>>
>>
>> --
>> Alonso Isidoro Roman.
> 
> 
> 


Re: Bug using tomcat 6 and myfaces 1.2

Posted by Matthias Wessendorf <ma...@apache.org>.
you need to conf the <listener> in your web.xml

-M

On Dec 20, 2007 2:07 PM, Alonso Isidoro Roman <al...@gmail.com> wrote:
> SEVERE: StandardWrapper.Throwable
> java.lang.IllegalStateExceptio
> n: No Factories configured for this
> Application. This happens if the faces-initialization does not work at all
> - make sure that you properly include all configuration settings necessary
> for a basic faces application and that all the necessary libs are included.
> Also check the logging output of your web application and your container
> for any exceptions!
>  If you did that and find nothing, the mistake might be due to the fact that
> you use some special web-containers which do not support registering
> context-listeners via TLD files and a context listener is not setup in your
> web.xml.
> A typical config looks like this;
> <listener>
>
> <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
> </listener>
>
>
>
>  2007/12/20, diego.vieira.vivo.ACCENTURE@petrobras.com.br
> <diego.vieira.vivo.ACCENTURE@petrobras.com.br >:
>
> >
> > I have a problem when i try to deploy this happens
> >
> >
> ======================================================================================================================================================
> > 20/12/2007 09:19:55 org.apache.catalina.core.AprLifecycleListener init
> > INFO: The Apache Tomcat Native library which allows optimal performance in
> > production environments was not found on the java.library.path:
> C:\Arquivos
> > de programas\Java\jdk1.5.0
> > _01\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\Arquivos de
> > programas\Java\jdk1.5.0_01\bin\..\jre\bin\client;C:\Arquivos de
> > programas\Java\jdk1.5.0_01\bin\..\jre\bin;C:\Arquivos de
> > programas\Java\jdk1.5.0_01\bin;D:\oracle\ora92\bin;C:\Arquivos de
> > programas\Oracle\jre\1.3.1\bin;C:\Arquivos de programas\Oracle\jre\1.1.8
> > \bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Arquivos
> de
> > programas\Arquivos comuns\Autodesk Shared\;C:\Arquivos de
> > programas\Autodesk\DWG TrueView\;C:\Arquivos de
> > programas\Rational\common;C:\Arquivos de
> > programas\Rational\ClearCase\bin;D:\dev\CVSNT\
> > 20/12/2007 09:19:56 org.apache.coyote.http11.Http11Protocol init
> > INFO: Initializing Coyote HTTP/1.1 on http-8080
> > 20/12/2007 09:19:56 org.apache.catalina.startup.Catalina load
> > INFO: Initialization processed in 871 ms
> > 20/12/2007 09:19:56 org.apache.catalina.core.StandardService start
> > INFO: Starting service Catalina
> > 20/12/2007 09:19:56 org.apache.catalina.core.StandardEngine start
> > INFO: Starting Servlet Engine: Apache Tomcat/6.0.14
> > log4j:WARN No appenders could be found for logger
> > (org.apache.myfaces.shared_impl.webapp.webxml.WebXmlParser).
> > log4j:WARN Please initialize the log4j system properly.
> > 20/12/2007 09:20:10 org.apache.catalina.core.ApplicationContext log
> > INFO: Initializing Spring root WebApplicationContext
> > 20/12/2007 09:20:19 org.apache.catalina.core.ApplicationContext log
> > SEVERE: StandardWrapper.Throwable
> > java.lang.IllegalStateException: No Factories configured for this
> > Application. This happens if the faces-initialization does not work at all
> > - make sure that you properly include all configuration settings necessary
> > for a basic faces application and that all the necessary libs are
> included.
> > Also check the logging output of your web application and your container
> > for any exceptions!
> > If you did that and find nothing, the mistake might be due to the fact
> that
> > you use some special web-containers which do not support registering
> > context-listeners via TLD files and a context listener is not setup in
> your
> > web.xml.
> > A typical config looks like this;
> > <listener>
> >
> >
> <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
> > </listener>
> >
> >       at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:90)
> >       at javax.faces.webapp.FacesServlet.init (FacesServlet.java:88)
> >       at org.apache.catalina.core.StandardWrapper.loadServlet(
> > StandardWrapper.java:1161)
> >       at org.apache.catalina.core.StandardWrapper.load(
> > StandardWrapper.java:981)
> >       at org.apache.catalina.core.StandardContext.loadOnStartup (
> > StandardContext.java:4045)
> >       at org.apache.catalina.core.StandardContext.start(
> > StandardContext.java:4351)
> >       at org.apache.catalina.core.ContainerBase.start(
> > ContainerBase.java:1045)
> >       at org.apache.catalina.core.StandardHost.start
> (StandardHost.java:719)
> >       at org.apache.catalina.core.ContainerBase.start(
> > ContainerBase.java:1045)
> >       at org.apache.catalina.core.StandardEngine.start(
> > StandardEngine.java:443)
> >       at org.apache.catalina.core.StandardService.start (
> > StandardService.java:516)
> >       at org.apache.catalina.core.StandardServer.start(
> > StandardServer.java:710)
> >       at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
> >       at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
> >       at sun.reflect.NativeMethodAccessorImpl.invoke(
> > NativeMethodAccessorImpl.java:39)
> >       at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> > DelegatingMethodAccessorImpl.java:25)
> >       at java.lang.reflect.Method.invoke(Method.java:585)
> >       at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
> >       at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
> > 20/12/2007 09:20:19 org.apache.catalina.core.StandardContext loadOnStartup
> > SEVERE: Servlet /sigea threw load() exception
> > java.lang.IllegalStateException: No Factories configured for this
> > Application. This happens if the faces-initialization does not work at all
> > - make sure that you properly include all configuration settings necessary
> > for a basic faces application and that all the necessary libs are
> included.
> > Also check the logging output of your web application and your container
> > for any exceptions!
> > If you did that and find nothing, the mistake might be due to the fact
> that
> > you use some special web-containers which do not support registering
> > context-listeners via TLD files and a context listener is not setup in
> your
> > web.xml.
> > A typical config looks like this;
> > <listener>
> >
> >
> <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
> > </listener>
> >
> >       at javax.faces.FactoryFinder.getFactory (FactoryFinder.java:90)
> >       at javax.faces.webapp.FacesServlet.init(FacesServlet.java:88)
> >       at org.apache.catalina.core.StandardWrapper.loadServlet(
> > StandardWrapper.java:1161)
> >       at org.apache.catalina.core.StandardWrapper.load (
> > StandardWrapper.java:981)
> >       at org.apache.catalina.core.StandardContext.loadOnStartup(
> > StandardContext.java:4045)
> >       at org.apache.catalina.core.StandardContext.start(
> > StandardContext.java:4351)
> >       at org.apache.catalina.core.ContainerBase.start(
> > ContainerBase.java:1045)
> >       at
> org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
> >       at org.apache.catalina.core.ContainerBase.start(
> > ContainerBase.java:1045)
> >       at org.apache.catalina.core.StandardEngine.start(
> > StandardEngine.java:443)
> >       at org.apache.catalina.core.StandardService.start(
> > StandardService.java:516)
> >       at org.apache.catalina.core.StandardServer.start (
> > StandardServer.java:710)
> >       at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
> >       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >       at sun.reflect.NativeMethodAccessorImpl.invoke (
> > NativeMethodAccessorImpl.java:39)
> >       at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> > DelegatingMethodAccessorImpl.java:25)
> >       at java.lang.reflect.Method.invoke(Method.java:585)
> >       at org.apache.catalina.startup.Bootstrap.start (Bootstrap.java:288)
> >       at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
> > 20/12/2007 09:20:19 org.apache.coyote.http11.Http11Protocol start
> > INFO: Starting Coyote HTTP/1.1 on http-8080
> > 20/12/2007 09:20:19 org.apache.jk.common.ChannelSocket init
> > INFO: JK: ajp13 listening on /0.0.0.0:8009
> > 20/12/2007 09:20:19 org.apache.jk.server.JkMain start
> > INFO: Jk running ID=0 time=0/62  config=null
> > 20/12/2007 09:20:19 org.apache.catalina.startup.Catalina start
> > INFO: Server startup in 23815 ms
> >
> >
> ======================================================================================================================================================
> >
> > Debugging i find out that  _registeredFactoryNames  is empty
> > and i notice this in one class
> > //TODO: null-check for Weblogic, that tries to initialize Servlet before
> > ContextListener
> > following goes my web.xml and faces
> >
> =====================================================================================================================================================
> > /*
> > * Copyright 2004 The Apache Software Foundation.
> > *
> > * Licensed under the Apache License, Version 2.0 (the "License");
> > * you may not use this file except in compliance with the License.
> > * You may obtain a copy of the License at
> > *
> > *      http://www.apache.org/licenses/LICENSE-2.0
> > *
> > * Unless required by applicable law or agreed to in writing, software
> > * distributed under the License is distributed on an "AS IS" BASIS,
> > * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
> > * See the License for the specific language governing permissions and
> > * limitations under the License.
> > */
> > package javax.faces;
> >
> >
> > import javax.faces.application.ApplicationFactory;
> > import javax.faces.context.FacesContextFactory;
> > import javax.faces.lifecycle.LifecycleFactory;
> > import javax.faces.render.RenderKitFactory;
> > import java.lang.reflect.Constructor;
> > import java.lang.reflect.InvocationTargetException;
> > import java.util.*;
> >
> > /**
> > * see Javadoc of <a
> > href="
> http://java.sun.com/javaee/javaserverfaces/1.2/docs/api/index.html">JSF
> > Specification</a>
> > *
> > * @author Manfred Geiler (latest modification by $Author: mbr $)
> > * @version $Revision: 512227 $ $Date: 2007-02-27 13:25:16 +0100 (Di, 27
> > Feb 2007) $
> > */
> > public final class FactoryFinder
> > {
> >     public static final String APPLICATION_FACTORY =
> > "javax.faces.application.ApplicationFactory";
> >     public static final String FACES_CONTEXT_FACTORY =
> > "javax.faces.context.FacesContextFactory";
> >     public static final String LIFECYCLE_FACTORY =
> > "javax.faces.lifecycle.LifecycleFactory";
> >     public static final String RENDER_KIT_FACTORY =
> > "javax.faces.render.RenderKitFactory";
> >
> >     private static Map<ClassLoader, Map> _registeredFactoryNames = new
> > HashMap<ClassLoader, Map>();
> >     /**
> >      * Maps from classLoader to another map, the container ( i.e. Tomcat)
> > will create a class loader for
> >      * each web app that it controls (typically anyway) and that class
> > loader is used as the key.
> >      *
> >      * The secondary map maps the factory name (i.e.
> > FactoryFinder.APPLICATION_FACTORY ) to actual instances
> >      * that are created via getFactory. The instances will be of the class
> > specified in the setFactory method
> >      * for the factory name, i.e.
> > FactoryFinder.setFactory(FactoryFinder.APPLICATION_FACTORY ,
> > MyFactory.class).
> >      */
> >     private static Map<ClassLoader, Map> _factories = new
> > HashMap<ClassLoader, Map>();
> >
> >     private static final Set<String> VALID_FACTORY_NAMES = new
> > HashSet<String>();
> >     private static final Map<String, Class> ABSTRACT_FACTORY_CLASSES = new
> > HashMap<String, Class>();
> >     static {
> >         VALID_FACTORY_NAMES.add(APPLICATION_FACTORY);
> >         VALID_FACTORY_NAMES.add(FACES_CONTEXT_FACTORY);
> >         VALID_FACTORY_NAMES.add(LIFECYCLE_FACTORY);
> >         VALID_FACTORY_NAMES.add(RENDER_KIT_FACTORY);
> >
> >         ABSTRACT_FACTORY_CLASSES.put(APPLICATION_FACTORY,
> > ApplicationFactory.class);
> >         ABSTRACT_FACTORY_CLASSES.put(FACES_CONTEXT_FACTORY,
> > FacesContextFactory.class);
> >         ABSTRACT_FACTORY_CLASSES.put(LIFECYCLE_FACTORY,
> > LifecycleFactory.class);
> >         ABSTRACT_FACTORY_CLASSES.put(RENDER_KIT_FACTORY,
> > RenderKitFactory.class);
> >     }
> >
> >
> >   // avoid instantiation
> >   FactoryFinder() {
> >   }
> >
> >   public static Object getFactory(String factoryName)
> >             throws FacesException
> >     {
> >         if(factoryName == null)
> >             throw new NullPointerException("factoryName may not be null");
> >
> >         ClassLoader classLoader = getClassLoader();
> >         Map factoryClassNames = _registeredFactoryNames.get(classLoader);
> >
> >         if (factoryClassNames == null)
> >         {
> >             String message = "No Factories configured for this
> Application.
> > This happens if the faces-initialization "+
> >             "does not work at all - make sure that you properly include
> all
> > configuration settings necessary for a basic faces application " +
> >             "and that all the necessary libs are included. Also check the
> > logging output of your web application and your container for any
> > exceptions!" +
> >             "\nIf you did that and find nothing, the mistake might be due
> > to the fact that you use some special web-containers which "+
> >             "do not support registering context-listeners via TLD files
> and
> > " +
> >             "a context listener is not setup in your web.xml.\n" +
> >             "A typical config looks like this;\n<listener>\n" +
> >             "
> >
> <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>\n"
> > +
> >             "</listener>\n";
> >             throw new IllegalStateException(message);
> >         }
> >
> >         if (! factoryClassNames.containsKey(factoryName)) {
> >             throw new IllegalArgumentException("no factory " + factoryName
> > + " configured for this application.");
> >         }
> >
> >         Map<String, Object> factoryMap = _factories.get(classLoader);
> >
> >         if (factoryMap == null) {
> >             factoryMap = new HashMap<String, Object>();
> >             _factories.put(classLoader, factoryMap);
> >         }
> >         Object factory = factoryMap.get(factoryName);
> >
> >         if (factory == null) {
> >             List classNames = (List) factoryClassNames.get(factoryName);
> >             factory =
> > newFactoryInstance(ABSTRACT_FACTORY_CLASSES.get(factoryName),
> > classNames.iterator(), classLoader);
> >             factoryMap.put(factoryName, factory);
> >         }
> >         return factory;
> >     }
> >
> >
> >     private static Object newFactoryInstance(Class interfaceClass,
> Iterator
> > classNamesIterator, ClassLoader classLoader)
> >     {
> >         try
> >         {
> >             Object current = null;
> >
> >             while (classNamesIterator.hasNext())
> >             {
> >                 String implClassName = (String) classNamesIterator.next();
> >                 Class implClass = classLoader.loadClass(implClassName);
> >
> >                 // check, if class is of expected interface type
> >                 if (!interfaceClass.isAssignableFrom(implClass))
> >                 {
> >                     throw new IllegalArgumentException("Class " +
> > implClassName + " is no " + interfaceClass.getName());
> >                 }
> >
> >                 if (current == null)
> >                 {
> >                     // nothing to decorate
> >                     current = implClass.newInstance();
> >                 } else
> >                 {
> >                     // let's check if class supports the decorator pattern
> >                     try
> >                     {
> >                         Constructor delegationConstructor =
> > implClass.getConstructor(new Class[]{interfaceClass});
> >                         // impl class supports decorator pattern,
> >                         try
> >                         {
> >                             // create new decorator wrapping current
> >                             current =
> delegationConstructor.newInstance(new
> > Object[]{current});
> >                         } catch (InstantiationException e)
> >                         {
> >                             throw new FacesException(e);
> >                         } catch (IllegalAccessException e)
> >                         {
> >                             throw new FacesException(e);
> >                         } catch (InvocationTargetException e)
> >                         {
> >                             throw new FacesException(e);
> >                         }
> >                     } catch (NoSuchMethodException e)
> >                     {
> >                         // no decorator pattern support
> >                         current = implClass.newInstance();
> >                     }
> >                 }
> >             }
> >
> >             return current;
> >         } catch (ClassNotFoundException e)
> >         {
> >             throw new FacesException(e);
> >         } catch (InstantiationException e)
> >         {
> >             throw new FacesException(e);
> >         } catch (IllegalAccessException e)
> >         {
> >             throw new FacesException(e);
> >         }
> >     }
> >
> >
> >     public static void setFactory(String factoryName,
> >                                   String implName)
> >     {
> >         checkFactoryName(factoryName);
> >
> >         ClassLoader classLoader = getClassLoader();
> >         synchronized(_registeredFactoryNames)
> >         {
> >             Map factories = _factories.get(classLoader);
> >
> >             if (factories != null && factories.containsKey(factoryName)) {
> >                 // Javadoc says ... This method has no effect if
> > getFactory() has already been
> >                 // called looking for a factory for this factoryName.
> >                 return;
> >             }
> >
> >             Map<String, List> factoryClassNames =
> > _registeredFactoryNames.get(classLoader);
> >
> >             if (factoryClassNames == null)
> >             {
> >                 factoryClassNames = new HashMap<String, List>();
> >                 _registeredFactoryNames.put(classLoader,
> > factoryClassNames);
> >             }
> >
> >             List<String> classNameList =
> > factoryClassNames.get(factoryName);
> >
> >             if (classNameList == null) {
> >                 classNameList = new ArrayList<String>();
> >                 factoryClassNames.put(factoryName, classNameList);
> >             }
> >             classNameList.add(implName);
> >         }
> >     }
> >
> >
> >     public static void releaseFactories()
> >             throws FacesException
> >     {
> >         ClassLoader classLoader = getClassLoader();
> >         _factories.remove(classLoader);
> >     }
> >
> >     private static void checkFactoryName(String factoryName)
> >     {
> >         if (! VALID_FACTORY_NAMES.contains(factoryName)) {
> >             throw new IllegalArgumentException("factoryName '" +
> > factoryName + "'");
> >         }
> >     }
> >
> >
> >     private static ClassLoader getClassLoader()
> >     {
> >         try
> >         {
> >             ClassLoader classLoader =
> > Thread.currentThread().getContextClassLoader();
> >             if (classLoader == null)
> >             {
> >                 throw new FacesException("web application class loader
> > cannot be identified", null);
> >             }
> >             return classLoader;
> >         }
> >         catch (Exception e)
> >         {
> >             throw new FacesException("web application class loader cannot
> > be identified", e);
> >         }
> >     }
> > }
> >
> =====================================================================================================================================================
> > <?xml version=" 1.0" encoding="UTF-8"?>
> >
> > <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
> >     xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance"
> >     xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
> > http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
> >     version="2.4">
> >
> >   <display-name>Fwj - Framework Web Java</display-name>
> >
> >       <!-- ============================================ -->
> >       <!-- CONFIGURACOES DA APLICACAO                   -->
> >       <!-- ============================================ -->
> >       <welcome-file-list>
> >       <welcome-file>/index.jsp</welcome-file>
> >       </welcome-file-list>
> >
> >     <context-param>
> >         <param-name>javax.faces.CONFIG_FILES</param-name>
> >         <param-value>
> >             /WEB-INF/conf/fwj_faces-config.xml
> >         </param-value>
> >     </context-param>
> >
> >       <!-- ============================================ -->
> >       <!-- TAG LIBS UTILIZADAS PELO FRAMEWORK           -->
> >       <!-- ============================================ -->
> >       <jsp-config>
> >             <taglib>
> >                   <taglib-uri>jstl_core</taglib-uri>
> >                   <taglib-location>/WEB-INF/tags/jstl/c.tld</
> > taglib-location>
> >             </taglib>
> >             <taglib>
> >                   <taglib-uri>jstl_fmt</taglib-uri>
> >                   <taglib-location>/WEB-INF/tags/jstl/fmt.tld</
> > taglib-location>
> >             </taglib>
> >       </jsp-config>
> >
> >       <!-- ============================================ -->
> >       <!-- SETA O LOCALE NO CONTEXTO JSF: O LOCALE      -->
> >       <!-- SERA RECEBIDO COMO PARAMETRO                 -->
> >       <!-- ============================================ -->
> > <!--
> >
> =============================================================================================
> > -->
> >       <filter>
> >           <filter-name>fwjUserLocaleFilter</filter-name>
> >       <filter-class>br.com.petrobras.fwj.web.filter.FwjUserLocaleFilter</
> > filter-class>
> >       </filter>
> >       <filter-mapping>
> >       <filter-name>fwjUserLocaleFilter</filter-name>
> >       <url-pattern>/index.jsp</url-pattern>
> >       </filter-mapping>
> > <!--
> >
> =============================================================================================
> > -->
> >       <!-- ============================================ -->
> >       <!-- CASO A SESSAO TENHA EXPIRADO, REDIRECIONA    -->
> >       <!-- PARA A PAGINA DE LOGIN                       -->
> >       <!-- ============================================ -->
> > <!--
> >
> =============================================================================================
> > -->
> >       <filter>
> >       <filter-name>fwjSessionCheckFilter</filter-name>
> >       <filter-class>
> br.com.petrobras.fwj.web.filter.FwjSessionCheckFilter</
> > filter-class>
> >       </filter>
> >       <filter-mapping>
> >       <filter-name>fwjSessionCheckFilter</filter-name>
> >       <url-pattern>/paginas/*</url-pattern>
> >       </filter-mapping>
> > <!--
> >
> =============================================================================================
> > -->
> >       <!-- ============================================ -->
> >       <!-- FILTRO PARA EXTENDER OS COMPONENTES VISUAIS  -->
> >       <!-- DO TOBAGO                                    -->
> >       <!-- ============================================ -->
> > <!--
> >
> =============================================================================================
> > -->
> >       <filter>
> >             <filter-name>fwjPaginaFilter</filter-name>
> >             <filter-class>
> > br.com.petrobras.sigea.ext.web.filter.PaginaFilter</filter-class>
> >             <init-param>
> >                   <param-name>encoding</param-name>
> >                   <param-value>ISO-8859-1</param-value>
> >             </init-param>
> >       </filter>
> >     <filter-mapping>
> >       <filter-name>fwjPaginaFilter</filter-name>
> >           <url-pattern>/paginas/view/*</url-pattern>
> >       </filter-mapping>
> > <!--
> >
> =============================================================================================
> > -->
> >
> >       <!-- ============================================ -->
> >       <!-- SERVLET DE AUTENTICACAO                      -->
> >       <!-- ============================================ -->
> > <!--
> >
> =============================================================================================
> > -->
> >       <servlet>
> >       <servlet-name>fwjAutenticacaoServlet</servlet-name>
> >       <servlet-class>
> > br.com.petrobras.fwj.web.servlet.FwjAutenticacaoServlet</servlet-class>
> >       </servlet>
> >       <servlet-mapping>
> >       <servlet-name>fwjAutenticacaoServlet</servlet-name>
> >             <url-pattern>/fwjAutenticacaoServlet</url-pattern>
> >       </servlet-mapping>
> > <!--
> >
> =============================================================================================
> > -->
> > <!-- ============================================ -->
> > <!-- CONFIGURACOES DO TOBAGO                      -->
> > <!-- ============================================ -->
> >       <servlet>
> >       <servlet-name>FacesServlet</servlet-name>
> >       <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
> >       <load-on-startup>5</load-on-startup>
> >       </servlet>
> >       <servlet-mapping>
> >       <servlet-name>FacesServlet</servlet-name>
> >             <url-pattern>/paginas/*</url-pattern>
> >       </servlet-mapping>
> > <!--
> >
> =============================================================================================
> > -->
> >       <context-param>
> >         <param-name>javax.faces.STATE_SAVING_METHOD </param-name>
> >         <param-value>server</param-value>
> >     </context-param>
> >
> >     <context-param>
> >         <param-name>net.sourceforge.myfaces.PRETTY_HTML</param-name>
> >         <param-value>true</param-value>
> >     </context-param>
> >
> >     <context-param>
> >         <param-name>net.sourceforge.myfaces.ALLOW_JAVASCRIPT</param-name>
> >         <param-value>true</param-value>
> >     </context-param>
> >
> >     <context-param>
> >         <param-name>net.sourceforge.myfaces.DETECT_JAVASCRIPT</param-name>
> >         <param-value>false</param-value>
> >     </context-param>
> > <!--
> >
> =============================================================================================
> > -->
> >       <listener>
> >             <listener-class>
> > org.apache.myfaces.webapp.StartupServletContextListener </listener-class>
> >       </listener>
> >
> >       <listener>
> >       <listener-class>
> > org.apache.myfaces.tobago.webapp.TobagoServletContextListener</
> > listener-class>
> >       </listener>
> > <!--
> >
> =============================================================================================
> > -->
> >       <filter>
> >       <filter-name>multipartFormdataFilter</filter-name>
> >       <filter-class>
> > org.apache.myfaces.tobago.webapp.TobagoMultipartFormdataFilter</
> > filter-class>
> >       </filter>
> >
> >       <filter-mapping>
> >       <filter-name>multipartFormdataFilter</filter-name>
> >       <url-pattern>/paginas/*</url-pattern>
> >       </filter-mapping>
> > <!--
> >
> =============================================================================================
> > -->
> >
> > <!--
> >
> =============================================================================================
> > -->
> > <!-- ============================================ -->
> > <!-- CONFIGURACOES DO SPRING                      -->
> > <!-- ============================================ -->
> >
> > <!-- Substituido pelo listener  -->
> > <!--
> >       <servlet>
> >             <servlet-name>context</servlet-name>
> >
> > <servlet-class>org.springframework.web.context.ContextLoaderServlet
> >             </servlet-class>
> >             <load-on-startup>1</load-on-startup>
> >       </servlet>
> > -->
> >       <listener>
> >
> <listener-class>org.springframework.web.context.ContextLoaderListener
> > </listener-class>
> >       </listener>
> >       <context-param>
> >       <param-name>contextConfigLocation</param-name>
> >       <param-value>
> >             /WEB-INF/conf/_spring/aplicacao_contexto-service.xml,
> >
> >             /WEB-INF/conf/_spring/aplicacao_contexto-jdbc.xml,
> >                   /WEB-INF/conf/_spring/aplicacao_contexto- dao.xml,
> >
> >
> > /WEB-INF/conf/componenteMolecular/comp_molecular-servico.xml,
> >
> /WEB-INF/conf/componenteMolecular/comp_molecular-dao.xml,
> >
> >
> > /WEB-INF/conf/tipoEstruturaOrganizacional/tipo_estrutura_organizacional-
> servico.xml,
> >
> >
> /WEB-INF/conf/tipoEstruturaOrganizacional/tipo_estrutura_organizacional-dao.xml,
> >
> >
> > /WEB-INF/conf/tipoCombustivel/tipo_combustivel-servico.xml,
> >                   /WEB-INF/conf/tipoCombustivel/tipo_combustivel- dao.xml,
> >
> >
> > /WEB-INF/conf/combustivelPadrao/combustivel_padrao-servico.xml,
> >
> > /WEB-INF/conf/combustivelPadrao/combustivel_padrao-dao.xml,
> >
> >
> > /WEB-INF/conf/tipoFonteEmissora/tipo_fonte_emissora-servico.xml ,
> >
> > /WEB-INF/conf/tipoFonteEmissora/tipo_fonte_emissora-dao.xml,
> >
> >
> >
> /WEB-INF/conf/estruturaOrganizacionalPadrao/estrutura_organizacional_padrao-servico.xml,
> >
> >
> /WEB-INF/conf/estruturaOrganizacionalPadrao/estrutura_organizacional_padrao-
> dao.xml,
> >
> >                   /WEB-INF/conf/fonteEmissora/fonte_emissora-servico.xml,
> >                   /WEB-INF/conf/fonteEmissora/fonte_emissora-dao.xml,
> >
> >
> > /WEB-INF/conf/estruturaOrganizacional/estrutura_organizacional-
> servico.xml,
> >
> > /WEB-INF/conf/estruturaOrganizacional/estrutura_organizacional-dao.xml
> >
> >             </param-value>
> >       </context-param>
> >
> > <!-- Spring MVC não utilizado pelo fwj -->
> > <!--
> >       <servlet>
> >       <servlet-name>action</servlet-name>
> >
> >
> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
> >       <load-on-startup>1</load-on-startup>
> >       </servlet>
> > -->
> > <!-- ============================================ -->
> > <!-- CONFIGURACOES DO HIBERNATE                   -->
> > <!-- ============================================ -->
> >
> >       <filter>
> >             <filter-name>hibernateFilter</filter-name>
> >             <filter-class>
> > org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</
> > filter-class>
> >       </filter>
> >       <filter-mapping>
> >             <filter-name>hibernateFilter</filter-name>
> >             <url-pattern>*.jsp</url-pattern>
> >       </filter-mapping>
> >
> > </web-app>
> >
> =====================================================================================================================================================
> > <?xml version="1.0" encoding="UTF-8"?>
> > <!DOCTYPE faces-config PUBLIC
> >   "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
> >   "http://java.sun.com/dtd/web-facesconfig_1_1.dtd ">
> >
> > <faces-config>
> >       <factory>
> >             <application-factory>
> >                    org.apache.myfaces.application.ApplicationFactoryImpl
> >             </application-factory>
> >             <faces-context-factory>
> >
> > org.apache.myfaces.tobago.lifecycle.TobagoLifecycleFactory
> >             </faces-context-factory>
> >             <faces-context-factory>
> >                    org.apache.myfaces.context.FacesContextFactoryImpl
> >             </faces-context-factory>
> >             <render-kit-factory>
> >                   org.apache.myfaces.renderkit.RenderKitFactoryImpl
> >             </render-kit-factory>
> >       </factory>
> >
> >
> >       <application>
> >             <variable-resolver>
> > org.springframework.web.jsf.DelegatingVariableResolver</variable-resolver>
> >       <message-bundle>fwjJSFMessages</message-bundle>
> >
> >       <locale-config>
> >                   <default-locale>pt_BR</default-locale>
> >                   <supported-locale>en_US</supported-locale>
> >                   <supported-locale>en_GB</supported-locale>
> >                   <supported-locale>de</supported-locale>
> >                   <supported-locale>de_DE</supported-locale>
> >                   <supported-locale>de_AT</supported-locale>
> >                   <supported-locale>de_CH</supported-locale>
> >                   <supported-locale>ja_JP</supported-locale>
> >                   <supported-locale>ru_RU</supported-locale>
> >       </locale-config>
> >       </application>
> >
> >
> >       <managed-bean>
> >       <description>FWJ - CACHE NO ESCOPO DE APLICACAO</description>
> >       <managed-bean-name>fwjCacheAplicacaoBean</managed-bean-name>
> >       <managed-bean-class>
> > br.com.petrobras.fwj.web.beans.FwjCacheAplicacaoBean</managed-bean-class>
> >       <managed-bean-scope>application</managed-bean-scope>
> >       </managed-bean>
> >
> >       <managed-bean>
> >       <description>FWJ - CACHE SESSAO</description>
> >       <managed-bean-name>fwjCacheSessaoBean</managed-bean-name>
> >
> <managed-bean-class>br.com.petrobras.fwj.web.beans.FwjCacheSessaoBean
> > </managed-bean-class>
> >       <managed-bean-scope>session</managed-bean-scope>
> >       </managed-bean>
> >
> >       <managed-bean>
> >       <description>FWJ - SEGURANCA</description>
> >       <managed-bean-name>fwjSegurancaBean</managed-bean-name>
> >
> <managed-bean-class>br.com.petrobras.fwj.web.beans.FwjSegurancaBean</
> > managed-bean-class>
> >       <managed-bean-scope>session</managed-bean-scope>
> >       </managed-bean>
> >
> >       <managed-bean>
> >       <description>FWJ - ORDENACAO</description>
> >       <managed-bean-name>fwjOrdenacaoBean</managed-bean-name>
> >       <managed-bean-class>
> br.com.petrobras.fwj.web.beans.FwjOrdenacaoBean</
> > managed-bean-class>
> >       <managed-bean-scope>session</managed-bean-scope>
> >       </managed-bean>
> >
> >       <managed-bean>
> >       <description>FWJ - PROTOTIPO</description>
> >       <managed-bean-name>prototipoBean</managed-bean-name>
> >       <managed-bean-class>
> >
> br.com.petrobras.fwj.web.prototipo.beans.PrototipoBean</managed-bean-class>
> >       <managed-bean-scope>session</managed-bean-scope>
> >       </managed-bean>
> >
> >       <managed-bean>
> >       <description>FWJ - CONTROLADOR</description>
> >       <managed-bean-name>fwjControlador</managed-bean-name>
> >       <managed-bean-class>
> > br.com.petrobras.fwj.web.controlador.FwjControlador</managed-bean-class>
> >       <managed-bean-scope>request</managed-bean-scope>
> >       </managed-bean>
> >
> >       <managed-bean>
> >       <description>FWJ - LISTA BUSCA</description>
> >       <managed-bean-name>fwjListaBuscaBean</managed-bean-name>
> >       <managed-bean-class>br.com.petrobras.fwj.web.beans.FwjListaBuscaBean
> > </managed-bean-class>
> >       <managed-bean-scope>session</managed-bean-scope>
> >       </managed-bean>
> >
> >       <managed-bean>
> >       <description>FWJ - PROTOTIPO</description>
> >       <managed-bean-name>fwjPrototipoBean</managed-bean-name>
> >
> <managed-bean-class>br.com.petrobras.fwj.web.beans.FwjPrototipoBean</
> > managed-bean-class>
> >       <managed-bean-scope>session</managed-bean-scope>
> >       </managed-bean>
> >
> >       <managed-bean>
> >       <description>FWJ - GERENCIA O LAYOUT DA PAGINA (TAMANHO DA JANELA)</
> > description>
> >       <managed-bean-name>layout</managed-bean-name>
> >       <managed-bean-class>br.com.petrobras.fwj.web.beans.FwjLayoutBean</
> > managed-bean-class>
> >       <managed-bean-scope>session</managed-bean-scope>
> >       <managed-property>
> >                   <property-name>width</property-name>
> >                   <property-class>int</property-class>
> >                   <value>800</value>
> >       </managed-property>
> >       <managed-property>
> > <property-name>height</property-name>
> >                   <property-class>int</property-class>
> >                   <value>600</value>
> >       </managed-property>
> >       <managed-property>
> >                   <property-name>minimumWidth</property-name>
> >                   <property-class>int</property-class>
> >                   <value>700</value>
> >       </managed-property>
> >       <managed-property>
> >                   <property-name>minimumHeight</property-name>
> >                   <property-class>int</property-class>
> >                   <value>600</value>
> >       </managed-property>
> >       <managed-property>
> >                   <property-name>maximumWidth</property-name>
> >                   <property-class>int</property-class>
> >                   <value>1300</value>
> >       </managed-property>
> >       <managed-property>
> >                   <property-name>maximumHeight</property-name>
> >                   <property-class>int</property-class>
> >                   <value>700</value>
> >       </managed-property>
> >       </managed-bean>
> >
> >       <!-- SEGURANCA -->
> >       <navigation-rule>
> >       <from-view-id>*</from-view-id>
> >       <navigation-case>
> >                   <from-outcome>acesso_nao_permitido</from-outcome>
> >                   <to-view-id>/view/common/acessoNaoPermitido.jsp</
> > to-view-id>
> >       </navigation-case>
> >       </navigation-rule>
> >
> >       <!-- PAGINA DE ERRO -->
> >       <navigation-rule>
> >       <from-view-id>*</from-view-id>
> >       <navigation-case>
> >                   <from-outcome>erro</from-outcome>
> >                   <to-view-id>/view/common/erro.jsp</to-view-id>
> >       </navigation-case>
> >       </navigation-rule>
> >
> >
> >       <!-- CONVERSORES -->
> >       <converter>
> >             <converter-id>fwjBooleanStringConverter</converter-id>
> >             <converter-class>
> > br.com.petrobras.fwj.utils.FwjBooleanStringConverter </converter-class>
> >       </converter>
> >
> >       <!-- VALIDADORES -->
> >       <validator>
> >             <validator-id>fwjEmailValidator</validator-id>
> >             <validator-class>
> br.com.petrobras.fwj.utils.FwjEmailValidator</
> > validator-class>
> >       </validator>
> >       <validator>
> >             <validator-id>fwjTextoRequeridoValidator</validator-id>
> >             <validator-class>
> > br.com.petrobras.fwj.web.validator.FwjTextoRequeridoValidator</
> > validator-class>
> >       </validator>
> >
> > </faces-config>
> >
> =====================================================================================================================================================
> >
> >
> > "O emitente desta mensagem é responsável por seu conteúdo e endereçamento.
> > Cabe ao destinatário cuidar quanto ao tratamento adequado. Sem a devida
> > autorização, a divulgação, a reprodução, a distribuição ou qualquer outra
> > ação em desconformidade com as normas internas do Sistema Petrobras são
> > proibidas e passíveis de sanção disciplinar, cível e criminal."
> >
> > "The sender of this message is responsible for its content and addressing.
> > The receiver shall take proper care of it. Without due authorization, the
> > publication, reproduction, distribution or the performance of  any other
> > action not conforming to Petrobras System internal policies and procedures
> > is forbidden and liable to disciplinary, civil or criminal  sanctions."
> >
> > " El emisor de este mensaje es responsable por su contenido y
> > direccionamiento. Cabe al destinatario darle el tratamiento adecuado. Sin
> > la debida autorización, su divulgación, reproducción, distribución o
> > cualquier otra acción no conforme a las normas internas del Sistema
> > Petrobras están prohibidas y serán pasibles de sanción disciplinaria,
> civil
> > y penal."
> >
> >
>
>
>
> --
> Alonso Isidoro Roman.



-- 
Matthias Wessendorf

further stuff:
blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
mail: matzew-at-apache-dot-org

Re: Bug using tomcat 6 and myfaces 1.2

Posted by Alonso Isidoro Roman <al...@gmail.com>.
SEVERE: StandardWrapper.Throwable
java.lang.IllegalStateException: No Factories configured for this
Application. This happens if the faces-initialization does not work at all
- make sure that you properly include all configuration settings necessary
for a basic faces application and that all the necessary libs are included.
Also check the logging output of your web application and your container
for any exceptions!
If you did that and find nothing, the mistake might be due to the fact that
you use some special web-containers which do not support registering
context-listeners via TLD files and a context listener is not setup in your
web.xml.
A typical config looks like this;
<listener>

<listener-class>org.apache.myfaces.webapp.StartupServletContextListener
</listener-class>
</listener>



2007/12/20, diego.vieira.vivo.ACCENTURE@petrobras.com.br <
diego.vieira.vivo.ACCENTURE@petrobras.com.br>:
>
>
> I have a problem when i try to deploy this happens
>
>
> ======================================================================================================================================================
> 20/12/2007 09:19:55 org.apache.catalina.core.AprLifecycleListener init
> INFO: The Apache Tomcat Native library which allows optimal performance in
> production environments was not found on the java.library.path:
> C:\Arquivos
> de programas\Java\jdk1.5.0
> _01\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\Arquivos de
> programas\Java\jdk1.5.0_01\bin\..\jre\bin\client;C:\Arquivos de
> programas\Java\jdk1.5.0_01\bin\..\jre\bin;C:\Arquivos de
> programas\Java\jdk1.5.0_01\bin;D:\oracle\ora92\bin;C:\Arquivos de
> programas\Oracle\jre\1.3.1\bin;C:\Arquivos de programas\Oracle\jre\1.1.8
> \bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Arquivos
> de
> programas\Arquivos comuns\Autodesk Shared\;C:\Arquivos de
> programas\Autodesk\DWG TrueView\;C:\Arquivos de
> programas\Rational\common;C:\Arquivos de
> programas\Rational\ClearCase\bin;D:\dev\CVSNT\
> 20/12/2007 09:19:56 org.apache.coyote.http11.Http11Protocol init
> INFO: Initializing Coyote HTTP/1.1 on http-8080
> 20/12/2007 09:19:56 org.apache.catalina.startup.Catalina load
> INFO: Initialization processed in 871 ms
> 20/12/2007 09:19:56 org.apache.catalina.core.StandardService start
> INFO: Starting service Catalina
> 20/12/2007 09:19:56 org.apache.catalina.core.StandardEngine start
> INFO: Starting Servlet Engine: Apache Tomcat/6.0.14
> log4j:WARN No appenders could be found for logger
> (org.apache.myfaces.shared_impl.webapp.webxml.WebXmlParser).
> log4j:WARN Please initialize the log4j system properly.
> 20/12/2007 09:20:10 org.apache.catalina.core.ApplicationContext log
> INFO: Initializing Spring root WebApplicationContext
> 20/12/2007 09:20:19 org.apache.catalina.core.ApplicationContext log
> SEVERE: StandardWrapper.Throwable
> java.lang.IllegalStateException: No Factories configured for this
> Application. This happens if the faces-initialization does not work at all
> - make sure that you properly include all configuration settings necessary
> for a basic faces application and that all the necessary libs are
> included.
> Also check the logging output of your web application and your container
> for any exceptions!
> If you did that and find nothing, the mistake might be due to the fact
> that
> you use some special web-containers which do not support registering
> context-listeners via TLD files and a context listener is not setup in
> your
> web.xml.
> A typical config looks like this;
> <listener>
>
> <listener-class>org.apache.myfaces.webapp.StartupServletContextListener
> </listener-class>
> </listener>
>
>       at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:90)
>       at javax.faces.webapp.FacesServlet.init(FacesServlet.java:88)
>       at org.apache.catalina.core.StandardWrapper.loadServlet(
> StandardWrapper.java:1161)
>       at org.apache.catalina.core.StandardWrapper.load(
> StandardWrapper.java:981)
>       at org.apache.catalina.core.StandardContext.loadOnStartup(
> StandardContext.java:4045)
>       at org.apache.catalina.core.StandardContext.start(
> StandardContext.java:4351)
>       at org.apache.catalina.core.ContainerBase.start(
> ContainerBase.java:1045)
>       at org.apache.catalina.core.StandardHost.start(StandardHost.java
> :719)
>       at org.apache.catalina.core.ContainerBase.start(
> ContainerBase.java:1045)
>       at org.apache.catalina.core.StandardEngine.start(
> StandardEngine.java:443)
>       at org.apache.catalina.core.StandardService.start(
> StandardService.java:516)
>       at org.apache.catalina.core.StandardServer.start(
> StandardServer.java:710)
>       at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at sun.reflect.NativeMethodAccessorImpl.invoke(
> NativeMethodAccessorImpl.java:39)
>       at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:25)
>       at java.lang.reflect.Method.invoke(Method.java:585)
>       at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
>       at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
> 20/12/2007 09:20:19 org.apache.catalina.core.StandardContext loadOnStartup
> SEVERE: Servlet /sigea threw load() exception
> java.lang.IllegalStateException: No Factories configured for this
> Application. This happens if the faces-initialization does not work at all
> - make sure that you properly include all configuration settings necessary
> for a basic faces application and that all the necessary libs are
> included.
> Also check the logging output of your web application and your container
> for any exceptions!
> If you did that and find nothing, the mistake might be due to the fact
> that
> you use some special web-containers which do not support registering
> context-listeners via TLD files and a context listener is not setup in
> your
> web.xml.
> A typical config looks like this;
> <listener>
>
> <listener-class>org.apache.myfaces.webapp.StartupServletContextListener
> </listener-class>
> </listener>
>
>       at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:90)
>       at javax.faces.webapp.FacesServlet.init(FacesServlet.java:88)
>       at org.apache.catalina.core.StandardWrapper.loadServlet(
> StandardWrapper.java:1161)
>       at org.apache.catalina.core.StandardWrapper.load(
> StandardWrapper.java:981)
>       at org.apache.catalina.core.StandardContext.loadOnStartup(
> StandardContext.java:4045)
>       at org.apache.catalina.core.StandardContext.start(
> StandardContext.java:4351)
>       at org.apache.catalina.core.ContainerBase.start(
> ContainerBase.java:1045)
>       at org.apache.catalina.core.StandardHost.start(StandardHost.java
> :719)
>       at org.apache.catalina.core.ContainerBase.start(
> ContainerBase.java:1045)
>       at org.apache.catalina.core.StandardEngine.start(
> StandardEngine.java:443)
>       at org.apache.catalina.core.StandardService.start(
> StandardService.java:516)
>       at org.apache.catalina.core.StandardServer.start(
> StandardServer.java:710)
>       at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at sun.reflect.NativeMethodAccessorImpl.invoke(
> NativeMethodAccessorImpl.java:39)
>       at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:25)
>       at java.lang.reflect.Method.invoke(Method.java:585)
>       at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
>       at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
> 20/12/2007 09:20:19 org.apache.coyote.http11.Http11Protocol start
> INFO: Starting Coyote HTTP/1.1 on http-8080
> 20/12/2007 09:20:19 org.apache.jk.common.ChannelSocket init
> INFO: JK: ajp13 listening on /0.0.0.0:8009
> 20/12/2007 09:20:19 org.apache.jk.server.JkMain start
> INFO: Jk running ID=0 time=0/62  config=null
> 20/12/2007 09:20:19 org.apache.catalina.startup.Catalina start
> INFO: Server startup in 23815 ms
>
>
> ======================================================================================================================================================
>
> Debugging i find out that  _registeredFactoryNames  is empty
> and i notice this in one class
> //TODO: null-check for Weblogic, that tries to initialize Servlet before
> ContextListener
> following goes my web.xml and faces
>
> =====================================================================================================================================================
> /*
> * Copyright 2004 The Apache Software Foundation.
> *
> * Licensed under the Apache License, Version 2.0 (the "License");
> * you may not use this file except in compliance with the License.
> * You may obtain a copy of the License at
> *
> *      http://www.apache.org/licenses/LICENSE-2.0
> *
> * Unless required by applicable law or agreed to in writing, software
> * distributed under the License is distributed on an "AS IS" BASIS,
> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
> * See the License for the specific language governing permissions and
> * limitations under the License.
> */
> package javax.faces;
>
>
> import javax.faces.application.ApplicationFactory;
> import javax.faces.context.FacesContextFactory;
> import javax.faces.lifecycle.LifecycleFactory;
> import javax.faces.render.RenderKitFactory;
> import java.lang.reflect.Constructor;
> import java.lang.reflect.InvocationTargetException;
> import java.util.*;
>
> /**
> * see Javadoc of <a
> href="http://java.sun.com/javaee/javaserverfaces/1.2/docs/api/index.html
> ">JSF
> Specification</a>
> *
> * @author Manfred Geiler (latest modification by $Author: mbr $)
> * @version $Revision: 512227 $ $Date: 2007-02-27 13:25:16 +0100 (Di, 27
> Feb 2007) $
> */
> public final class FactoryFinder
> {
>     public static final String APPLICATION_FACTORY =
> "javax.faces.application.ApplicationFactory";
>     public static final String FACES_CONTEXT_FACTORY =
> "javax.faces.context.FacesContextFactory";
>     public static final String LIFECYCLE_FACTORY =
> "javax.faces.lifecycle.LifecycleFactory";
>     public static final String RENDER_KIT_FACTORY =
> "javax.faces.render.RenderKitFactory";
>
>     private static Map<ClassLoader, Map> _registeredFactoryNames = new
> HashMap<ClassLoader, Map>();
>     /**
>      * Maps from classLoader to another map, the container (i.e. Tomcat)
> will create a class loader for
>      * each web app that it controls (typically anyway) and that class
> loader is used as the key.
>      *
>      * The secondary map maps the factory name (i.e.
> FactoryFinder.APPLICATION_FACTORY) to actual instances
>      * that are created via getFactory. The instances will be of the class
> specified in the setFactory method
>      * for the factory name, i.e.
> FactoryFinder.setFactory(FactoryFinder.APPLICATION_FACTORY,
> MyFactory.class).
>      */
>     private static Map<ClassLoader, Map> _factories = new
> HashMap<ClassLoader, Map>();
>
>     private static final Set<String> VALID_FACTORY_NAMES = new
> HashSet<String>();
>     private static final Map<String, Class> ABSTRACT_FACTORY_CLASSES = new
> HashMap<String, Class>();
>     static {
>         VALID_FACTORY_NAMES.add(APPLICATION_FACTORY);
>         VALID_FACTORY_NAMES.add(FACES_CONTEXT_FACTORY);
>         VALID_FACTORY_NAMES.add(LIFECYCLE_FACTORY);
>         VALID_FACTORY_NAMES.add(RENDER_KIT_FACTORY);
>
>         ABSTRACT_FACTORY_CLASSES.put(APPLICATION_FACTORY,
> ApplicationFactory.class);
>         ABSTRACT_FACTORY_CLASSES.put(FACES_CONTEXT_FACTORY,
> FacesContextFactory.class);
>         ABSTRACT_FACTORY_CLASSES.put(LIFECYCLE_FACTORY,
> LifecycleFactory.class);
>         ABSTRACT_FACTORY_CLASSES.put(RENDER_KIT_FACTORY,
> RenderKitFactory.class);
>     }
>
>
>   // avoid instantiation
>   FactoryFinder() {
>   }
>
>   public static Object getFactory(String factoryName)
>             throws FacesException
>     {
>         if(factoryName == null)
>             throw new NullPointerException("factoryName may not be null");
>
>         ClassLoader classLoader = getClassLoader();
>         Map factoryClassNames = _registeredFactoryNames.get(classLoader);
>
>         if (factoryClassNames == null)
>         {
>             String message = "No Factories configured for this
> Application.
> This happens if the faces-initialization "+
>             "does not work at all - make sure that you properly include
> all
> configuration settings necessary for a basic faces application " +
>             "and that all the necessary libs are included. Also check the
> logging output of your web application and your container for any
> exceptions!" +
>             "\nIf you did that and find nothing, the mistake might be due
> to the fact that you use some special web-containers which "+
>             "do not support registering context-listeners via TLD files
> and
> " +
>             "a context listener is not setup in your web.xml.\n" +
>             "A typical config looks like this;\n<listener>\n" +
>             "
> <listener-class>org.apache.myfaces.webapp.StartupServletContextListener
> </listener-class>\n"
> +
>             "</listener>\n";
>             throw new IllegalStateException(message);
>         }
>
>         if (! factoryClassNames.containsKey(factoryName)) {
>             throw new IllegalArgumentException("no factory " + factoryName
> + " configured for this application.");
>         }
>
>         Map<String, Object> factoryMap = _factories.get(classLoader);
>
>         if (factoryMap == null) {
>             factoryMap = new HashMap<String, Object>();
>             _factories.put(classLoader, factoryMap);
>         }
>         Object factory = factoryMap.get(factoryName);
>
>         if (factory == null) {
>             List classNames = (List) factoryClassNames.get(factoryName);
>             factory =
> newFactoryInstance(ABSTRACT_FACTORY_CLASSES.get(factoryName),
> classNames.iterator(), classLoader);
>             factoryMap.put(factoryName, factory);
>         }
>         return factory;
>     }
>
>
>     private static Object newFactoryInstance(Class interfaceClass,
> Iterator
> classNamesIterator, ClassLoader classLoader)
>     {
>         try
>         {
>             Object current = null;
>
>             while (classNamesIterator.hasNext())
>             {
>                 String implClassName = (String) classNamesIterator.next();
>                 Class implClass = classLoader.loadClass(implClassName);
>
>                 // check, if class is of expected interface type
>                 if (!interfaceClass.isAssignableFrom(implClass))
>                 {
>                     throw new IllegalArgumentException("Class " +
> implClassName + " is no " + interfaceClass.getName());
>                 }
>
>                 if (current == null)
>                 {
>                     // nothing to decorate
>                     current = implClass.newInstance();
>                 } else
>                 {
>                     // let's check if class supports the decorator pattern
>                     try
>                     {
>                         Constructor delegationConstructor =
> implClass.getConstructor(new Class[]{interfaceClass});
>                         // impl class supports decorator pattern,
>                         try
>                         {
>                             // create new decorator wrapping current
>                             current = delegationConstructor.newInstance
> (new
> Object[]{current});
>                         } catch (InstantiationException e)
>                         {
>                             throw new FacesException(e);
>                         } catch (IllegalAccessException e)
>                         {
>                             throw new FacesException(e);
>                         } catch (InvocationTargetException e)
>                         {
>                             throw new FacesException(e);
>                         }
>                     } catch (NoSuchMethodException e)
>                     {
>                         // no decorator pattern support
>                         current = implClass.newInstance();
>                     }
>                 }
>             }
>
>             return current;
>         } catch (ClassNotFoundException e)
>         {
>             throw new FacesException(e);
>         } catch (InstantiationException e)
>         {
>             throw new FacesException(e);
>         } catch (IllegalAccessException e)
>         {
>             throw new FacesException(e);
>         }
>     }
>
>
>     public static void setFactory(String factoryName,
>                                   String implName)
>     {
>         checkFactoryName(factoryName);
>
>         ClassLoader classLoader = getClassLoader();
>         synchronized(_registeredFactoryNames)
>         {
>             Map factories = _factories.get(classLoader);
>
>             if (factories != null && factories.containsKey(factoryName)) {
>                 // Javadoc says ... This method has no effect if
> getFactory() has already been
>                 // called looking for a factory for this factoryName.
>                 return;
>             }
>
>             Map<String, List> factoryClassNames =
> _registeredFactoryNames.get(classLoader);
>
>             if (factoryClassNames == null)
>             {
>                 factoryClassNames = new HashMap<String, List>();
>                 _registeredFactoryNames.put(classLoader,
> factoryClassNames);
>             }
>
>             List<String> classNameList =
> factoryClassNames.get(factoryName);
>
>             if (classNameList == null) {
>                 classNameList = new ArrayList<String>();
>                 factoryClassNames.put(factoryName, classNameList);
>             }
>             classNameList.add(implName);
>         }
>     }
>
>
>     public static void releaseFactories()
>             throws FacesException
>     {
>         ClassLoader classLoader = getClassLoader();
>         _factories.remove(classLoader);
>     }
>
>     private static void checkFactoryName(String factoryName)
>     {
>         if (! VALID_FACTORY_NAMES.contains(factoryName)) {
>             throw new IllegalArgumentException("factoryName '" +
> factoryName + "'");
>         }
>     }
>
>
>     private static ClassLoader getClassLoader()
>     {
>         try
>         {
>             ClassLoader classLoader =
> Thread.currentThread().getContextClassLoader();
>             if (classLoader == null)
>             {
>                 throw new FacesException("web application class loader
> cannot be identified", null);
>             }
>             return classLoader;
>         }
>         catch (Exception e)
>         {
>             throw new FacesException("web application class loader cannot
> be identified", e);
>         }
>     }
> }
>
> =====================================================================================================================================================
> <?xml version="1.0" encoding="UTF-8"?>
>
> <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
>     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>     xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
> http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
>     version="2.4">
>
>   <display-name>Fwj - Framework Web Java</display-name>
>
>       <!-- ============================================ -->
>       <!-- CONFIGURACOES DA APLICACAO                   -->
>       <!-- ============================================ -->
>       <welcome-file-list>
>       <welcome-file>/index.jsp</welcome-file>
>       </welcome-file-list>
>
>     <context-param>
>         <param-name>javax.faces.CONFIG_FILES</param-name>
>         <param-value>
>             /WEB-INF/conf/fwj_faces-config.xml
>         </param-value>
>     </context-param>
>
>       <!-- ============================================ -->
>       <!-- TAG LIBS UTILIZADAS PELO FRAMEWORK           -->
>       <!-- ============================================ -->
>       <jsp-config>
>             <taglib>
>                   <taglib-uri>jstl_core</taglib-uri>
>                   <taglib-location>/WEB-INF/tags/jstl/c.tld</
> taglib-location>
>             </taglib>
>             <taglib>
>                   <taglib-uri>jstl_fmt</taglib-uri>
>                   <taglib-location>/WEB-INF/tags/jstl/fmt.tld</
> taglib-location>
>             </taglib>
>       </jsp-config>
>
>       <!-- ============================================ -->
>       <!-- SETA O LOCALE NO CONTEXTO JSF: O LOCALE      -->
>       <!-- SERA RECEBIDO COMO PARAMETRO                 -->
>       <!-- ============================================ -->
> <!--
>
> =============================================================================================
> -->
>       <filter>
>           <filter-name>fwjUserLocaleFilter</filter-name>
>       <filter-class>br.com.petrobras.fwj.web.filter.FwjUserLocaleFilter</
> filter-class>
>       </filter>
>       <filter-mapping>
>       <filter-name>fwjUserLocaleFilter</filter-name>
>       <url-pattern>/index.jsp</url-pattern>
>       </filter-mapping>
> <!--
>
> =============================================================================================
> -->
>       <!-- ============================================ -->
>       <!-- CASO A SESSAO TENHA EXPIRADO, REDIRECIONA    -->
>       <!-- PARA A PAGINA DE LOGIN                       -->
>       <!-- ============================================ -->
> <!--
>
> =============================================================================================
> -->
>       <filter>
>       <filter-name>fwjSessionCheckFilter</filter-name>
>       <filter-class>br.com.petrobras.fwj.web.filter.FwjSessionCheckFilter
> </
> filter-class>
>       </filter>
>       <filter-mapping>
>       <filter-name>fwjSessionCheckFilter</filter-name>
>       <url-pattern>/paginas/*</url-pattern>
>       </filter-mapping>
> <!--
>
> =============================================================================================
> -->
>       <!-- ============================================ -->
>       <!-- FILTRO PARA EXTENDER OS COMPONENTES VISUAIS  -->
>       <!-- DO TOBAGO                                    -->
>       <!-- ============================================ -->
> <!--
>
> =============================================================================================
> -->
>       <filter>
>             <filter-name>fwjPaginaFilter</filter-name>
>             <filter-class>
> br.com.petrobras.sigea.ext.web.filter.PaginaFilter</filter-class>
>             <init-param>
>                   <param-name>encoding</param-name>
>                   <param-value>ISO-8859-1</param-value>
>             </init-param>
>       </filter>
>     <filter-mapping>
>       <filter-name>fwjPaginaFilter</filter-name>
>           <url-pattern>/paginas/view/*</url-pattern>
>       </filter-mapping>
> <!--
>
> =============================================================================================
> -->
>
>       <!-- ============================================ -->
>       <!-- SERVLET DE AUTENTICACAO                      -->
>       <!-- ============================================ -->
> <!--
>
> =============================================================================================
> -->
>       <servlet>
>       <servlet-name>fwjAutenticacaoServlet</servlet-name>
>       <servlet-class>
> br.com.petrobras.fwj.web.servlet.FwjAutenticacaoServlet</servlet-class>
>       </servlet>
>       <servlet-mapping>
>       <servlet-name>fwjAutenticacaoServlet</servlet-name>
>             <url-pattern>/fwjAutenticacaoServlet</url-pattern>
>       </servlet-mapping>
> <!--
>
> =============================================================================================
> -->
> <!-- ============================================ -->
> <!-- CONFIGURACOES DO TOBAGO                      -->
> <!-- ============================================ -->
>       <servlet>
>       <servlet-name>FacesServlet</servlet-name>
>       <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
>       <load-on-startup>5</load-on-startup>
>       </servlet>
>       <servlet-mapping>
>       <servlet-name>FacesServlet</servlet-name>
>             <url-pattern>/paginas/*</url-pattern>
>       </servlet-mapping>
> <!--
>
> =============================================================================================
> -->
>       <context-param>
>         <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
>         <param-value>server</param-value>
>     </context-param>
>
>     <context-param>
>         <param-name>net.sourceforge.myfaces.PRETTY_HTML</param-name>
>         <param-value>true</param-value>
>     </context-param>
>
>     <context-param>
>         <param-name>net.sourceforge.myfaces.ALLOW_JAVASCRIPT</param-name>
>         <param-value>true</param-value>
>     </context-param>
>
>     <context-param>
>         <param-name>net.sourceforge.myfaces.DETECT_JAVASCRIPT</param-name>
>         <param-value>false</param-value>
>     </context-param>
> <!--
>
> =============================================================================================
> -->
>       <listener>
>             <listener-class>
> org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
>       </listener>
>
>       <listener>
>       <listener-class>
> org.apache.myfaces.tobago.webapp.TobagoServletContextListener</
> listener-class>
>       </listener>
> <!--
>
> =============================================================================================
> -->
>       <filter>
>       <filter-name>multipartFormdataFilter</filter-name>
>       <filter-class>
> org.apache.myfaces.tobago.webapp.TobagoMultipartFormdataFilter</
> filter-class>
>       </filter>
>
>       <filter-mapping>
>       <filter-name>multipartFormdataFilter</filter-name>
>       <url-pattern>/paginas/*</url-pattern>
>       </filter-mapping>
> <!--
>
> =============================================================================================
> -->
>
> <!--
>
> =============================================================================================
> -->
> <!-- ============================================ -->
> <!-- CONFIGURACOES DO SPRING                      -->
> <!-- ============================================ -->
>
> <!-- Substituido pelo listener  -->
> <!--
>       <servlet>
>             <servlet-name>context</servlet-name>
>
> <servlet-class>org.springframework.web.context.ContextLoaderServlet
>             </servlet-class>
>             <load-on-startup>1</load-on-startup>
>       </servlet>
> -->
>       <listener>
>       <listener-class>
> org.springframework.web.context.ContextLoaderListener
> </listener-class>
>       </listener>
>       <context-param>
>       <param-name>contextConfigLocation</param-name>
>       <param-value>
>             /WEB-INF/conf/_spring/aplicacao_contexto-service.xml,
>
>             /WEB-INF/conf/_spring/aplicacao_contexto-jdbc.xml,
>                   /WEB-INF/conf/_spring/aplicacao_contexto-dao.xml,
>
>
> /WEB-INF/conf/componenteMolecular/comp_molecular-servico.xml,
>                   /WEB-INF/conf/componenteMolecular/comp_molecular-dao.xml
> ,
>
>
> /WEB-INF/conf/tipoEstruturaOrganizacional/tipo_estrutura_organizacional-
> servico.xml,
>
> /WEB-INF/conf/tipoEstruturaOrganizacional/tipo_estrutura_organizacional-
> dao.xml,
>
>
> /WEB-INF/conf/tipoCombustivel/tipo_combustivel-servico.xml,
>                   /WEB-INF/conf/tipoCombustivel/tipo_combustivel-dao.xml,
>
>
> /WEB-INF/conf/combustivelPadrao/combustivel_padrao-servico.xml,
>
> /WEB-INF/conf/combustivelPadrao/combustivel_padrao-dao.xml,
>
>
> /WEB-INF/conf/tipoFonteEmissora/tipo_fonte_emissora-servico.xml,
>
> /WEB-INF/conf/tipoFonteEmissora/tipo_fonte_emissora-dao.xml,
>
>
>
> /WEB-INF/conf/estruturaOrganizacionalPadrao/estrutura_organizacional_padrao-
> servico.xml,
>
>
> /WEB-INF/conf/estruturaOrganizacionalPadrao/estrutura_organizacional_padrao-
> dao.xml,
>
>                   /WEB-INF/conf/fonteEmissora/fonte_emissora-servico.xml,
>                   /WEB-INF/conf/fonteEmissora/fonte_emissora-dao.xml,
>
>
> /WEB-INF/conf/estruturaOrganizacional/estrutura_organizacional-servico.xml
> ,
>
> /WEB-INF/conf/estruturaOrganizacional/estrutura_organizacional-dao.xml
>
>             </param-value>
>       </context-param>
>
> <!-- Spring MVC não utilizado pelo fwj -->
> <!--
>       <servlet>
>       <servlet-name>action</servlet-name>
>
> <servlet-class>org.springframework.web.servlet.DispatcherServlet
> </servlet-class>
>       <load-on-startup>1</load-on-startup>
>       </servlet>
> -->
> <!-- ============================================ -->
> <!-- CONFIGURACOES DO HIBERNATE                   -->
> <!-- ============================================ -->
>
>       <filter>
>             <filter-name>hibernateFilter</filter-name>
>             <filter-class>
> org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</
> filter-class>
>       </filter>
>       <filter-mapping>
>             <filter-name>hibernateFilter</filter-name>
>             <url-pattern>*.jsp</url-pattern>
>       </filter-mapping>
>
> </web-app>
>
> =====================================================================================================================================================
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE faces-config PUBLIC
>   "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
>   "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
>
> <faces-config>
>       <factory>
>             <application-factory>
>                    org.apache.myfaces.application.ApplicationFactoryImpl
>             </application-factory>
>             <faces-context-factory>
>
> org.apache.myfaces.tobago.lifecycle.TobagoLifecycleFactory
>             </faces-context-factory>
>             <faces-context-factory>
>                   org.apache.myfaces.context.FacesContextFactoryImpl
>             </faces-context-factory>
>             <render-kit-factory>
>                   org.apache.myfaces.renderkit.RenderKitFactoryImpl
>             </render-kit-factory>
>       </factory>
>
>
>       <application>
>             <variable-resolver>
> org.springframework.web.jsf.DelegatingVariableResolver</variable-resolver>
>       <message-bundle>fwjJSFMessages</message-bundle>
>
>       <locale-config>
>                   <default-locale>pt_BR</default-locale>
>                   <supported-locale>en_US</supported-locale>
>                   <supported-locale>en_GB</supported-locale>
>                   <supported-locale>de</supported-locale>
>                   <supported-locale>de_DE</supported-locale>
>                   <supported-locale>de_AT</supported-locale>
>                   <supported-locale>de_CH</supported-locale>
>                   <supported-locale>ja_JP</supported-locale>
>                   <supported-locale>ru_RU</supported-locale>
>       </locale-config>
>       </application>
>
>
>       <managed-bean>
>       <description>FWJ - CACHE NO ESCOPO DE APLICACAO</description>
>       <managed-bean-name>fwjCacheAplicacaoBean</managed-bean-name>
>       <managed-bean-class>
> br.com.petrobras.fwj.web.beans.FwjCacheAplicacaoBean</managed-bean-class>
>       <managed-bean-scope>application</managed-bean-scope>
>       </managed-bean>
>
>       <managed-bean>
>       <description>FWJ - CACHE SESSAO</description>
>       <managed-bean-name>fwjCacheSessaoBean</managed-bean-name>
>       <managed-bean-class>
> br.com.petrobras.fwj.web.beans.FwjCacheSessaoBean
> </managed-bean-class>
>       <managed-bean-scope>session</managed-bean-scope>
>       </managed-bean>
>
>       <managed-bean>
>       <description>FWJ - SEGURANCA</description>
>       <managed-bean-name>fwjSegurancaBean</managed-bean-name>
>       <managed-bean-class>br.com.petrobras.fwj.web.beans.FwjSegurancaBean
> </
> managed-bean-class>
>       <managed-bean-scope>session</managed-bean-scope>
>       </managed-bean>
>
>       <managed-bean>
>       <description>FWJ - ORDENACAO</description>
>       <managed-bean-name>fwjOrdenacaoBean</managed-bean-name>
>       <managed-bean-class>br.com.petrobras.fwj.web.beans.FwjOrdenacaoBean
> </
> managed-bean-class>
>       <managed-bean-scope>session</managed-bean-scope>
>       </managed-bean>
>
>       <managed-bean>
>       <description>FWJ - PROTOTIPO</description>
>       <managed-bean-name>prototipoBean</managed-bean-name>
>       <managed-bean-class>
> br.com.petrobras.fwj.web.prototipo.beans.PrototipoBean
> </managed-bean-class>
>       <managed-bean-scope>session</managed-bean-scope>
>       </managed-bean>
>
>       <managed-bean>
>       <description>FWJ - CONTROLADOR</description>
>       <managed-bean-name>fwjControlador</managed-bean-name>
>       <managed-bean-class>
> br.com.petrobras.fwj.web.controlador.FwjControlador</managed-bean-class>
>       <managed-bean-scope>request</managed-bean-scope>
>       </managed-bean>
>
>       <managed-bean>
>       <description>FWJ - LISTA BUSCA</description>
>       <managed-bean-name>fwjListaBuscaBean</managed-bean-name>
>       <managed-bean-class>br.com.petrobras.fwj.web.beans.FwjListaBuscaBean
> </managed-bean-class>
>       <managed-bean-scope>session</managed-bean-scope>
>       </managed-bean>
>
>       <managed-bean>
>       <description>FWJ - PROTOTIPO</description>
>       <managed-bean-name>fwjPrototipoBean</managed-bean-name>
>       <managed-bean-class>br.com.petrobras.fwj.web.beans.FwjPrototipoBean
> </
> managed-bean-class>
>       <managed-bean-scope>session</managed-bean-scope>
>       </managed-bean>
>
>       <managed-bean>
>       <description>FWJ - GERENCIA O LAYOUT DA PAGINA (TAMANHO DA JANELA)</
> description>
>       <managed-bean-name>layout</managed-bean-name>
>       <managed-bean-class>br.com.petrobras.fwj.web.beans.FwjLayoutBean</
> managed-bean-class>
>       <managed-bean-scope>session</managed-bean-scope>
>       <managed-property>
>                   <property-name>width</property-name>
>                   <property-class>int</property-class>
>                   <value>800</value>
>       </managed-property>
>       <managed-property>
> <property-name>height</property-name>
>                   <property-class>int</property-class>
>                   <value>600</value>
>       </managed-property>
>       <managed-property>
>                   <property-name>minimumWidth</property-name>
>                   <property-class>int</property-class>
>                   <value>700</value>
>       </managed-property>
>       <managed-property>
>                   <property-name>minimumHeight</property-name>
>                   <property-class>int</property-class>
>                   <value>600</value>
>       </managed-property>
>       <managed-property>
>                   <property-name>maximumWidth</property-name>
>                   <property-class>int</property-class>
>                   <value>1300</value>
>       </managed-property>
>       <managed-property>
>                   <property-name>maximumHeight</property-name>
>                   <property-class>int</property-class>
>                   <value>700</value>
>       </managed-property>
>       </managed-bean>
>
>       <!-- SEGURANCA -->
>       <navigation-rule>
>       <from-view-id>*</from-view-id>
>       <navigation-case>
>                   <from-outcome>acesso_nao_permitido</from-outcome>
>                   <to-view-id>/view/common/acessoNaoPermitido.jsp</
> to-view-id>
>       </navigation-case>
>       </navigation-rule>
>
>       <!-- PAGINA DE ERRO -->
>       <navigation-rule>
>       <from-view-id>*</from-view-id>
>       <navigation-case>
>                   <from-outcome>erro</from-outcome>
>                   <to-view-id>/view/common/erro.jsp</to-view-id>
>       </navigation-case>
>       </navigation-rule>
>
>
>       <!-- CONVERSORES -->
>       <converter>
>             <converter-id>fwjBooleanStringConverter</converter-id>
>             <converter-class>
> br.com.petrobras.fwj.utils.FwjBooleanStringConverter</converter-class>
>       </converter>
>
>       <!-- VALIDADORES -->
>       <validator>
>             <validator-id>fwjEmailValidator</validator-id>
>             <validator-class>br.com.petrobras.fwj.utils.FwjEmailValidator
> </
> validator-class>
>       </validator>
>       <validator>
>             <validator-id>fwjTextoRequeridoValidator</validator-id>
>             <validator-class>
> br.com.petrobras.fwj.web.validator.FwjTextoRequeridoValidator</
> validator-class>
>       </validator>
>
> </faces-config>
>
> =====================================================================================================================================================
>
>
> "O emitente desta mensagem é responsável por seu conteúdo e endereçamento.
> Cabe ao destinatário cuidar quanto ao tratamento adequado. Sem a devida
> autorização, a divulgação, a reprodução, a distribuição ou qualquer outra
> ação em desconformidade com as normas internas do Sistema Petrobras são
> proibidas e passíveis de sanção disciplinar, cível e criminal."
>
> "The sender of this message is responsible for its content and addressing.
> The receiver shall take proper care of it. Without due authorization, the
> publication, reproduction, distribution or the performance of  any other
> action not conforming to Petrobras System internal policies and procedures
> is forbidden and liable to disciplinary, civil or criminal  sanctions."
>
> " El emisor de este mensaje es responsable por su contenido y
> direccionamiento. Cabe al destinatario darle el tratamiento adecuado. Sin
> la debida autorización, su divulgación, reproducción, distribución o
> cualquier otra acción no conforme a las normas internas del Sistema
> Petrobras están prohibidas y serán pasibles de sanción disciplinaria,
> civil
> y penal."
>
>


-- 
Alonso Isidoro Roman.