在tomcat 7.0上部署了webservice。在訪問應用程序或者甚至是根應用程序的tomcat主頁時出錯。Tomcat 7.0和JAX WS Servlet錯誤
HTTP Status 500 - java.lang.AbstractMethodError: javax.servlet.jsp.JspFactory.getJspApplicationContext(Ljavax/servlet/ServletContext;)Ljavax/servlet/jsp/JspApplicationContext;
type Exception report
message java.lang.AbstractMethodError: javax.servlet.jsp.JspFactory.getJspApplicationContext(Ljavax/servlet/ServletContext;)Ljavax/servlet/jsp/JspApplicationContext;
description The server encountered an internal error that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: java.lang.AbstractMethodError: javax.servlet.jsp.JspFactory.getJspApplicationContext(Ljavax/servlet/ServletContext;)Ljavax/servlet/jsp/JspApplicationContext;
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:343)
javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
root cause
java.lang.AbstractMethodError: javax.servlet.jsp.JspFactory.getJspApplicationContext(Ljavax/servlet/ServletContext;)Ljavax/servlet/jsp/JspApplicationContext;
org.apache.jasper.compiler.Validator$ValidateVisitor.<init>(Validator.java:514)
org.apache.jasper.compiler.Validator.validateExDirectives(Validator.java:1798)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:217)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:373)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:353)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:340)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:646)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:357)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
note The full stack trace of the root cause is available in the Apache Tomcat/7.0.42 logs.
Tomcat的日誌
Jul 16, 2013 9:30:57 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet [jsp] in context with path [] threw exception [java.lang.AbstractMethodError: javax.servlet.jsp.JspFactory.getJspApplicationContext(Ljavax/servlet/ServletContext;)Ljavax/servlet/jsp/JspApplicationContext;] with root cause
java.lang.AbstractMethodError: javax.servlet.jsp.JspFactory.getJspApplicationContext(Ljavax/servlet/ServletContext;)Ljavax/servlet/jsp/JspApplicationContext;
at org.apache.jasper.compiler.Validator$ValidateVisitor.<init>(Validator.java:514)
at org.apache.jasper.compiler.Validator.validateExDirectives(Validator.java:1798)
at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:217)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:373)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:353)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:340)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:646)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:357)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" 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">
<servlet>
<servlet-name>FinServlet</servlet-name>
<servlet-class>finanalytic.servlets.FinServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>FinServlet</servlet-name>
<url-pattern>/FinServlet</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>
30
</session-timeout>
</session-config>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>
Tomcat的lib文件夾
ls /usr/lib/apache-tomcat-7.0.42/lib
annotations-api.jar FastInfoset.jar jaxb-api.jar jaxws-tools.jar resolver.jar tomcat-coyote.jar woodstox-core-asl.jar
catalina-ant.jar gmbal-api-only.jar jaxb-core.jar jsp-api.jar saaj-impl.jar tomcat-dbcp.jar
catalina-ha.jar ha-api.jar jaxb-impl.jar jsr181-api.jar servlet-api.jar tomcat-i18n-es.jar
catalina.jar jasper-el.jar jaxb-jxc.jar log4j.properties stax2-api.jar tomcat-i18n-fr.jar
catalina-tribes.jar jasper.jar jaxb-xjc.jar management-api.jar stax-ex.jar tomcat-i18n-ja.jar
ecj-4.2.2.jar javax.annotation-api.jar jaxws-api.jar mimepull.jar streambuffer.jar tomcat-jdbc.jar
el-api.jar javax.xml.soap-api.jar jaxws-rt.jar policy.jar tomcat-api.jar tomcat-util.jar
應用lib文件夾
ls /usr/lib/apache-tomcat-7.0.42/webapps/finClient/WEB-INF/lib
hbase-0.94.6-cdh4.3.0-security.jar http.jar
什麼是你的web.xml或context.xml文件看起來像固定呢?請提供更多詳情,我們可以幫助您。 – dougEfresh
@dougEfresh使用web.xml詳細信息編輯帖子。順便說一下,我們使用Netbeans和Glassfish編寫了代碼。稍後嘗試部署在Tomcat上。還將JAXWS庫複製到tomcat lib文件夾中。 – user2475661
http:// localhost:8080/manager/html正在工作。事實上即使是tomcat頁面也給出了我從應用主頁收到的同樣的錯誤。 – user2475661