Erro com myfaces 1.2

12 views
Skip to first unread message

George Queiroz

unread,
Jul 23, 2007, 2:14:18 PM7/23/07
to jav...@googlegroups.com
Galera, se pego uma webapp funcionando com myfaces 1.1.5 e coloco o 1.2
olha o erro:

SEVERE: Exception sending context initialized event to listener instance
of class org.apache.myfaces.webapp.StartupServletContextListener
java.lang.NoSuchMethodError:
javax.servlet.jsp.JspFactory.getJspApplicationContext(Ljavax/servlet/ServletContext;)Ljavax/servlet/jsp/JspApplicationContext;
at
org.apache.myfaces.webapp.DefaultFacesInitializer.initFaces(DefaultFacesInitializer.java:102)
at
org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContextListener.java:57)
at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3764)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4216)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at
org.apache.catalina.core.StandardService.start(StandardService.java:448)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
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:295)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
23/07/2007 15:10:13 org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart


eis o web.xml

<?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">
<description>labjsf12
</description>
<context-param>
<description>Comma separated list of URIs of (additional) faces
config files.
(e.g. /WEB-INF/my-config.xml)
See JSF 1.0 PRD2, 10.3.2
Attention: You do not need to put /WEB-INF/faces-config.xml
in here.
</description>
<param-name>javax.faces.CONFIG_FILES</param-name>
<param-value>/WEB-INF/faces-config.xml</param-value>
</context-param>
<context-param>
<description>State saving method: "client" or "server" (= default)
See JSF Specification 2.5.3</description>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>client</param-value>
</context-param>
<context-param>
<description>Only applicable if state saving method is "server" (=
default).
Defines the amount (default = 20) of the latest views are
stored in session.</description>
<param-name>org.apache.myfaces.NUMBER_OF_VIEWS_IN_SESSION</param-name>
<param-value>20</param-value>
</context-param>
<context-param>
<description>Only applicable if state saving method is "server" (=
default).
If true (default) the state will be serialized to a byte
stream before it
is written to the session.
If false the state will not be serialized to a byte
stream.</description>
<param-name>org.apache.myfaces.SERIALIZE_STATE_IN_SESSION</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<description>Only applicable if state saving method is "server" (=
default) and if
org.apache.myfaces.SERIALIZE_STATE_IN_SESSION is true (=
default)
If true (default) the serialized state will be compressed
before it
is written to the session. If false the state will not be
compressed.</description>
<param-name>org.apache.myfaces.COMPRESS_STATE_IN_SESSION</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<description>This parameter tells MyFaces if javascript code should
be allowed in the
rendered HTML output.
If javascript is allowed, command_link anchors will have
javascript code
that submits the corresponding form.
If javascript is not allowed, the state saving info and
nested parameters
will be added as url parameters.
Default: "true"</description>
<param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name>
<param-value>false</param-value>
</context-param>
<context-param>
<description>If true, rendered HTML code will be formatted, so that
it is "human readable".
i.e. additional line separators and whitespace will be
written, that do not
influence the HTML code.
Default: "true"</description>
<param-name>org.apache.myfaces.PRETTY_HTML</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<description>If true, a javascript function will be rendered that is
able to restore the
former vertical scroll on every request. Convenient feature
if you have pages
with long lists and you do not want the browser page to
always jump to the top
if you trigger a link or button action that stays on the
same page.
Default: "false"</description>
<param-name>org.apache.myfaces.AUTO_SCROLL</param-name>
<param-value>true</param-value>
</context-param>

<context-param>
<description> Used for encrypting view state. Only relevant for
client side
state saving. See MyFaces wiki/web site documentation for
instructions
on how to configure an application for diffenent encryption
strengths.
</description>
<param-name>org.apache.myfaces.SECRET</param-name>
<param-value>NzY1NDMyMTA=</param-value>
</context-param>

<context-param>
<description>
Validate managed beans, navigation rules and ensure that
forms are not nested.
</description>
<param-name>org.apache.myfaces.VALIDATE</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<description>A class implementing the
org.apache.myfaces.shared.renderkit.html.util.AddResource
interface. It is responsible to
place scripts and css on the right position in your HTML
document.
Default:
"org.apache.myfaces.shared.renderkit.html.util.DefaultAddResource"
Follow the description on the MyFaces-Wiki-Performance page
to enable
StreamingAddResource instead of DefaultAddResource if you
want to
gain performance.
</description>
<param-name>org.apache.myfaces.ADD_RESOURCE_CLASS</param-name>

<param-value>org.apache.myfaces.renderkit.html.util.DefaultAddResource</param-value>

<!--param-value>org.apache.myfaces.component.html.util.StreamingAddResource</param-value-->
</context-param>

<context-param>
<description>
A very common problem in configuring MyFaces-web-applications
is that the Extensions-Filter is not configured at all
or improperly configured. This parameter will check for a properly
configured Extensions-Filter if it is needed by the web-app.
In most cases this check will work just fine, there might be cases
where an internal forward will bypass the Extensions-Filter and
the check
will not work. If this is the case, you can disable the check by
setting
this parameter to false.
</description>
<param-name>org.apache.myfaces.CHECK_EXTENSIONS_FILTER</param-name>
<param-value>true</param-value>
</context-param>

<filter>
<filter-name>extensionsFilter</filter-name>

<filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
<init-param>
<description>Set the size limit for uploaded files.
Format: 10 - 10 bytes
10k - 10 KB
10m - 10 MB
1g - 1 GB</description>
<param-name>uploadMaxFileSize</param-name>
<param-value>100m</param-value>
</init-param>
<init-param>
<description>Set the threshold size - files
below this limit are stored in memory, files above
this limit are stored on disk.

Format: 10 - 10 bytes
10k - 10 KB
10m - 10 MB
1g - 1 GB</description>
<param-name>uploadThresholdSize</param-name>
<param-value>100k</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>extensionsFilter</filter-name>
<url-pattern>*.faces</url-pattern>
</filter-mapping>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.faces</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
</web-app>

help-me

Rafael Ponte

unread,
Jul 23, 2007, 2:56:41 PM7/23/07
to jav...@googlegroups.com
Meio macabro..
Só pesquisando no google pra saber o problema.

Você está somente o myfaces core 1.1.5 ou o tomahawk está aí?

On 7/23/07, George Queiroz <george....@triadsystems.com.br> wrote:

Galera, se pego uma webapp funcionando com myfaces 1.1.5 e coloco o 1.2
olha o erro:

SEVERE: Exception sending context initialized event to listener instance
of class org.apache.myfaces.webapp.StartupServletContextListener
java.lang.NoSuchMethodError:
javax.servlet.jsp.JspFactory.getJspApplicationContext(Ljavax/servlet/ServletContext;)Ljavax/servlet/jsp/JspApplicationContext;
    at
org.apache.myfaces.webapp.DefaultFacesInitializer.initFaces (DefaultFacesInitializer.java:102)
    at
org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContextListener.java:57)
    at
org.apache.catalina.core.StandardContext.listenerStart (StandardContext.java:3764)

    at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4216)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
    at org.apache.catalina.core.StandardHost.start (StandardHost.java:736)

    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
    at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
    at
org.apache.catalina.core.StandardService.start (StandardService.java:448)

    at
org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
    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:295)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
23/07/2007 15:10:13 org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart


eis o web.xml

<?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">
  <description>labjsf12
  </description>
  <context-param>
    <description>Comma separated list of URIs of (additional) faces
config files.
            (e.g. /WEB-INF/my-config.xml)
            See JSF 1.0 PRD2, 10.3.2
            Attention: You do not need to put /WEB-INF/faces-config.xml
in here.
    </description>
    <param-name>javax.faces.CONFIG_FILES</param-name>
    <param-value>/WEB-INF/faces- config.xml</param-value>



--
Rafael Ponte

George Queiroz

unread,
Jul 23, 2007, 3:02:58 PM7/23/07
to jav...@googlegroups.com
descobri...

jsf 1.2 so roda sobre jsp 2.1 q so existe nos java ee 5 full ou tomcat 6 :)

Rafael Ponte escreveu:


> Meio macabro..
> Só pesquisando no google pra saber o problema.
>
> Você está somente o myfaces core 1.1.5 ou o tomahawk está aí?
>

> On 7/23/07, *George Queiroz * <george....@triadsystems.com.br

> ------------------------------------------------------------------------
>
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.5.476 / Virus Database: 269.10.14/912 - Release Date: 22/7/2007 19:02
>

Alessandro

unread,
Jul 23, 2007, 3:14:15 PM7/23/07
to jav...@googlegroups.com
Qual servidor de aplicação?

George Queiroz escreveu:

Alessandro

unread,
Jul 23, 2007, 3:22:45 PM7/23/07
to jav...@googlegroups.com
O JBoss mesmo não sendo full JavaEE 5, tbm pode rodar JSF 1.2. Veja no
wiki do JBoss.

[]s
Alessandro


George Queiroz escreveu:

George Queiroz

unread,
Jul 23, 2007, 3:14:14 PM7/23/07
to jav...@googlegroups.com
estava testando no tomGato 5.5, no 6 roda e no weblogic 10 roda tb, como
vai ser weblogic, ta tudo certo.

Alessandro escreveu:

Alessandro

unread,
Jul 23, 2007, 3:26:41 PM7/23/07
to jav...@googlegroups.com
Beleza, se vc usa WebLogic entao esta tudo certo.

Alessandro escreveu:

Rafael Ponte

unread,
Jul 23, 2007, 3:36:05 PM7/23/07
to jav...@googlegroups.com
Ah tah.. verdade, tem que ter jee5, pra ser mais exacto a jsp 2.1.

>>>     org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized (StartupServletContextListener.java:57)

>>>         at
>>>     org.apache.catalina.core.StandardContext.listenerStart
>>>     (StandardContext.java:3764)
>>>         at
>>>     org.apache.catalina.core.StandardContext.start(StandardContext.java:4216)
>>>         at
>>>     org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
>>>         at org.apache.catalina.core.StandardHost.start
>>>     (StandardHost.java:736)
>>>         at
>>>     org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
>>>         at
>>>     org.apache.catalina.core.StandardEngine.start (StandardEngine.java:443)

>>>         at
>>>     org.apache.catalina.core.StandardService.start
>>>     (StandardService.java:448)
>>>         at
>>>     org.apache.catalina.core.StandardServer.start (StandardServer.java:700)

>>>         at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
>>>         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:295)
>>>         at org.apache.catalina.startup.Bootstrap.main (Bootstrap.java:433)
Reply all
Reply to author
Forward
0 new messages