gpt4 book ai didi

jax-ws - Tomcat 7.0 和 JAX WS Servlet 错误

转载 作者:行者123 更新时间:2023-12-01 05:19:19 26 4
gpt4 key购买 nike

在 tomcat 7.0 上部署了一个 web 服务。在访问应用程序甚至是根应用程序的 tomcat 主页时出错。

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

应用程序库文件夹
ls /usr/lib/apache-tomcat-7.0.42/webapps/finClient/WEB-INF/lib
hbase-0.94.6-cdh4.3.0-security.jar http.jar

最佳答案

刚刚搜索了一下,发现库 jar 文件位于您的 Web 应用程序文件夹(webcontent/lib)中,它与 apache 服务器 servlet 容器 lib 文件不匹配。
如果您将任何 tomcat jar 文件复制到您的 web 应用程序文件夹中,只需删除它们,因为它已经存在于 tomcat 服务器库中。

关于jax-ws - Tomcat 7.0 和 JAX WS Servlet 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17687500/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com