It's not a secret anymore!*
The moose likes JSF and the fly likes Switching from Reference Implementation to MyFaces Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » JSF
Bookmark "Switching from Reference Implementation to MyFaces" Watch "Switching from Reference Implementation to MyFaces" New topic
Author

Switching from Reference Implementation to MyFaces

Thorsten Jansen
Greenhorn

Joined: Apr 01, 2006
Posts: 2
Hi,
one year ago I developed a JSF-software using Tomcat 5.5.7 and SUNs reference implementation, which worked fine. Now I try to replace it by MyFaces and I get this error navigating to the first page:

javax.faces.FacesException: org.apache.jasper.JasperException
org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:425)
org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:234)
org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:352)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:107)

There is no protocol entry in the TOMCAT logs directory. The only thing I did was replacing the related jars, which should be the only thing to do, as I understand the concept ;-). Any idea what the reason could be?

Thanks
Thorsten
Gerardo Tasistro
Ranch Hand

Joined: Feb 08, 2005
Posts: 362
I've noticed the web.xml changes


Sun's


MyFaces



There might be an issue there that is hitting you.
Thorsten Jansen
Greenhorn

Joined: Apr 01, 2006
Posts: 2
Hi,
thanks for the response. I checked the file and found that there should be no problem:

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

<!-- Faces Servlet Mapping -->
<servlet-mapping>
<servlet-name>FacesServlet</servlet-name>
<url-pattern>*.faces</url-pattern>
</servlet-mapping>

The problem must be based in something different.

Thorsten
Gerardo Tasistro
Ranch Hand

Joined: Feb 08, 2005
Posts: 362
Your error looks exactly the the one I had last night.



It turned out I was missing ehcache.jar in my libs. I'm using Hibernate on a project B that depended on A. Both A and B had the Hibernate libraries. B just had a subset of A's. Once I removed A's export of Hibernate's libs B crashed. I just added ehcache.jar to B and all worked fine.


Point being it had nothing to do with Faces. I'm not sure how your app is laid out, but maybe you removed a bit too much. Check your logs and stdout. Hope that helps.
 
GeeCON Prague 2014
 
subject: Switching from Reference Implementation to MyFaces