[jboss-user] [JBoss Seam] - Re: Running the booking example on JBoss with the JSF 1.2 RI

chuaky do-not-reply at jboss.com
Thu Aug 30 04:42:04 EDT 2007


hi,

Appreciate very much advice from the community on this issue that i encountered.

I was try to get an example portal working in this environment:

- JBoss portal 2.6.1 (with AS 4.2.1)
- Seam 1.2.1GA
- use JSF RI 1.2

I combine the sample code from ajax trunk (ajaxPortlet), and got the following error dump.  I couldn't understand the error, please advise.

Error:
====

  | 2007-08-30 16:26:17,036 DEBUG [org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter] Filter start request processing at 8/30/07 4:26 PM  for uri: /seam-arich/start.seam
  | 2007-08-30 16:26:17,036 DEBUG [org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter] Incoming request has Content-Type header with character encoding UTF-8
  | 2007-08-30 16:26:17,036 DEBUG [org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter] Filter request output to XML
  | 2007-08-30 16:26:17,036 DEBUG [org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter] XML filter service start processing request
  | 2007-08-30 16:26:17,036 DEBUG [org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter] Filter start request processing at 8/30/07 4:26 PM  for uri: /seam-arich/start.seam
  | 2007-08-30 16:26:17,036 DEBUG [org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter] Not is faces request, Filter perform not-xml parsing chain
  | 2007-08-30 16:26:17,036 ERROR [org.jboss.seam.web.ExceptionFilter] uncaught exception
  | java.lang.UnsupportedOperationException
  | 	at javax.faces.context.ExternalContext.setRequestCharacterEncoding(ExternalContext.java:397)
  | 	at javax.faces.application.ViewHandler.initView(ViewHandler.java:259)
  | 	at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:208)
  | 	at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
  | 	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
  | 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
  | 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  | 	at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:293)
  | 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
  | 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  | 	at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:63)
  | 	at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
  | 	at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
  | 	at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:57)
  | 	at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
  | 	at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:79)
  | 	at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
  | 	at org.jboss.seam.web.SeamFilter.doFilter(SeamFilter.java:84)
  | 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
  | 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  | 	at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:127)
  | 	at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:277)
  | 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
  | 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  | 	at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
  | 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
  | 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  | 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
  | 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
  | 	at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
  | 	at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
  | 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
  | 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
  | 	at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
  | 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
  | 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
  | 	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
  | 	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
  | 	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
  | 	at java.lang.Thread.run(Thread.java:595)
  | 



