myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Timoshenko <le...@mail.ru>
Subject Tomahawk on Glassfish
Date Wed, 14 Mar 2007 00:59:41 GMT

Good day, 
Does anyone have experience using Tomahawk on Glassfish?

I am currently trying to migrate my application written with Myfaces 1.1.1 and using Tomahawk
to Glassfish. Previously it was running on Tomcat.

First problem I faced with Glassfish is that its JSF 1.2 implementation mixes up with MyFaces
in my application resulting in a number of error messages.
I then decided to switch from MyFaces JSF implementation to the one shipped with Glassfish
(JSF 1.2).
Now when I try to open the following JSF page:

***********************************************
<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
<f:view>
	<h:form id="forecastPrompt" enctype="multipart/form-data">
		<h:messages errorStyle="color: red; font-weight:bold;"/>
		<h:panelGroup>
			<h:commandButton action="#{forecastPrompt.viewForecast}" value="View Forecast">
				<t:updateActionListener property="#{forecasting.week}"  value="10" />
			</h:commandButton>
		</h:panelGroup>
	</h:form>
</f:view>
***********************************************

I get ClassCastException when renderer tries to find parent element of <t:updateActionListener>.
See the error stack below. web.xml is below the stack trace.
I tried it with Glassfish 1 and 2 - all the same.
Any ideas how they can co-exist together?
I would appreciate any solution - either how to make MyFaces JSF implementation run on Glassfish
or how to make Tomahawk work with Glassfish's JSF 1.2 implementation.

The stack trace is:
***********************************************
[#|2007-03-14T11:15:04.173+1100|SEVERE|sun-appserver-pe9.0|javax.enterprise.system.container.web|_ThreadID=14;_ThreadName=httpWorkerThread-80-0;_RequestID=0bd52afa-19f3-442a-a069-b93a5ddb804a;|StandardWrapperValve[faces]:
Servlet.service() for servlet faces threw exception
java.lang.ClassCastException: com.sun.faces.taglib.html_basic.CommandButtonTag
	at javax.faces.webapp.UIComponentTag.getParentUIComponentTag(UIComponentTag.java:232)
	at org.apache.myfaces.custom.updateactionlistener.UpdateActionListenerTag.doStartTag(UpdateActionListenerTag.java:67)
	at org.apache.jsp.index_jsp._jspx_meth_t_updateActionListener_0(index_jsp.java:294)
	at org.apache.jsp.index_jsp._jspx_meth_h_commandButton_0(index_jsp.java:263)
	at org.apache.jsp.index_jsp._jspx_meth_h_panelGroup_0(index_jsp.java:221)
	at org.apache.jsp.index_jsp._jspx_meth_h_form_0(index_jsp.java:163)
	at org.apache.jsp.index_jsp._jspx_meth_f_view_0(index_jsp.java:117)
	at org.apache.jsp.index_jsp._jspService(index_jsp.java:81)
	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:353)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:412)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:318)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
	at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:397)
	at org.apache.catalina.core.ApplicationDispatcher.doInvoke(ApplicationDispatcher.java:850)
	at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:697)
	at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:532)
	at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:465)
	at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:353)
	at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:413)
	at com.sun.faces.application.ViewHandlerImpl.executePageToBuildView(ViewHandlerImpl.java:480)
	at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:125)
	at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:133)
	at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:244)
	at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:140)
	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
	at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:397)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184)
	at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:144)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:216)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:276)
	at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
	at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:240)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:179)
	at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
	at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:182)
	at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
	at com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
	at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
	at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:239)
	at com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667)
	at com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:574)
	at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:844)
	at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287)
	at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212)
	at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
	at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)
|#]
****************************************************

My web.xml:
****************************************************
<?xml version="1.0" encoding="UTF-8"?>
<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">
	
	<display-name>GlassCat</display-name>

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

    <context-param>
		<param-name>webAppRootKey</param-name>
		<param-value>GCAT.root</param-value>
	</context-param>

	<filter>
		<filter-name>MyFacesExtensionsFilter</filter-name>
 		<filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
		<init-param>
			<param-name>maxFileSize</param-name>
			<param-value>20m</param-value>
		</init-param>
	</filter>
	
	<filter-mapping>
	    <filter-name>MyFacesExtensionsFilter</filter-name>
	    <url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
	</filter-mapping>	
	
	<!-- extension mapping for serving page-independent resources (javascript, stylesheets,
images, etc.)  -->
	<filter-mapping>
	    <filter-name>MyFacesExtensionsFilter</filter-name>
		<url-pattern>*.jsf</url-pattern>
	</filter-mapping>
	<filter-mapping>
	    <filter-name>MyFacesExtensionsFilter</filter-name>
		<url-pattern>*.html</url-pattern>
	</filter-mapping>



	<servlet>
		<servlet-name>faces</servlet-name>
		<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
		<load-on-startup>1</load-on-startup>
	</servlet>

	<servlet-mapping>
		<servlet-name>faces</servlet-name>
		<url-pattern>*.html</url-pattern>
	</servlet-mapping>

	<servlet-mapping>
		<servlet-name>faces</servlet-name>
		<url-pattern>*.jsf</url-pattern>
	</servlet-mapping>



	<welcome-file-list>
		<welcome-file>index.jsp</welcome-file>
		<welcome-file>index.html</welcome-file>
		<welcome-file>index.jsf</welcome-file>
	</welcome-file-list>

	<session-config>
		<session-timeout>120</session-timeout>
	</session-config>

</web-app>
****************************************************

Thanks a lot in advance!




Mime
View raw message