我被要求接管Java webapp的托管,我以前从未使用过Java,而且我被告知Tomcat是要走的路,所以我有一个带有Tomcat 6的Windows服务器,我已经上传了网站并创建了虚拟主机,网站似乎对我来说很好,然后我接到一个电话,在editlead.jsp上有语言验证的问题,并且在tomcat的引导中添加-xverify:none`解决了,
现在服务器已经崩溃了,我无法重启服务我不得不让任务经理使用旧服务并再次启动服务,此事发生两次后服务器停止崩溃,甚至试图复制他们可能拥有的服务在办公室完成,看看我是否可能导致它崩溃,但没有。
我试过阅读日志并且让我感到困惑,所以如果有人可以提供帮助,我会将它们贴在下面。
2015-08-04 11:29:15 Commons Daemon procrun stderr initialized
Aug 04, 2015 11:29:16 AM org.apache.catalina.core.AprLifecycleListener init
INFO: Loaded APR based Apache Tomcat Native library 1.1.33 using APR version 1.5.1.
Aug 04, 2015 11:29:16 AM org.apache.catalina.core.AprLifecycleListener init
INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
Aug 04, 2015 11:29:16 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'debug' to '0' did not find a matching property.
Aug 04, 2015 11:29:17 AM org.apache.catalina.core.AprLifecycleListener initializeSSL
INFO: OpenSSL successfully initialized with version OpenSSL 1.0.1m 19 Mar 2015
Aug 04, 2015 11:29:17 AM org.apache.coyote.http11.Http11AprProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-80
Aug 04, 2015 11:29:17 AM org.apache.coyote.ajp.AjpAprProtocol init
INFO: Initializing Coyote AJP/1.3 on ajp-8009
Aug 04, 2015 11:29:17 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 2007 ms
Aug 04, 2015 11:29:17 AM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Aug 04, 2015 11:29:17 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.44
Aug 04, 2015 11:29:17 AM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor CMD.xml
Aug 04, 2015 11:29:19 AM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor host-manager.xml
Aug 04, 2015 11:29:19 AM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor manager.xml
Aug 04, 2015 11:29:20 AM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor ROOT.xml
Aug 04, 2015 11:29:20 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory BIN
Aug 04, 2015 11:29:20 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory docs
Aug 04, 2015 11:29:20 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory examples
Aug 04, 2015 11:29:22 AM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor CMD.xml
Aug 04, 2015 11:29:23 AM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor host-manager.xml
Aug 04, 2015 11:29:23 AM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor manager.xml
Aug 04, 2015 11:29:23 AM org.apache.catalina.startup.HostConfig deployDescriptor
WARNING: A docBase C:\Tomcat 6.0\webapps\manager inside the host appBase has been specified, and will be ignored
Aug 04, 2015 11:29:23 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory BIN
Aug 04, 2015 11:29:23 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory docs
Aug 04, 2015 11:29:23 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory examples
Aug 04, 2015 11:29:23 AM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Aug 04, 2015 11:29:23 AM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Aug 04, 2015 11:29:23 AM org.apache.coyote.http11.Http11AprProtocol start
INFO: Starting Coyote HTTP/1.1 on http-80
Aug 04, 2015 11:29:23 AM org.apache.coyote.ajp.AjpAprProtocol start
INFO: Starting Coyote AJP/1.3 on ajp-8009
Aug 04, 2015 11:29:23 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 6129 ms
Aug 04, 2015 11:29:58 AM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet LeadHandlerServlet threw exception
java.lang.IllegalStateException: Cannot forward after response has been committed
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:312)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
at LeadHandlerServlet.doPost(LeadHandlerServlet.java:338)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:643)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:615)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:879)
at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:617)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1778)
at java.lang.Thread.run(Unknown Source)
答案 0 :(得分:0)
如果没有看到LeadHandlerServlet中发生的事情,很难说出这里发生了什么。我猜你在第338行的doPost()中有这样的东西:
RequestDispatcher appDispatcher = getServletContext()。getRequestDispatcher(someURL); appDispatcher.forward(请求,响应);
我看不到代码。但这可能是对forward()的第二次调用。如果是的话,它会吹一个垫圈。一般来说,你需要在调用forward()后保持你的肮脏的小手离开响应。通常人们在调用它后立即粘贴一个return语句,并让后续传入的线程处理下面的任何逻辑。