Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] org.apache.jasper.JasperException: java.lang.ClassCastException: org.apache.jasper.runtime.ELContextImpl cannot be cast to org.apache.jasper.runtime.ELContextImpl

Jan,
Thank you for the reply.
I removed both the JSP related jar files from the web-inf\lib:
javax.servlet.jsp-2.3.2.jar
jetty-jsp-jdt-2.3.3.jar

I get the following error when I run with -Dorg.apache.jasper.compiler.disablejsr199=true :
org.apache.jasper.JasperException: PWC6349: Cannot find a java compiler for compilation.  If running with JDK 5 or
 before, Ant or JDT compiler can be used, if the corresponding jars and bridge classes (org.apache.jasper.compiler.AntJavaCompiler or org.apache.jasper.compiler.JDTJavaCompiler) are included
	at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:92)
	at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:378)
	at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:119)
	at org.apache.jasper.compiler.Compiler.initJavaCompiler(Compiler.java:773)
	at org.apache.jasper.compiler.Compiler.<init>(Compiler.java:140)
	at org.apache.jasper.JspCompilationContext.createCompiler(JspCompilationContext.java:288)
	at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:622)
	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:473)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:377)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:696)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:526)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:586)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:221)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1110)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:453)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:183)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1044)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
	at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:261)
	at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:101)

I get the following error WITHOUT this setting -Dorg.apache.jasper.compiler.disablejsr199=true :
org.apache.jasper.JasperException: PWC6345: There is an error in invoking javac.  A full JDK (not just JRE) is required
	at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:92)
	at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:378)
	at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:119)
	at org.apache.jasper.compiler.Jsr199JavaCompiler.compile(Jsr199JavaCompiler.java:208)
	at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:384)
	at org.apache.jasper.compiler.Compiler.compile(Compiler.java:453)
	at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:625)
	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:473)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:377)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:696)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:526)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:586)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:221)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1110)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:453)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:183)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1044)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
	at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:261)
	at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:101)

Thank you.
David



On Monday, March 17, 2014 5:43 PM, Jan Bartel <janb@xxxxxxxxxxx> wrote:
David,

Remove the jsp-related jars from your webapp - they are provided by
the servlet container (in this case the jetty runner).

regards
Jan

On 18 March 2014 10:35, David L Gangarapu <davidlivingstone@xxxxxxxxx> wrote:
> Joakim,
> thank you for the reply...Here is the list of files in both war files:
> jetty-server-9.1.0.v20131115.jar
> jetty-util-9.1.0.v20131115.jar
> javax.servlet.jsp-2.3.2.jar
> jetty-jsp-jdt-2.3.3.jar
>
> Thank you.
>
> David
>
>
>
> On Monday, March 17, 2014 4:24 PM, Joakim Erdfelt <joakim@xxxxxxxxxxx>
> wrote:
> That specific error usually points to two or more standard EL jars (at
> different versions) present in your webapp.
> What are your WEB-INF/lib/*.jar files?
>
> --
> Joakim Erdfelt <joakim@xxxxxxxxxxx>
> webtide.com - intalio.com/jetty
> Expert advice, services and support from from the Jetty & CometD experts
> eclipse.org/jetty - cometd.org
>
>
> On Mon, Mar 17, 2014 at 4:21 PM, David L Gangarapu
> <davidlivingstone@xxxxxxxxx> wrote:
>
> Can someone please help me with the error ( see stack trace below ).
>
> I have two war files with different contexts and I am trying to run them
> using jetty runner.
> Each Individual war files get loaded and run well if I rum them
> separately...
> But when I combine them both, only one of them works and the 2nd context
> gives me these errors...
>
> I have these jars included in the war file:
>                <include name="jetty-server-9.1.0.v20131115.jar" />
>                <include name="jetty-util-9.1.0.v20131115.jar" />
>                <include name="javax.servlet.jsp-2.3.2.jar" />
>    <include name="jetty-jsp-jdt-2.3.3.jar" />
>
> I have this system property setting :
> -Dorg.apache.jasper.compiler.disablejsr199=true
>
>
> Thank you for your help.
>
> David
>
>
> org.apache.jasper.JasperException: java.lang.ClassCastException:
> org.apache.jasper.runtime.ELContextImpl cannot be cast to
> org.apache.jasper.runtime.ELContextImpl
>     at
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:440)
>     at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:473)
>     at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:377)
>     at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
>     at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:696)
>     at
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:526)
>     at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
>     at
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:586)
>     at
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:221)
>     at
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1110)
>     at
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:453)
>     at
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:183)
>     at
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1044)
>     at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
>     at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:261)
>     at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:101)
>
> ... MORE....
>
> Caused by: java.lang.ClassCastException:
> org.apache.jasper.runtime.ELContextImpl cannot be cast to
> org.apache.jasper.runtime.ELContextImpl
>     at
> org.apache.jasper.runtime.PageContextImpl.evaluateExpression(PageContextImpl.java:1009)
>     at
> org.apache.jsp.views.error_jsp._jspService(org.apache.jsp.views.error_jsp:52)
>     at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111)
>     at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
>     at
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:411)
>     ... 36 more
>
>
> Caused by:
>
> java.lang.ClassCastException: org.apache.jasper.runtime.ELContextImpl cannot
> be cast to org.apache.jasper.runtime.ELContextImpl
>     at
> org.apache.jasper.runtime.PageContextImpl.evaluateExpression(PageContextImpl.java:1009)
>     at
> org.apache.jsp.views.error_jsp._jspService(org.apache.jsp.views.error_jsp:52)
>     at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111)
>     at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
>     at
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:411)
>     at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:473)
>     at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:377)
>
>
>
> _______________________________________________
> jetty-users mailing list
> jetty-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/jetty-users
>
>
>
>
>
> _______________________________________________
> jetty-users mailing list
> jetty-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/jetty-users

>



--
Jan Bartel <janb@xxxxxxxxxxx>
www.webtide.com
'Expert Jetty/CometD developer,production,operations advice'




Back to the top