myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthias Wessendorf" <mat...@apache.org>
Subject Re: Switching from RI to myfaces...
Date Wed, 26 Apr 2006 08:44:55 GMT
Interesting, that you get the "loaded twice" notification,
since your value is "/WEB-INF/components-faces-config.xml"

and the FacesConfigurator compares to "/WEB-INF/faces-config.xml" instead

-Matthias

On 4/26/06, Bjørn T Johansen <btj@havleik.no> wrote:
> My web.xml looks like this..:
>
> <?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>New version of DT Digital..</description>
>   <display-name>DT Digital</display-name>
>   <context-param>
>     <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
>     <param-value>server</param-value>
>   </context-param>
>   <context-param>
>     <param-name>org.apache.myfaces.SERIALIZE_STATE_IN_SESSION</param-name>
>     <param-value>false</param-value>
>   </context-param>
>   <context-param>
>     <param-name>com.sun.faces.verifyObjects</param-name>
>     <param-value>false</param-value>
>   </context-param>
>   <context-param>
>     <param-name>javax.faces.CONFIG_FILES</param-name>
>     <param-value>/WEB-INF/components-faces-config.xml</param-value>
>   </context-param>
>   <context-param>
>     <param-name>contextConfigLocation</param-name>
>     <param-value>/WEB-INF/applicationContext.xml</param-value>
>   </context-param>
>   <context-param>
>     <param-name>tree.control.images</param-name>
>     <param-value>/images</param-value>
>   </context-param>
>   <context-param>
>     <param-name>tiles-definitions</param-name>
>     <param-value>/WEB-INF/tiles.xml</param-value>
>   </context-param>
>   <filter>
>     <filter-name>DTAuthFilter</filter-name>
>     <filter-class>no.havleik.dt.security.AuthFilter</filter-class>
>   </filter>
>   <filter-mapping>
>     <filter-name>DTAuthFilter</filter-name>
>     <url-pattern>/protected/*</url-pattern>
>     <dispatcher>REQUEST</dispatcher>
>     <dispatcher>FORWARD</dispatcher>
>   </filter-mapping>
>   <filter>
>     <filter-name>shale</filter-name>
>     <filter-class>org.apache.shale.faces.ShaleApplicationFilter</filter-class>
>   </filter>
>   <filter-mapping>
>     <filter-name>shale</filter-name>
>     <url-pattern>/*</url-pattern>
>   </filter-mapping>
>
>   <listener>
>     <listener-class>no.havleik.dt.jsf.Initializer</listener-class>
>   </listener>
>   <listener>
>     <listener-class>org.apache.commons.chain.web.ChainListener</listener-class>
>   </listener>
>   <!--<listener>
>     <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
>   </listener>-->
>   <servlet>
>     <servlet-name>Tiles Servlet</servlet-name>
>     <servlet-class>org.apache.tiles.servlets.TilesServlet</servlet-class>
>     <init-param>
>       <param-name>definitions-config</param-name>
>       <param-value>/WEB-INF/tiles.xml</param-value>
>     </init-param>
>     <load-on-startup>2</load-on-startup>
>   </servlet>
>   <servlet>
>     <servlet-name>context</servlet-name>
>     <servlet-class>org.springframework.web.context.ContextLoaderServlet</servlet-class>
>     <load-on-startup>2</load-on-startup>
>   </servlet>
>   <servlet>
>     <servlet-name>Faces Servlet</servlet-name>
>     <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
>     <load-on-startup>1</load-on-startup>
>   </servlet>
>   <servlet>
>     <servlet-name>ComponentsInitializerServlet</servlet-name>
>     <servlet-class>com.jscape.framework.galileo.support.base.ComponentsInitializerServlet</servlet-class>
>     <init-param>
>       <param-name>applicationRootContext</param-name>
>       <param-value>/DT</param-value>
>     </init-param>
>     <init-param>
>       <param-name>pathToImages</param-name>
>       <param-value>/DT/repository/images/</param-value>
>     </init-param>
>     <init-param>
>       <param-name>pathToJavaScriptsExplorer</param-name>
>       <param-value>/DT/repository/scripts/</param-value>
>     </init-param>
>     <init-param>
>       <param-name>pathToJavaScriptsNetscape</param-name>
>       <param-value>/DT/repository/scripts/ns/</param-value>
>     </init-param>
>     <!--<init-param>
>       <param-name>treeDynamicDataModelProviderServletUrl</param-name>
>       <param-value>/TreeDynamicDataModelProviderServlet</param-value>
>     </init-param>-->
>     <load-on-startup>2</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-list>
>   <!--<error-page>
>     <exception-type>javax.servlet.ServletException</exception-type>
>     <location>/error.jsp</location>
>   </error-page>
>   <error-page>
>     <exception-type>javax.faces.FacesException</exception-type>
>     <location>/error.jsp</location>
>   </error-page>-->
>   <session-config>
>     <session-timeout>60</session-timeout>
>   </session-config>
>   <resource-ref>
>     <res-ref-name>jdbc/DT</res-ref-name>
>     <res-type>javax.sql.DataSource</res-type>
>     <res-auth>Container</res-auth>
>   </resource-ref>
> </web-app>
>
>
>
> BTJ
>
> On Wed, 26 Apr 2006 10:13:42 +0200
> "Matthias Wessendorf" <matzew@apache.org> wrote:
>
> > can you post web.xml ?
> >
> > On 4/26/06, Bjørn T Johansen <btj@havleik.no> wrote:
> > > No, still using server side saving..
> > >
> > > But setting org.apache.myfaces.SERIALIZE_STATE_IN_SESSION to false solved this
exception problem but now I
> > > get another problem...
> > > I store an object in the session scope when I login, but when I try to get
this object now, this object is
> > > now null..
> > > Do I need to set more context parameters?
> > >
> > >
> > > BTJ
> > >
> > > On Wed, 26 Apr 2006 06:08:10 +0000
> > > "Dennis Byrne" <dennis@dbyrne.net> wrote:
> > >
> > > > Somewhere in an ArrayList there is an object that is not serializable.
 When you went from RO to
> > > > MyFaces, did you also go from server side saving to client?  Another possible
answer to your problem
> > > > would be to set the following context parameter to false:
> > > >
> > > > org.apache.myfaces.SERIALIZE_STATE_IN_SESSION
> > > >
> > > > Dennis Byrne
> > > >
> > > > >-----Original Message-----
> > > > >From: Bjørn T Johansen [mailto:btj@havleik.no]
> > > > >Sent: Wednesday, April 26, 2006 01:57 AM
> > > > >To: 'MyFaces Discussion'
> > > > >Subject: Switching from RI to myfaces...
> > > > >
> > > > >I am trying to switch from Sun RI impl. to myfaces, but when I try
to run my webapp now, I just get
> > > > >this exception..:
> > > > >
> > > > >26.04.2006 07:47:33,179 - Exiting serializeView - Could not serialize
state:
> > > > >org.apache.myfaces.context.servlet.ServletFacesContextImpl java.io.NotSerializableException:
> > > > >org.apache.myfaces.context.servlet.ServletFacesContextImpl at
> > > > >java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1075)
at
> > > > >java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1369)
at
> > > > >java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1341)
at
> > > > >java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1284)
at
> > > > >java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
at
> > > > >java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1369)
at
> > > > >java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1341)
at
> > > > >java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1284)
at
> > > > >java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
at
> > > > >java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1245)
at
> > > > >java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1069)
at
> > > > >java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1245)
at
> > > > >java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1069)
at
> > > > >java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
at
> > > > >java.util.ArrayList.writeObject(ArrayList.java:569) 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 java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:890)
> > > > >        at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1333)
> > > > >        at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1284)
> > > > >        at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
> > > > >        at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1245)
> > > > >        at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1069)
> > > > >        at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
> > > > >        at java.util.ArrayList.writeObject(ArrayList.java:569)
> > > > >        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 java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:890)
> > > > >        at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1333)
> > > > >        at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1284)
> > > > >        at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
> > > > >        at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1245)
> > > > >        at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1069)
> > > > >        at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
> > > > >        at java.util.ArrayList.writeObject(ArrayList.java:569)
> > > > >        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 java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:890)
> > > > >        at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1333)
> > > > >        at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1284)
> > > > >        at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
> > > > >        at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1245)
> > > > >        at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1069)
> > > > >        at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
> > > > >        at
> > > > > org.apache.myfaces.application.jsp.JspStateManagerImpl.serializeView(JspStateManagerImpl.java:590)
at
> > > > >org.apache.myfaces.application.jsp.JspStateManagerImpl.saveSerializedViewInServletSession(JspStateManagerImpl.java:493)
> > > > >at
> > > > >org.apache.myfaces.application.jsp.JspStateManagerImpl.saveSerializedView(JspStateManagerImpl.java:332)
> > > > >at org.apache.myfaces.taglib.core.ViewTag.doAfterBody(ViewTag.java:122)
at
> > > > >org.apache.jsp.protected_.index_005ft_jsp._jspx_meth_f_view_0(index_005ft_jsp.java:150)
at
> > > > >org.apache.jsp.protected_.index_005ft_jsp._jspService(index_005ft_jsp.java:102)
at
> > > > >org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at
> > > > >javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at
> > > > >org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
at
> > > > >org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
at
> > > > >org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
at
> > > > >javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at
> > > > >org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at
> > > > >org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
> > > > >no.havleik.dt.security.AuthFilter.doFilter(AuthFilter.java:83) at
> > > > >org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at
> > > > >org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
> > > > >org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
at
> > > > >org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
at
> > > > >org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
at
> > > > >org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
at
> > > > >org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:416)
> > > > >at org.apache.shale.tiles.TilesViewHandler.dispatchToTile(TilesViewHandler.java:318)
at
> > > > >org.apache.shale.tiles.TilesViewHandler.renderView(TilesViewHandler.java:159)
at
> > > > >org.apache.shale.view.faces.ViewViewHandler.renderView(ViewViewHandler.java:146)
at
> > > > >org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:367)
at
> > > > >javax.faces.webapp.FacesServlet.service(FacesServlet.java:138) at
> > > > >org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at
> > > > >org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
> > > > >org.apache.shale.faces.ShaleApplicationFilter.doFilter(ShaleApplicationFilter.java:285)
at
> > > > >org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at
> > > > >org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
> > > > >org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at
> > > > >org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at
> > > > >org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at
> > > > >org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at
> > > > >org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at
> > > > >org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at
> > > > >org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at
> > > > >org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
> > > > >at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at
> > > > >org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at
> > > > >org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at
> > > > >java.lang.Thread.run(Thread.java:595)
> > > > >
> > > > >
> > > > >I am also getting this in the log, which indicate something loading
twice?
> > > > >(and no, I do not have faces-config.xml in javax.faces.CONFIG_FILES..)
> > > > >
> > > > >26.04.2006 07:53:22,013 - No context init parameter 'org.apache.myfaces.PRETTY_HTML'
found, using
> > > > >default value true
> > > > >26.04.2006 07:53:22,013 - No context init parameter 'org.apache.myfaces.ALLOW_JAVASCRIPT'
found,
> > > > >using default value true
> > > > >26.04.2006 07:53:22,013 - No context init parameter
> > > > >'org.apache.myfaces.DETECT_JAVASCRIPT' found, using default value
false
> > > > >26.04.2006 07:53:22,013 - No context init parameter 'org.apache.myfaces.AUTO_SCROLL'
found, using
> > > > >default value false
> > > > >26.04.2006 07:53:22,013 - No context init parameter 'org.apache.myfaces.ADD_RESOURCE_CLASS'
found,
> > > > >using default value org.apache.myfaces.renderkit.html.util.DefaultAddResource
> > > > >26.04.2006 07:53:22,044 - No context init parameter 'org.apache.myfaces.PRETTY_HTML'
found, using
> > > > >default value true
> > > > >26.04.2006 07:53:22,044 - No context init parameter 'org.apache.myfaces.ALLOW_JAVASCRIPT'
found, using
> > > > >default value true
> > > > >26.04.2006 07:53:22,044 - No context init parameter 'org.apache.myfaces.DETECT_JAVASCRIPT'
found, using
> > > > >default value false
> > > > >26.04.2006 07:53:22,044 - No context init parameter 'org.apache.myfaces.AUTO_SCROLL'
found, using
> > > > >default value false
> > > > >26.04.2006 07:53:22,044 - No context init parameter 'org.apache.myfaces.ADD_RESOURCE_CLASS'
found,
> > > > >using default value org.apache.myfaces.renderkit.html.util.DefaultAddResource
> > > > >
> > > > >
> > > > >
> > > > >Regards,
> > > > >
> > > > >BTJ
> > > > >
> > > > >--
> > > > >-----------------------------------------------------------------------------------------------
> > > > >Bjørn T Johansen
> > > > >
> > > > >btj@havleik.no
> > > > >-----------------------------------------------------------------------------------------------
> > > > >Someone wrote:
> > > > >"I understand that if you play a Windows CD backwards you hear strange
Satanic messages"
> > > > >To which someone replied:
> > > > >"It's even worse than that; play it forwards and it installs Windows"
> > > > >-----------------------------------------------------------------------------------------------
> > > > >
> > > >
> > >
> >
> >
> > --
> > Matthias Wessendorf
> > Aechterhoek 18
> > 48282 Emsdetten
> > http://jroller.com/page/mwessendorf
> > mwessendorf-at-gmail-dot-com
>


--
Matthias Wessendorf
Aechterhoek 18
48282 Emsdetten
http://jroller.com/page/mwessendorf
mwessendorf-at-gmail-dot-com

Mime
View raw message