You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Saul Qunming Yuan <yu...@dataanvil.com> on 2005/03/25 05:24:02 UTC

[OT] Strange JSF error

 Hi,

Sorry for this OT question, but below is a Web app that use JSF and MyFaces and deployed to JBoss, I got the following strange error, I googled "No faces context", but didn't find a single resource on that. I know many users in this list also use JSF as well, hence posting my question here. 

Any ideas are appreciated.

thanks,

Saul


HTTP Status 500 - 

--------------------------------------------------------------------------------

type Exception report

message 

description The server encountered an internal error () that prevented it from fulfilling this request.

exception 

javax.servlet.ServletException: No faces context?!
	org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825)
	org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758)
	org.apache.jsp.login_jsp._jspService(login_jsp.java:101)
	org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
	org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:75)

root cause 

javax.servlet.jsp.JspException: No faces context?!
	net.sourceforge.myfaces.taglib.core.LoadBundleTag.doStartTag(LoadBundleTag.java:88)
	org.apache.jsp.login_jsp._jspx_meth_f_loadBundle_0(login_jsp.java:118)
	org.apache.jsp.login_jsp._jspService(login_jsp.java:88)
	org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
	org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:75)

note The full stack trace of the root cause is available in the Apache Tomcat/5.0.28 logs.


--------------------------------------------------------------------------------

Apache Tomcat/5.0.28

Re: [OT] Strange JSF error

Posted by Saul Qunming Yuan <yu...@dataanvil.com>.
David,

You're right, I was the mapping the Face Servlet to a /my_web_context/*, 
while the index.jsp (which is actually a JSF page) is on the root. So the 
index.jsp didn't actually go through the Face Servlet at all. After changing 
the mapping to /*.jsp (yes, I'll change that to JSF or FACES later on), that 
error disappeared.

thanks a lot,
Saul


----- Original Message ----- 
From: "David G. Friedman" <hu...@ix.netcom.com>
To: "Struts Users Mailing List" <us...@struts.apache.org>
Sent: Thursday, March 24, 2005 10:43 PM
Subject: RE: [OT] Strange JSF error


> Saul,
>
> I recommend you search the MyFaces (www.myfaces.org or myfaces.apache.org)
> user discussion list.  I'm new to JSF (still reading Core Java Server 
> Faces)
> but here is my GUESS:
>
> Your error suggests you are going to login.jsp.  With an error message 
> about
> a faces context, that suggests you went DIRECTLY to that JSP instead of
> invoking it as a faces mapping (/*.faces).  Do you have f:view and other
> such Java Server Faces tags in your login.jsp?  ARE you actually trying to
> access it as /login.jsp instead of /login.faces?  If so, shame on you.  If
> you don't access it as /login.faces, the faces Context is never going to 
> be
> setup for that request.  With that problem, I would expect an error 
> message
> like the one you described below.
>
> Again, I'm new to faces so don't hold me to it, but it DOES make sense 
> from
> the stack trace you included.
>
> Regards,
> David
>
> -----Original Message-----
> From: Saul Qunming Yuan [mailto:yuan@dataanvil.com]
> Sent: Thursday, March 24, 2005 11:24 PM
> To: 'Struts Users Mailing List'
> Subject: [OT] Strange JSF error
>
>
> Hi,
>
> Sorry for this OT question, but below is a Web app that use JSF and 
> MyFaces
> and deployed to JBoss, I got the following strange error, I googled "No
> faces context", but didn't find a single resource on that. I know many 
> users
> in this list also use JSF as well, hence posting my question here.
>
> Any ideas are appreciated.
>
> thanks,
>
> Saul
>
>
> HTTP Status 500 -
>
> ----------------------------------------------------------------------------
> ----
>
> type Exception report
>
> message
>
> description The server encountered an internal error () that prevented it
> from fulfilling this request.
>
> exception
>
> javax.servlet.ServletException: No faces context?!
> org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContext
> Impl.java:825)
> org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextIm
> pl.java:758)
> org.apache.jsp.login_jsp._jspService(login_jsp.java:101)
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:
> 324)
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
> org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.j
> ava:75)
>
> root cause
>
> javax.servlet.jsp.JspException: No faces context?!
> net.sourceforge.myfaces.taglib.core.LoadBundleTag.doStartTag(LoadBundleTag.
> java:88)
> org.apache.jsp.login_jsp._jspx_meth_f_loadBundle_0(login_jsp.java:118)
> org.apache.jsp.login_jsp._jspService(login_jsp.java:88)
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:
> 324)
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
> org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.j
> ava:75)
>
> note The full stack trace of the root cause is available in the Apache
> Tomcat/5.0.28 logs.
>
>
> ----------------------------------------------------------------------------
> ----
>
> Apache Tomcat/5.0.28
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: [OT] Strange JSF error

Posted by "David G. Friedman" <hu...@ix.netcom.com>.
Saul,

I recommend you search the MyFaces (www.myfaces.org or myfaces.apache.org)
user discussion list.  I'm new to JSF (still reading Core Java Server Faces)
but here is my GUESS:

Your error suggests you are going to login.jsp.  With an error message about
a faces context, that suggests you went DIRECTLY to that JSP instead of
invoking it as a faces mapping (/*.faces).  Do you have f:view and other
such Java Server Faces tags in your login.jsp?  ARE you actually trying to
access it as /login.jsp instead of /login.faces?  If so, shame on you.  If
you don't access it as /login.faces, the faces Context is never going to be
setup for that request.  With that problem, I would expect an error message
like the one you described below.

Again, I'm new to faces so don't hold me to it, but it DOES make sense from
the stack trace you included.

Regards,
David

-----Original Message-----
From: Saul Qunming Yuan [mailto:yuan@dataanvil.com]
Sent: Thursday, March 24, 2005 11:24 PM
To: 'Struts Users Mailing List'
Subject: [OT] Strange JSF error


 Hi,

Sorry for this OT question, but below is a Web app that use JSF and MyFaces
and deployed to JBoss, I got the following strange error, I googled "No
faces context", but didn't find a single resource on that. I know many users
in this list also use JSF as well, hence posting my question here.

Any ideas are appreciated.

thanks,

Saul


HTTP Status 500 -

----------------------------------------------------------------------------
----

type Exception report

message

description The server encountered an internal error () that prevented it
from fulfilling this request.

exception

javax.servlet.ServletException: No faces context?!
	org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContext
Impl.java:825)
	org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextIm
pl.java:758)
	org.apache.jsp.login_jsp._jspService(login_jsp.java:101)
	org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:
324)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
	org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.j
ava:75)

root cause

javax.servlet.jsp.JspException: No faces context?!
	net.sourceforge.myfaces.taglib.core.LoadBundleTag.doStartTag(LoadBundleTag.
java:88)
	org.apache.jsp.login_jsp._jspx_meth_f_loadBundle_0(login_jsp.java:118)
	org.apache.jsp.login_jsp._jspService(login_jsp.java:88)
	org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:
324)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
	org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.j
ava:75)

note The full stack trace of the root cause is available in the Apache
Tomcat/5.0.28 logs.


----------------------------------------------------------------------------
----

Apache Tomcat/5.0.28


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org