org.apache.jasper.JasperException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • We notice that exceptions happen when rendering the view from a jsp page in jetty can not be handled with a custom error page: We defined a SimpleMappingExceptionResolver and it is working great for every exception thrown in our controllers. However in case we have a error (e.g. JasperException)in one of our view jsp pages jetty shows the jetty 500 error page. E.g. a compile error in the jps page or having a Long.parse("string") To show a senseful error page in that case as well we configured a <error-page> within our web.xml. However this is ignored for all jsp pages we use as view within the InternalResourceView but works for all jsp pages that are handled as "normal"/"standalone" jsps by jetty before the dispatcher servlet. Exception in case the error page is ignored: PWC6197: An error occurred at line: 16 in the jsp file: /WEB-INF/jsp/projects/project_listing.jsp PWC6199: Generated servlet error: Invalid character constant at org.apache.jasper.compiler.DefaultErrorHandler.jav acError(DefaultErrorHandler.java:94) at org.apache.jasper.compiler.ErrorDispatcher.javacEr ror(ErrorDispatcher.java:384) at org.apache.jasper.compiler.JDTCompiler.generateCla ss(JDTCompiler.java:409) at org.apache.jasper.compiler.Compiler.compile(Compil er.java:622) at org.apache.jasper.compiler.Compiler.compile(Compil er.java:602) at org.apache.jasper.JspCompilationContext.compile(Js pCompilationContext.java:618) at org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:329) at org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:440) at org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:335) at javax.servlet.http.HttpServlet.service(HttpServlet .java:802) at org.mortbay.jetty.servlet.ServletHolder.handle(Ser vletHolder.java:445) at org.mortbay.jetty.servlet.ServletHandler.handle(Se rvletHandler.java:356) at org.mortbay.jetty.servlet.SessionHandler.handle(Se ssionHandler.java:226) at org.mortbay.jetty.handler.ContextHandler.handle(Co ntextHandler.java:627) at org.mortbay.jetty.servlet.Dispatcher.forward(Dispa tcher.java:266) at org.mortbay.jetty.servlet.Dispatcher.forward(Dispa tcher.java:126) at org.springframework.web.servlet.view.InternalResou rceView.renderMergedOutputModel(InternalResourceVi ew.java:112) at org.springframework.web.servlet.view.AbstractView. render(AbstractView.java:249) at org.springframework.web.servlet.DispatcherServlet. render(DispatcherServlet.java:1063) at org.springframework.web.servlet.DispatcherServlet. doDispatch(DispatcherServlet.java:827) at org.springframework.web.servlet.DispatcherServlet. doService(DispatcherServlet.java:736) at org.springframework.web.servlet.FrameworkServlet.p rocessRequest(FrameworkServlet.java:396) at org.springframework.web.servlet.FrameworkServlet.d oGet(FrameworkServlet.java:350) at javax.servlet.http.HttpServlet.service(HttpServlet .java:689) at javax.servlet.http.HttpServlet.service(HttpServlet .java:802) at org.mortbay.jetty.servlet.ServletHolder.handle(Ser vletHolder.java:445) at org.mortbay.jetty.servlet.ServletHandler$CachedCha in.doFilter(ServletHandler.java:1050) at net.101tec.hub.webapp.HibernateFilter.doFilter(Hib ernateFilter.java:41) at org.mortbay.jetty.servlet.ServletHandler$CachedCha in.doFilter(ServletHandler.java:1041) at net.101tec.hub.webapp.InstallationFilter.doFilter( InstallationFilter.java:49) at org.mortbay.jetty.servlet.ServletHandler$CachedCha in.doFilter(ServletHandler.java:1041) at org.mortbay.jetty.servlet.ServletHandler.handle(Se rvletHandler.java:354) at org.mortbay.jetty.servlet.SessionHandler.handle(Se ssionHandler.java:226) at org.mortbay.jetty.handler.ContextHandler.handle(Co ntextHandler.java:627) at org.mortbay.jetty.handler.ContextHandlerCollection .handle(ContextHandlerCollection.java:149) at org.mortbay.jetty.handler.HandlerCollection.handle (HandlerCollection.java:123) at org.mortbay.jetty.handler.HandlerWrapper.handle(Ha ndlerWrapper.java:141) at org.mortbay.jetty.Server.handle(Server.java:269) at org.mortbay.jetty.HttpConnection.handleRequest(Htt pConnection.java:430) at org.mortbay.jetty.HttpConnection$RequestHandler.he aderComplete(HttpConnection.java:687) at org.mortbay.jetty.HttpParser.parseNext(HttpParser. java:492) at org.mortbay.jetty.HttpParser.parseAvailable(HttpPa rser.java:199) at org.mortbay.jetty.HttpConnection.handle(HttpConnec tion.java:339) at org.mortbay.jetty.nio.HttpChannelEndPoint.run(Http ChannelEndPoint.java:270) at org.mortbay.thread.BoundedThreadPool$PoolThread.ru n(BoundedThreadPool.java:475) Exception in case the error page is shown: org.apache.jasper.JasperException: PWC6033: Unable to compile class for JSP PWC6197: An error occurred at line: 7 in the jsp file: /testError.jsp PWC6199: Generated servlet error: The method parse(String) is undefined for the type Long at org.apache.jasper.compiler.DefaultErrorHandler.jav acError(DefaultErrorHandler.java:94) at org.apache.jasper.compiler.ErrorDispatcher.javacEr ror(ErrorDispatcher.java:384) at org.apache.jasper.compiler.JDTCompiler.generateCla ss(JDTCompiler.java:409) at org.apache.jasper.compiler.Compiler.compile(Compil er.java:622) at org.apache.jasper.compiler.Compiler.compile(Compil er.java:602) at org.apache.jasper.JspCompilationContext.compile(Js pCompilationContext.java:618) at org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:329) at org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:440) at org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:335) at javax.servlet.http.HttpServlet.service(HttpServlet .java:802) at org.mortbay.jetty.servlet.ServletHolder.handle(Ser vletHolder.java:445) at org.mortbay.jetty.servlet.ServletHandler.handle(Se rvletHandler.java:356) at org.mortbay.jetty.servlet.SessionHandler.handle(Se ssionHandler.java:226) at org.mortbay.jetty.handler.ContextHandler.handle(Co ntextHandler.java:627) at org.mortbay.jetty.handler.ContextHandlerCollection .handle(ContextHandlerCollection.java:149) at org.mortbay.jetty.handler.HandlerCollection.handle (HandlerCollection.java:123) at org.mortbay.jetty.handler.HandlerWrapper.handle(Ha ndlerWrapper.java:141) at org.mortbay.jetty.Server.handle(Server.java:269) at org.mortbay.jetty.HttpConnection.handleRequest(Htt pConnection.java:430) at org.mortbay.jetty.HttpConnection$RequestHandler.he aderComplete(HttpConnection.java:687) at org.mortbay.jetty.HttpParser.parseNext(HttpParser. java:492) at org.mortbay.jetty.HttpParser.parseAvailable(HttpPa rser.java:199) at org.mortbay.jetty.HttpConnection.handle(HttpConnec tion.java:339) at org.mortbay.jetty.nio.HttpChannelEndPoint.run(Http ChannelEndPoint.java:270) at org.mortbay.thread.BoundedThreadPool$PoolThread.ru n(BoundedThreadPool.java:475) 2007-04-20 15:35:17.734::WARN: /testError.jsp org.apache.jasper.JasperException: PWC6033: Unable to compile class for JSP
    via by Stefan Groschupf,
  • We notice that exceptions happen when rendering the view from a jsp page in jetty can not be handled with a custom error page: We defined a SimpleMappingExceptionResolver and it is working great for every exception thrown in our controllers. However in case we have a error (e.g. JasperException)in one of our view jsp pages jetty shows the jetty 500 error page. E.g. a compile error in the jps page or having a Long.parse("string") To show a senseful error page in that case as well we configured a <error-page> within our web.xml. However this is ignored for all jsp pages we use as view within the InternalResourceView but works for all jsp pages that are handled as "normal"/"standalone" jsps by jetty before the dispatcher servlet. Exception in case the error page is ignored: PWC6197: An error occurred at line: 16 in the jsp file: /WEB-INF/jsp/projects/project_listing.jsp PWC6199: Generated servlet error: Invalid character constant at org.apache.jasper.compiler.DefaultErrorHandler.jav acError(DefaultErrorHandler.java:94) at org.apache.jasper.compiler.ErrorDispatcher.javacEr ror(ErrorDispatcher.java:384) at org.apache.jasper.compiler.JDTCompiler.generateCla ss(JDTCompiler.java:409) at org.apache.jasper.compiler.Compiler.compile(Compil er.java:622) at org.apache.jasper.compiler.Compiler.compile(Compil er.java:602) at org.apache.jasper.JspCompilationContext.compile(Js pCompilationContext.java:618) at org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:329) at org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:440) at org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:335) at javax.servlet.http.HttpServlet.service(HttpServlet .java:802) at org.mortbay.jetty.servlet.ServletHolder.handle(Ser vletHolder.java:445) at org.mortbay.jetty.servlet.ServletHandler.handle(Se rvletHandler.java:356) at org.mortbay.jetty.servlet.SessionHandler.handle(Se ssionHandler.java:226) at org.mortbay.jetty.handler.ContextHandler.handle(Co ntextHandler.java:627) at org.mortbay.jetty.servlet.Dispatcher.forward(Dispa tcher.java:266) at org.mortbay.jetty.servlet.Dispatcher.forward(Dispa tcher.java:126) at org.springframework.web.servlet.view.InternalResou rceView.renderMergedOutputModel(InternalResourceVi ew.java:112) at org.springframework.web.servlet.view.AbstractView. render(AbstractView.java:249) at org.springframework.web.servlet.DispatcherServlet. render(DispatcherServlet.java:1063) at org.springframework.web.servlet.DispatcherServlet. doDispatch(DispatcherServlet.java:827) at org.springframework.web.servlet.DispatcherServlet. doService(DispatcherServlet.java:736) at org.springframework.web.servlet.FrameworkServlet.p rocessRequest(FrameworkServlet.java:396) at org.springframework.web.servlet.FrameworkServlet.d oGet(FrameworkServlet.java:350) at javax.servlet.http.HttpServlet.service(HttpServlet .java:689) at javax.servlet.http.HttpServlet.service(HttpServlet .java:802) at org.mortbay.jetty.servlet.ServletHolder.handle(Ser vletHolder.java:445) at org.mortbay.jetty.servlet.ServletHandler$CachedCha in.doFilter(ServletHandler.java:1050) at net.101tec.hub.webapp.HibernateFilter.doFilter(Hib ernateFilter.java:41) at org.mortbay.jetty.servlet.ServletHandler$CachedCha in.doFilter(ServletHandler.java:1041) at net.101tec.hub.webapp.InstallationFilter.doFilter( InstallationFilter.java:49) at org.mortbay.jetty.servlet.ServletHandler$CachedCha in.doFilter(ServletHandler.java:1041) at org.mortbay.jetty.servlet.ServletHandler.handle(Se rvletHandler.java:354) at org.mortbay.jetty.servlet.SessionHandler.handle(Se ssionHandler.java:226) at org.mortbay.jetty.handler.ContextHandler.handle(Co ntextHandler.java:627) at org.mortbay.jetty.handler.ContextHandlerCollection .handle(ContextHandlerCollection.java:149) at org.mortbay.jetty.handler.HandlerCollection.handle (HandlerCollection.java:123) at org.mortbay.jetty.handler.HandlerWrapper.handle(Ha ndlerWrapper.java:141) at org.mortbay.jetty.Server.handle(Server.java:269) at org.mortbay.jetty.HttpConnection.handleRequest(Htt pConnection.java:430) at org.mortbay.jetty.HttpConnection$RequestHandler.he aderComplete(HttpConnection.java:687) at org.mortbay.jetty.HttpParser.parseNext(HttpParser. java:492) at org.mortbay.jetty.HttpParser.parseAvailable(HttpPa rser.java:199) at org.mortbay.jetty.HttpConnection.handle(HttpConnec tion.java:339) at org.mortbay.jetty.nio.HttpChannelEndPoint.run(Http ChannelEndPoint.java:270) at org.mortbay.thread.BoundedThreadPool$PoolThread.ru n(BoundedThreadPool.java:475) Exception in case the error page is shown: org.apache.jasper.JasperException: PWC6033: Unable to compile class for JSP PWC6197: An error occurred at line: 7 in the jsp file: /testError.jsp PWC6199: Generated servlet error: The method parse(String) is undefined for the type Long at org.apache.jasper.compiler.DefaultErrorHandler.jav acError(DefaultErrorHandler.java:94) at org.apache.jasper.compiler.ErrorDispatcher.javacEr ror(ErrorDispatcher.java:384) at org.apache.jasper.compiler.JDTCompiler.generateCla ss(JDTCompiler.java:409) at org.apache.jasper.compiler.Compiler.compile(Compil er.java:622) at org.apache.jasper.compiler.Compiler.compile(Compil er.java:602) at org.apache.jasper.JspCompilationContext.compile(Js pCompilationContext.java:618) at org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:329) at org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:440) at org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:335) at javax.servlet.http.HttpServlet.service(HttpServlet .java:802) at org.mortbay.jetty.servlet.ServletHolder.handle(Ser vletHolder.java:445) at org.mortbay.jetty.servlet.ServletHandler.handle(Se rvletHandler.java:356) at org.mortbay.jetty.servlet.SessionHandler.handle(Se ssionHandler.java:226) at org.mortbay.jetty.handler.ContextHandler.handle(Co ntextHandler.java:627) at org.mortbay.jetty.handler.ContextHandlerCollection .handle(ContextHandlerCollection.java:149) at org.mortbay.jetty.handler.HandlerCollection.handle (HandlerCollection.java:123) at org.mortbay.jetty.handler.HandlerWrapper.handle(Ha ndlerWrapper.java:141) at org.mortbay.jetty.Server.handle(Server.java:269) at org.mortbay.jetty.HttpConnection.handleRequest(Htt pConnection.java:430) at org.mortbay.jetty.HttpConnection$RequestHandler.he aderComplete(HttpConnection.java:687) at org.mortbay.jetty.HttpParser.parseNext(HttpParser. java:492) at org.mortbay.jetty.HttpParser.parseAvailable(HttpPa rser.java:199) at org.mortbay.jetty.HttpConnection.handle(HttpConnec tion.java:339) at org.mortbay.jetty.nio.HttpChannelEndPoint.run(Http ChannelEndPoint.java:270) at org.mortbay.thread.BoundedThreadPool$PoolThread.ru n(BoundedThreadPool.java:475) 2007-04-20 15:35:17.734::WARN: /testError.jsp org.apache.jasper.JasperException: PWC6033: Unable to compile class for JSP
    via by Stefan Groschupf,
    • org.apache.jasper.JasperException: PWC6033: Unable to compile class for JSP PWC6197: An error occurred at line: 7 in the jsp file: /testError.jsp PWC6199: Generated servlet error: The method parse(String) is undefined for the type Long at org.apache.jasper.compiler.DefaultErrorHandler.jav acError(DefaultErrorHandler.java:94) at org.apache.jasper.compiler.ErrorDispatcher.javacEr ror(ErrorDispatcher.java:384) at org.apache.jasper.compiler.JDTCompiler.generateCla ss(JDTCompiler.java:409) at org.apache.jasper.compiler.Compiler.compile(Compil er.java:622) at org.apache.jasper.compiler.Compiler.compile(Compil er.java:602) at org.apache.jasper.JspCompilationContext.compile(Js pCompilationContext.java:618) at org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:329) at org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:440) at org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:335) at javax.servlet.http.HttpServlet.service(HttpServlet .java:802) at org.mortbay.jetty.servlet.ServletHolder.handle(Ser vletHolder.java:445) at org.mortbay.jetty.servlet.ServletHandler.handle(Se rvletHandler.java:356) at org.mortbay.jetty.servlet.SessionHandler.handle(Se ssionHandler.java:226) at org.mortbay.jetty.handler.ContextHandler.handle(Co ntextHandler.java:627) at org.mortbay.jetty.handler.ContextHandlerCollection .handle(ContextHandlerCollection.java:149) at org.mortbay.jetty.handler.HandlerCollection.handle (HandlerCollection.java:123) at org.mortbay.jetty.handler.HandlerWrapper.handle(Ha ndlerWrapper.java:141) at org.mortbay.jetty.Server.handle(Server.java:269)
    No Bugmate found.