简体   繁体   English

GAE / J上的jsp错误500

[英]Error 500 with jsp on GAE/J

I have a weird error 500 with my JSPs on App Engine. 我在App Engine上的JSP出现奇怪的错误500。

It's weird because the error happens only with the 3 firsts requests of the jsp. 这很奇怪,因为错误在jsp的3个firsts请求中发生。

So I browse to the .jsp url, I reload 2-3 times, I have 2-3 errors 500, I hit reload again, it works. 因此,我浏览到.jsp网址,我重新加载了2-3次,我有2-3个错误500,再次点击重新加载,就可以了。

The test.jsp looks like this: test.jsp看起来像这样:

<% String s = "hello"; %><h2><% out.println(s); %></h2>

The fun thing is that my html files works, the async requests made by js are working too. 有趣的是,我的html文件有效,js发出的异步请求也有效。

I guess I have an made a mistake somewher in the config, but I can't find out. 我想我在配置中犯了一个错误,但是我找不到。

edit: 编辑:

I tried to empty the web.xml, the queue.xml and reset appengine-web.xml 我试图清空web.xml,queue.xml并重置appengine-web.xml

The error log is here on Pastebin: pastebin.com/TDZH4xj3 错误日志位于Pastebin上:pastebin.com/TDZH4xj3

I also disabled the always on option, and redeployed the app under a new name. 我还禁用了Always On选项,并以新名称重新部署了该应用程序。 Still the same error. 还是一样的错误。

2011-04-18 00:10:20.312 /test.jsp 500 3665ms 1820cpu_ms 0kb Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534.29 (KHTML, like Gecko) Chrome/12.0.733.0 Safari/534.29,gzip(gfe),gzip(gfe),gzip(gfe)
92.245.143.214 - - [18/Apr/2011:00:10:20 -0700] "GET /test.jsp HTTP/1.1" 500 0 - "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534.29 (KHTML, like Gecko) Chrome/12.0.733.0 Safari/534.29,gzip(gfe),gzip(gfe),gzip(gfe)" "www.planeteimmo.net" ms=3666 cpu_ms=1820 api_cpu_ms=0 cpm_usd=0.050630 loading_request=1



W 2011-04-18 00:10:20.297
Error for /test.jsp
java.lang.AbstractMethodError: javax.servlet.jsp.JspFactory.getJspApplicationContext(Ljavax/servlet/ServletContext;)Ljavax/servlet/jsp/JspApplicationContext;
    at org.apache.jsp.test_jsp._jspInit(test_jsp.java:22)
    at org.apache.jasper.runtime.HttpJspBase.init(HttpJspBase.java:76)
    at org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:440)
    at org.mortbay.jetty.servlet.ServletHolder.getServlet(ServletHolder.java:339)
    at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166)
    at com.google.apphosting.utils.servlet.ParseBlobUploadFilter.doFilter(ParseBlobUploadFilter.java:97)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
    at com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter(SaveSessionFilter.java:35)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
    at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:43)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
    at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
    at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
    at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
    at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
    at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
    at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle(AppVersionHandlerMap.java:238)
    at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
    at org.mortbay.jetty.Server.handle(Server.java:326)
    at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
    at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:923)
    at com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable(RpcRequestParser.java:76)
    at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
    at com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:135)
    at com.google.apphosting.runtime.JavaRuntime.handleRequest(JavaRuntime.java:261)
    at com.google.apphosting.base.RuntimePb$EvaluationRuntime$2.handleRequest(RuntimePb.java:9285)
    at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:437)
    at com.google.net.rpc.impl.Server$RpcTask.runInContext(Server.java:573)
    at com.google.tracing.TraceContext$TraceContextRunnable$1.run(TraceContext.java:448)
    at com.google.tracing.TraceContext.runInContext(TraceContext.java:688)
    at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:326)
    at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:318)
    at com.google.tracing.TraceContext$TraceContextRunnable.run(TraceContext.java:446)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    at java.lang.Thread.run(Thread.java:636)





