For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub
- This topic has 15 replies, 2 voices, and was last updated 19 years, 4 months ago by
Edward Tsai.
-
AuthorPosts
-
Edward TsaiMemberDear Sir,
I’m learning JSF using JSFLoginDemo from you step by step, but I encounter the following error message:
HTTP Status 500 –
——————————————————————————–
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:370)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:147)
com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)root cause
java.lang.NullPointerException
javax.faces.webapp.UIComponentTag.setupResponseWriter(UIComponentTag.java:615)
javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:217)
org.apache.myfaces.taglib.core.ViewTag.doStartTag(ViewTag.java:71)
org.apache.jsp.userLogin_jsp._jspx_meth_f_view_0(org.apache.jsp.userLogin_jsp:130)
org.apache.jsp.userLogin_jsp._jspService(org.apache.jsp.userLogin_jsp:105)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:147)
com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)note The full stack trace of the root cause is available in the Apache Tomcat/5.5 logs.
I use JBoss 4 with package archived deploy type.
Thanks for your help in advance.
Best,
Edward TsaiJune 15, 2006 at 12:02 am #253499
Riyad KallaMemberEdward,
What URL are you using to access your webpage? (The exact one from your browser)June 15, 2006 at 8:52 am #253508June 15, 2006 at 12:59 pm #253518
Riyad KallaMemberWe just recieved an email about this exact question this morning at our support@ address, was that you? (in which case the issue was resolved) or no?
June 15, 2006 at 7:34 pm #253531
Edward TsaiMemberI posted the URL I used yesterday. The problem is not solved yet.
June 15, 2006 at 8:52 pm #253532
Riyad KallaMemberCan you export your project to an archive and email it to suport@myeclipseide.com ATTN Riyad with a link to this forum so I know why I’m getting it, I’ll have a look.
June 18, 2006 at 3:00 am #253578
Edward TsaiMemberI’ve downloaded the sample project JSFLoginDemoProject and import into MyEclipse IDE and tried again, but got the same error message as above. Does this mean there should be something wrong in my MyEclipse environment? Please advise, thanks.
Edward Tsai
June 19, 2006 at 12:41 am #253592
Riyad KallaMemberEdward,
My guess is that there is something wrong with your Tomcat install. I would suggest doing a fresh install of TOmcat to a new directory to rule out any 3rd party libraries installed.June 20, 2006 at 12:44 pm #253678
Edward TsaiMemberI have reinstalled eclipse 3.1.2, and then reinstalled myeclipse 4.1.1, and then downloaded and reinstalled JBoss 4.0.4. And I tried to run JSFLoginDemo again, I got the similar error message as below:
HTTP Status 500 –
——————————————————————————–
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: Exception in JSP: /userLogin.jsp:11
8: <title>My JSF ‘userLogin.jsp’ starting page</title>
9: </head>
10: <body>
11: <f:view>
12: <f:loadBundle basename=”com.jsfdemo.MessageBundle” var=”bundle”/>
13:
14: <h:form id=”loginForm”>Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:504)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:147)
com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)root cause
java.lang.NullPointerException
javax.faces.webapp.UIComponentTag.setupResponseWriter(UIComponentTag.java:615)
javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:217)
org.apache.myfaces.taglib.core.ViewTag.doStartTag(ViewTag.java:71)
org.apache.jsp.userLogin_jsp._jspx_meth_f_view_0(userLogin_jsp.java:112)
org.apache.jsp.userLogin_jsp._jspService(userLogin_jsp.java:87)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:147)
com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)note The full stack trace of the root cause is available in the Apache Tomcat/5.5.17 logs.
——————————————————————————–
Apache Tomcat/5.5.1
Thanks for your help.
Best,
Edward TSaiJune 20, 2006 at 1:33 pm #253685
Riyad KallaMemberEdward,
In your web.xml file, what extension did you map the FacesServlet to? What URL are you using to access your JSP page? If f:view is throwing the exception my guess is that you are either trying to access the page using the .jsp extension in which case you are removing the FacesServlet from the process loop and f:view is dying because it cannot find the FacesContext or your setup is borked.June 21, 2006 at 12:32 am #253719
Edward TsaiMemberthe web.xml context is as below:
<?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” version=”2.4″ xsi:schemaLocation=”http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd”>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/faces-config.xml</param-value>
</init-param>
<init-param>
<param-name>debug</param-name>
<param-value>3</param-value>
</init-param>
<init-param>
<param-name>detail</param-name>
<param-value>3</param-value>
</init-param>
<load-on-startup>0</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.faces</url-pattern>
</servlet-mapping>
</web-app>The faces-config.xml content is as below:
<?xml version=”1.0″ encoding=”UTF-8″?>
<!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>
<navigation-rule>
<from-view-id>/userLogin.jsp</from-view-id>
<navigation-case>
<from-outcome>success</from-outcome>
<to-view-id>/userLoginSuccess.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>failure</from-outcome>
<to-view-id>/userLogin.jsp</to-view-id>
</navigation-case>
</navigation-rule>
<managed-bean>
<description>Bean used to handle all User-based operations.</description>
<managed-bean-name>UserBean</managed-bean-name>
<managed-bean-class>com.jsfdemo.bean.UserBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
</faces-config>and the URL I used is “http://localhost:8080/JSFLoginDemo/userLogin.faces”
Thanks for your great help again.
Best,
Edward TsaiJune 21, 2006 at 10:24 am #253750
Riyad KallaMemberEverything looks good. If you look in your Tomcat/lib, common/lib or server/lib directories, do you see any JSF JARs? There shouldn’t be any.
June 23, 2006 at 7:12 am #253844
Edward TsaiMemberDear Riyad,
I only found 2 JSF JARs under JBoss installation directory, which are jsf-impl.jar and jsf-api.jar in the following directory:
F:\jboss-4.0.4.GA\server\default\deploy\JSFLoginDemo.war\WEB-INF\libBest,
Edward TsaiJune 24, 2006 at 8:58 am #253873
Riyad KallaMemberStrange, all of that looks OK.
Can you export your project to a ZIP file and email it to me at support@genuitec.com ATTN Riyad with a link to this post so I know why I’m getting it?
July 24, 2006 at 10:54 am #255404
Riyad KallaMemberThis message has not been recovered.
-
AuthorPosts