web.xml
======


  | <?xml version="1.0"?>
  | <!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  | 	~ JBoss, a division of Red Hat                                              ~
  | 	~ Copyright 2006, Red Hat Middleware, LLC, and individual                   ~
  | 	~ contributors as indicated by the @authors tag. See the                    ~
  | 	~ copyright.txt in the distribution for a full listing of                   ~
  | 	~ individual contributors.                                                  ~
  | 	~                                                                           ~
  | 	~ This is free software; you can redistribute it and/or modify it           ~
  | 	~ under the terms of the GNU Lesser General Public License as               ~
  | 	~ published by the Free Software Foundation; either version 2.1 of          ~
  | 	~ the License, or (at your option) any later version.                       ~
  | 	~                                                                           ~
  | 	~ This software is distributed in the hope that it will be useful,          ~
  | 	~ but WITHOUT ANY WARRANTY; without even the implied warranty of            ~
  | 	~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU          ~
  | 	~ Lesser General Public License for more details.                           ~
  | 	~                                                                           ~
  | 	~ You should have received a copy of the GNU Lesser General Public          ~
  | 	~ License along with this software; if not, write to the Free               ~
  | 	~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA        ~
  | 	~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.                  ~
  | 	~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
  | <web-app version="2.4" 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">
  |  <context-param>
  |   <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>
  |   <param-name>org.apache.myfaces.AUTO_SCROLL</param-name>
  |   <param-value>false</param-value>
  |  </context-param>
  |  <context-param>
  |   <param-name>org.apache.myfaces.CHECK_EXTENSIONS_FILTER</param-name>
  |   <param-value>false</param-value>
  |  </context-param>
  |  <context-param>
  |   <param-name>org.apache.myfaces.PRETTY_HTML</param-name>
  |   <param-value>true</param-value>
  |  </context-param>
  |  <context-param>
  |   <param-name>facelets.DEVELOPMENT</param-name>
  |   <param-value>false</param-value>
  |  </context-param>
  |  <context-param>
  |   <param-name>facelets.SKIP_COMMENTS</param-name>
  |   <param-value>true</param-value>
  |  </context-param>
  |  <context-param>
  |   <param-name>facelets.VIEW_MAPPINGS</param-name>
  |   <param-value>*.xhtml</param-value>
  |  </context-param>
  |  <context-param>
  |   <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
  |   <param-value>org.ajax4jsf.portlet.application.FaceletPortletViewHandler</param-value>
  |  </context-param>
  |  <!-- 
  | 		<context-param>
  | 		<param-name>facelets.LIBRARIES</param-name>
  | 		<param-value>/WEB-INF/portal.taglib.xml</param-value>
  | 		</context-param>
  | 	-->
  |  <context-param>
  |   <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
  |   <param-value>.xhtml</param-value>
  |  </context-param>
  |  <context-param>
  |   <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
  |   <param-value>server</param-value>
  |  </context-param>
  |  <filter>
  |   <display-name>Ajax4jsf Filter</display-name>
  |   <filter-name>ajax4jsf</filter-name>
  |   <filter-class>org.ajax4jsf.Filter</filter-class>
  |  </filter>
  |  <filter-mapping>
  |   <filter-name>ajax4jsf</filter-name>
  |   <servlet-name>FacesServlet</servlet-name>
  |   <dispatcher>FORWARD</dispatcher>
  |   <dispatcher>REQUEST</dispatcher>
  |   <dispatcher>INCLUDE</dispatcher>
  |  </filter-mapping>
  |  
  |      <filter-mapping>
  |         <filter-name>ajax4jsf</filter-name>
  |         <url-pattern>*.seam</url-pattern>
  |     </filter-mapping>
  |  
  |  <!--
  |  	<listener>
  |  	<listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
  |  	</listener>
  |  -->
  |  
  |      <!-- JSF RI -->
  |     <listener>
  |         <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
  |     </listener> 
  | 
  |  
  |  <servlet>
  |   <servlet-name>FacesServlet</servlet-name>
  |   <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
  |   <load-on-startup>1</load-on-startup>
  |  </servlet>
  |  <servlet-mapping>
  |   <servlet-name>FacesServlet</servlet-name>
  |   <url-pattern>/faces/*</url-pattern>
  |  </servlet-mapping>
  |  
  | <!--
  |  <mime-mapping>
  |   <extension>svg</extension>
  |   <mime-type>image/svg+xml</mime-type>
  |  </mime-mapping>
  |  <login-config>
  |   <auth-method>BASIC</auth-method>
  |  </login-config>
  | --> 
  |  
  |      <!-- Seam -->
  |     
  |     <listener>
  |         <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
  |     </listener>
  |     
  |     <!-- Propagate conversations across redirects -->
  | <!-- 
  |     <filter>
  |         <filter-name>Seam Redirect Filter</filter-name>
  |         <filter-class>org.jboss.seam.servlet.SeamRedirectFilter</filter-class>
  |     </filter> 
  | 
  |     <filter-mapping>
  |         <filter-name>Seam Redirect Filter</filter-name>
  |         <url-pattern>*.seam</url-pattern>
  |     </filter-mapping>
  | --> 
  |     <servlet>
  |         <servlet-name>Seam Resource Servlet</servlet-name>
  |         <servlet-class>org.jboss.seam.servlet.ResourceServlet</servlet-class>
  |     </servlet>
  | 
  |     <servlet-mapping>
  |         <servlet-name>Seam Resource Servlet</servlet-name>
  |         <url-pattern>/seam/resource/*</url-pattern>
  |     </servlet-mapping>
  | 
  |     <filter>
  |         <filter-name>Seam Filter</filter-name>
  |         <filter-class>org.jboss.seam.web.SeamFilter</filter-class>
  |     </filter>
  | 
  |     <filter-mapping>
  |         <filter-name>Seam Filter</filter-name>
  |         <url-pattern>/*</url-pattern>
  |     </filter-mapping>
  | 
  | 
  | 
  |     <!-- Faces Servlet Mapping -->
  |     <servlet-mapping>
  |         <servlet-name>FacesServlet</servlet-name>
  |         <url-pattern>*.seam</url-pattern>
  |     </servlet-mapping>
  | 
  |     <servlet-mapping>
  |         <servlet-name>FacesServlet</servlet-name>
  |         <url-pattern>*.jsf</url-pattern>
  |     </servlet-mapping>
  |    
  |  
  | </web-app>
  | 


faces-config.xml
===========


  | <?xml version="1.0"?>
  | <!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>
  |  <managed-bean>
  |   <managed-bean-name>bean</managed-bean-name>
  |   <managed-bean-class>portal.Bean</managed-bean-class>
  |   <managed-bean-scope>session</managed-bean-scope>
  |  </managed-bean>
  |  <navigation-rule>
  |   <from-view-id>/start.xhtml</from-view-id>
  |   <navigation-case>
  |    <from-outcome>repeater</from-outcome>
  |    <to-view-id>/repeater.xhtml</to-view-id>
  |   </navigation-case>
  |  </navigation-rule>
  |  <navigation-rule>
  |   <from-view-id>/repeater.xhtml</from-view-id>
  |   <navigation-case>
  |    <from-outcome>start</from-outcome>
  |    <to-view-id>/start.xhtml</to-view-id>
  |   </navigation-case>
  |  </navigation-rule>
  |  <render-kit>
  |   <renderer>
  |    <description>override the viewroot</description>
  |    <component-family>javax.faces.ViewRoot</component-family>
  |    <renderer-type>javax.faces.ViewRoot</renderer-type>
  |    <renderer-class>org.ajax4jsf.portlet.renderkit.portlet.PortletAjaxViewRootRenderer</renderer-class>
  |   </renderer>
  |  </render-kit>
  |  <application>
  |   <view-handler>org.ajax4jsf.portlet.application.PortletViewHandler</view-handler>
  |   <state-manager>org.ajax4jsf.portlet.application.PortalStateManager</state-manager>
  |   <!-- 
  |   <view-handler>com.sun.facelets.FaceletPortletViewHandler</view-handler>
  |    -->
  |  </application>
  |  
  |      <application>
  |         <el-resolver>org.jboss.seam.jsf.SeamELResolver</el-resolver>
  |     </application>
  | <!--
  |     <lifecycle>
  |         <phase-listener>org.jboss.seam.jsf.SeamPhaseListener</phase-listener>
  |     </lifecycle>
  | -->
  |     <lifecycle>
  |         <phase-listener>org.jboss.seam.jsf.TransactionalSeamPortletPhaseListener</phase-listener>
  |     </lifecycle>
  |     
  |  
  | </faces-config>
  | 


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4079477#4079477

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4079477



More information about the jboss-user mailing list