C 2011-04-18 00:10:20.307
Uncaught exception from servlet
java.lang.AbstractMethodError: javax.servlet.jsp.JspFactory.getJspApplicationContext(Ljavax/servlet/ServletContext;)Ljavax/servlet/jsp/JspApplicationContext;
    at org.apache.jsp.test_jsp._jspInit(test_jsp.java:22)
    at org.apache.jasper.runtime.HttpJspBase.init(HttpJspBase.java:76)
    at org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:440)
    at org.mortbay.jetty.servlet.ServletHolder.getServlet(ServletHolder.java:339)
    at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166)
    at com.google.apphosting.utils.servlet.ParseBlobUploadFilter.doFilter(ParseBlobUploadFilter.java:97)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
    at com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter(SaveSessionFilter.java:35)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
    at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:43)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
    at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
    at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
    at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
    at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
    at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
    at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle(AppVersionHandlerMap.java:238)
    at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
    at org.mortbay.jetty.Server.handle(Server.java:326)
    at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
    at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:923)
    at com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable(RpcRequestParser.java:76)
    at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
    at com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:135)
    at com.google.apphosting.runtime.JavaRuntime.handleRequest(JavaRuntime.java:261)
    at com.google.apphosting.base.RuntimePb$EvaluationRuntime$2.handleRequest(RuntimePb.java:9285)
    at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:437)
    at com.google.net.rpc.impl.Server$RpcTask.runInContext(Server.java:573)
    at com.google.tracing.TraceContext$TraceContextRunnable$1.run(TraceContext.java:448)
    at com.google.tracing.TraceContext.runInContext(TraceContext.java:688)
    at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:326)
    at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:318)
    at com.google.tracing.TraceContext$TraceContextRunnable.run(TraceContext.java:446)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    at java.lang.Thread.run(Thread.java:636)

java.lang.AbstractMethodError: javax.servlet.jsp.JspFactory.getJspApplicationContext(Ljavax/servlet/ServletContext;)Ljavax/servlet/jsp/JspApplicationContext; java.lang.AbstractMethodError:javax.servlet.jsp.JspFactory.getJspApplicationContext(Ljavax / servlet / ServletContext;)Ljavax / servlet / jsp / JspApplicationContext;

You have servletcontainer specific libaries in the /WEB-INF/lib folder of your webapp which is conflicting with the libraries provided by the servletcontainer where the webapp runs. 您的webapp的/WEB-INF/lib文件夹中有servletcontainer特定的库,这与运行webapp的servletcontainer提供的库相冲突。 This can happen if you copied for example a jsp-api.jar from Apache Tomcat into the webapp's /WEB-INF/lib folder and run the webapp on a servletcontainer of a completely different make/version. 例如,如果您从Apache Tomcat复制了一个jsp-api.jar到webapp的/WEB-INF/lib文件夹中,并在完全不同的make / version的servlet容器上运行webapp,就可能发生这种情况。 In your particular case, one of the libs is of an older version which lacks the in the exception message mentioned method. 在您的特定情况下,其中一个库是较旧的版本,缺少在异常消息中提到的方法。

Get rid of them all in /WEB-INF/lib . /WEB-INF/lib摆脱它们。 They definitely don't belong there. 他们绝对不属于那里。 They ought to be supplied by the servletcontainer itself already. 它们应该已经由servlet容器本身提供了。 If you did this to circumvent compile errors (which is one of the more common reasons starters put them in the wrong place), then it needs to be solved differently. 如果您这样做是为了避免编译错误(这是入门人员将其放在错误位置的更常见原因之一),则需要以不同的方式解决。

This happened to me as well. 这也发生在我身上。 I had the gwt-dev.jar in the /WEB-INF/lib dir. 我在/ WEB-INF / lib目录中有gwt-dev.jar。 It should not be there. 它不应该在那里。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM