|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
Problem with NullPointerException using layoutsI am getting an exception when I try to use a layout. I have do clue why.
I am attaching all the pieces maybe somebody can see something obvious that I can't The exception I get is in exception.txt, the file layout/main.jsp is main.jsp and dashboard.jsp is the file my ActionBean is forwarding to.
I'm using striped 1.5 with hibernate, stripes-security and stripes-persist (as you can probably tell from the web.xml). This is pretty much my first app beyond hello world, and I'm sort of jumping in at the deep end.
Alex
<?xml version="1.0" encoding="UTF-8"?> <web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5"> <filter> <description> Provides essential configuration and request processing services for the Stripes framework. </description> <display-name>Stripes Security Filter</display-name> <filter-name>StripesSecurityFilter</filter-name> <filter-class>net.sourceforge.stripes.security.controller.StripesSecurityFilter</filter-class> <init-param> <!-- Set the name of the security manager you provide to the framework. This class must implement StripesSecurityManager. --> <param-name>SecurityManager.Class</param-name> <param-value>com.tmdworldwide.projectmanager.security.SecurityManager</param-value> </init-param> <init-param> <!-- Set the page that gets forwarded to after a user has been deemed unauthorized --> <param-name>UnauthorizedResolutionURL</param-name> <param-value>some unauthorized page to forward to</param-value> </init-param> <init-param> <param-name>Extension.Packages</param-name> <param-value> org.stripesstuff.stripersist </param-value> </init-param> <init-param> <param-name>ActionResolver.Packages</param-name> <param-value>com.tmdworldwide.projectmanager.web</param-value> </init-param> </filter> <servlet> <servlet-name>DispatcherServlet</servlet-name> <servlet-class> net.sourceforge.stripes.controller.DispatcherServlet </servlet-class> <load-on-startup>1</load-on-startup> </servlet> <filter-mapping> <filter-name>StripesSecurityFilter</filter-name> <servlet-name>DispatcherServlet</servlet-name> <dispatcher>REQUEST</dispatcher> <dispatcher>FORWARD</dispatcher> </filter-mapping> <servlet-mapping> <servlet-name>DispatcherServlet</servlet-name> <url-pattern>*.action</url-pattern> </servlet-mapping> <welcome-file-list> <welcome-file>index.jsp</welcome-file> </welcome-file-list> </web-app> 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: An exception occurred processing JSP page /index.jsp at line 1 1: <jsp:forward page="Dashboard.action"/> Stacktrace: org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:505) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:398) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) root cause org.apache.jasper.JasperException: javax.servlet.ServletException: net.sourceforge.stripes.exception.StripesJspException: An exception was raised while invoking a layout. The layout used was 'layouts/main.jsp'. The following information was supplied to the render tag: LayoutContext{component names=[], parameters={}} org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:522) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:398) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) net.sourceforge.stripes.action.ForwardResolution.execute(ForwardResolution.java:110) net.sourceforge.stripes.controller.DispatcherHelper$7.intercept(DispatcherHelper.java:483) net.sourceforge.stripes.controller.ExecutionContext.proceed(ExecutionContext.java:158) net.sourceforge.stripes.controller.HttpCacheInterceptor.intercept(HttpCacheInterceptor.java:99) net.sourceforge.stripes.controller.ExecutionContext.proceed(ExecutionContext.java:155) net.sourceforge.stripes.controller.BeforeAfterMethodInterceptor.intercept(BeforeAfterMethodInterceptor.java:113) net.sourceforge.stripes.controller.ExecutionContext.proceed(ExecutionContext.java:155) net.sourceforge.stripes.controller.ExecutionContext.wrap(ExecutionContext.java:74) net.sourceforge.stripes.controller.DispatcherHelper.executeResolution(DispatcherHelper.java:477) net.sourceforge.stripes.controller.DispatcherServlet.executeResolution(DispatcherServlet.java:293) net.sourceforge.stripes.controller.DispatcherServlet.doPost(DispatcherServlet.java:177) net.sourceforge.stripes.controller.DispatcherServlet.doGet(DispatcherServlet.java:67) javax.servlet.http.HttpServlet.service(HttpServlet.java:690) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) net.sourceforge.stripes.controller.StripesFilter.doFilter(StripesFilter.java:246) org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:694) org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:665) org.apache.jsp.index_jsp._jspService(index_jsp.java:54) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) root cause javax.servlet.ServletException: net.sourceforge.stripes.exception.StripesJspException: An exception was raised while invoking a layout. The layout used was 'layouts/main.jsp'. The following information was supplied to the render tag: LayoutContext{component names=[], parameters={}} org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:846) org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:779) org.apache.jsp.WEB_002dINF.jsp.dashboard_jsp._jspService(dashboard_jsp.java:79) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) net.sourceforge.stripes.action.ForwardResolution.execute(ForwardResolution.java:110) net.sourceforge.stripes.controller.DispatcherHelper$7.intercept(DispatcherHelper.java:483) net.sourceforge.stripes.controller.ExecutionContext.proceed(ExecutionContext.java:158) net.sourceforge.stripes.controller.HttpCacheInterceptor.intercept(HttpCacheInterceptor.java:99) net.sourceforge.stripes.controller.ExecutionContext.proceed(ExecutionContext.java:155) net.sourceforge.stripes.controller.BeforeAfterMethodInterceptor.intercept(BeforeAfterMethodInterceptor.java:113) net.sourceforge.stripes.controller.ExecutionContext.proceed(ExecutionContext.java:155) net.sourceforge.stripes.controller.ExecutionContext.wrap(ExecutionContext.java:74) net.sourceforge.stripes.controller.DispatcherHelper.executeResolution(DispatcherHelper.java:477) net.sourceforge.stripes.controller.DispatcherServlet.executeResolution(DispatcherServlet.java:293) net.sourceforge.stripes.controller.DispatcherServlet.doPost(DispatcherServlet.java:177) net.sourceforge.stripes.controller.DispatcherServlet.doGet(DispatcherServlet.java:67) javax.servlet.http.HttpServlet.service(HttpServlet.java:690) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) net.sourceforge.stripes.controller.StripesFilter.doFilter(StripesFilter.java:246) org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:694) org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:665) org.apache.jsp.index_jsp._jspService(index_jsp.java:54) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) root cause org.apache.jasper.JasperException: An exception occurred processing JSP page /WEB-INF/jsp/layouts/main.jsp at line 7 4: <%@ taglib prefix="sql" uri="http://java.sun.com/jsp/jstl/sql" %> 5: <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> 6: 7: <s:layout-definition> 8: Foo 9: <%-- 10: <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> Stacktrace: org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:505) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:416) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:968) org.apache.jasper.runtime.PageContextImpl.doInclude(PageContextImpl.java:638) org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:632) net.sourceforge.stripes.tag.layout.LayoutRenderTag.doEndTag(LayoutRenderTag.java:113) org.apache.jsp.WEB_002dINF.jsp.dashboard_jsp._jspx_meth_s_005flayout_002drender_005f0(dashboard_jsp.java:115) org.apache.jsp.WEB_002dINF.jsp.dashboard_jsp._jspService(dashboard_jsp.java:71) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) net.sourceforge.stripes.action.ForwardResolution.execute(ForwardResolution.java:110) net.sourceforge.stripes.controller.DispatcherHelper$7.intercept(DispatcherHelper.java:483) net.sourceforge.stripes.controller.ExecutionContext.proceed(ExecutionContext.java:158) net.sourceforge.stripes.controller.HttpCacheInterceptor.intercept(HttpCacheInterceptor.java:99) net.sourceforge.stripes.controller.ExecutionContext.proceed(ExecutionContext.java:155) net.sourceforge.stripes.controller.BeforeAfterMethodInterceptor.intercept(BeforeAfterMethodInterceptor.java:113) net.sourceforge.stripes.controller.ExecutionContext.proceed(ExecutionContext.java:155) net.sourceforge.stripes.controller.ExecutionContext.wrap(ExecutionContext.java:74) net.sourceforge.stripes.controller.DispatcherHelper.executeResolution(DispatcherHelper.java:477) net.sourceforge.stripes.controller.DispatcherServlet.executeResolution(DispatcherServlet.java:293) net.sourceforge.stripes.controller.DispatcherServlet.doPost(DispatcherServlet.java:177) net.sourceforge.stripes.controller.DispatcherServlet.doGet(DispatcherServlet.java:67) javax.servlet.http.HttpServlet.service(HttpServlet.java:690) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) net.sourceforge.stripes.controller.StripesFilter.doFilter(StripesFilter.java:246) org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:694) org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:665) org.apache.jsp.index_jsp._jspService(index_jsp.java:54) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) root cause java.lang.NullPointerException net.sourceforge.stripes.tag.layout.LayoutDefinitionTag.doStartTag(LayoutDefinitionTag.java:72) org.apache.jsp.WEB_002dINF.jsp.layouts.main_jsp._jspx_meth_s_005flayout_002ddefinition_005f0(main_jsp.java:97) org.apache.jsp.WEB_002dINF.jsp.layouts.main_jsp._jspService(main_jsp.java:74) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:968) org.apache.jasper.runtime.PageContextImpl.doInclude(PageContextImpl.java:638) org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:632) net.sourceforge.stripes.tag.layout.LayoutRenderTag.doEndTag(LayoutRenderTag.java:113) org.apache.jsp.WEB_002dINF.jsp.dashboard_jsp._jspx_meth_s_005flayout_002drender_005f0(dashboard_jsp.java:115) org.apache.jsp.WEB_002dINF.jsp.dashboard_jsp._jspService(dashboard_jsp.java:71) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) net.sourceforge.stripes.action.ForwardResolution.execute(ForwardResolution.java:110) net.sourceforge.stripes.controller.DispatcherHelper$7.intercept(DispatcherHelper.java:483) net.sourceforge.stripes.controller.ExecutionContext.proceed(ExecutionContext.java:158) net.sourceforge.stripes.controller.HttpCacheInterceptor.intercept(HttpCacheInterceptor.java:99) net.sourceforge.stripes.controller.ExecutionContext.proceed(ExecutionContext.java:155) net.sourceforge.stripes.controller.BeforeAfterMethodInterceptor.intercept(BeforeAfterMethodInterceptor.java:113) net.sourceforge.stripes.controller.ExecutionContext.proceed(ExecutionContext.java:155) net.sourceforge.stripes.controller.ExecutionContext.wrap(ExecutionContext.java:74) net.sourceforge.stripes.controller.DispatcherHelper.executeResolution(DispatcherHelper.java:477) net.sourceforge.stripes.controller.DispatcherServlet.executeResolution(DispatcherServlet.java:293) net.sourceforge.stripes.controller.DispatcherServlet.doPost(DispatcherServlet.java:177) net.sourceforge.stripes.controller.DispatcherServlet.doGet(DispatcherServlet.java:67) javax.servlet.http.HttpServlet.service(HttpServlet.java:690) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) net.sourceforge.stripes.controller.StripesFilter.doFilter(StripesFilter.java:246) org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:694) org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:665) org.apache.jsp.index_jsp._jspService(index_jsp.java:54) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) note The full stack trace of the root cause is available in the Apache Tomcat/6.0.16 logs. Apache Tomcat/6.0.16 ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Stripes-users mailing list Stripes-users@... https://lists.sourceforge.net/lists/listinfo/stripes-users |
|
|
Re: Problem with NullPointerException using layoutsHi Alex,
Try using absolute paths, i.e. paths that start with a / in your name= attributes of the <s:layout-render> tag. If that doesn't help, could you post what's in site_settings.jsp? Cheers, Freddy http://www.stripesbook.com On Sat, 1 Nov 2008 20:42:55 -0400, "Alex Turner" <armtuk@...> said: > I am getting an exception when I try to use a layout. I have do clue > why. > I am attaching all the pieces maybe somebody can see something obvious > that > I can't > > The exception I get is in exception.txt, the file layout/main.jsp is > main.jsp and dashboard.jsp is the file my ActionBean is forwarding to. > > I'm using striped 1.5 with hibernate, stripes-security and > stripes-persist > (as you can probably tell from the web.xml). > > This is pretty much my first app beyond hello world, and I'm sort of > jumping > in at the deep end. > > Alex ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Stripes-users mailing list Stripes-users@... https://lists.sourceforge.net/lists/listinfo/stripes-users |
|
|
Re: Problem with NullPointerException using layoutsHoly Crap - that worked!!!
Thank you!! Alex
On Sat, Nov 1, 2008 at 9:27 PM, <xf2697@...> wrote: Hi Alex, ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Stripes-users mailing list Stripes-users@... https://lists.sourceforge.net/lists/listinfo/stripes-users |
|
|
Re: Problem with NullPointerException using layoutsHehe, happy to help :-)
On Sat, 1 Nov 2008 21:51:44 -0400, "Alex Turner" <armtuk@...> said: > Holy Crap - that worked!!! > Thank you!! > > Alex > > On Sat, Nov 1, 2008 at 9:27 PM, <xf2697@...> wrote: > > > Hi Alex, > > > > Try using absolute paths, i.e. paths that start with a / in your > > name= attributes of the <s:layout-render> tag. > > > > If that doesn't help, could you post what's in site_settings.jsp? > > > > Cheers, > > Freddy > > http://www.stripesbook.com > > > > On Sat, 1 Nov 2008 20:42:55 -0400, "Alex Turner" <armtuk@...> > > said: > > > I am getting an exception when I try to use a layout. I have do clue > > > why. > > > I am attaching all the pieces maybe somebody can see something obvious > > > that > > > I can't > > > > > > The exception I get is in exception.txt, the file layout/main.jsp is > > > main.jsp and dashboard.jsp is the file my ActionBean is forwarding to. > > > > > > I'm using striped 1.5 with hibernate, stripes-security and > > > stripes-persist > > > (as you can probably tell from the web.xml). > > > > > > This is pretty much my first app beyond hello world, and I'm sort of > > > jumping > > > in at the deep end. > > > > > > Alex > > > > ------------------------------------------------------------------------- > > This SF.Net email is sponsored by the Moblin Your Move Developer's > > challenge > > Build the coolest Linux based applications with Moblin SDK & win great > > prizes > > Grand prize is a trip for two to an Open Source event anywhere in the world > > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > > _______________________________________________ > > Stripes-users mailing list > > Stripes-users@... > > https://lists.sourceforge.net/lists/listinfo/stripes-users > > ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Stripes-users mailing list Stripes-users@... https://lists.sourceforge.net/lists/listinfo/stripes-users |
| Free embeddable forum powered by Nabble | Forum Help |