servlet-api-2.4.jar - jar not loaded 问题解决

本文介绍了解决因WEB-INFlib目录下jsp-api.jar和servlet-api.jar与commonlib目录下同名JAR包冲突导致的问题。通过删除WEB-INFlib下的冲突文件,可以避免JBoss启动正常但页面显示空白的情况。

信息: validateJarFile(G:\workspace\cms\webapp\WEB-INF\lib\servlet-api-2.4.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class

 

分析:

jsp-api.jar和servlet-api.jar这两个包在common\lib已经有了,必须将\WEB-INF\lib\目录下的去掉,否则会冲突的,会引起jboss启动正常,而页面却总是无内容显示的错误

解决方案:

将\WEB-INF\lib\目录下的jsp-api.jar和servlet-api.jar删除

保证WEB-INF\lib跟tomcat5的common/lib下的JAR包没有重复的

An attempt was made to call a method that does not exist. The attempt was made from the following location: org.apache.catalina.authenticator.AuthenticatorBase.startInternal(AuthenticatorBase.java:1200) The following method did not exist: javax.servlet.ServletContext.getVirtualServerName()Ljava/lang/String; The calling method's class, org.apache.catalina.authenticator.AuthenticatorBase, was loaded from the following location: jar:file:/D:/Maven/repository/org/apache/tomcat/embed/tomcat-embed-core/9.0.96/tomcat-embed-core-9.0.96.jar!/org/apache/catalina/authenticator/AuthenticatorBase.class The called method's class, javax.servlet.ServletContext, is available from the following locations: jar:file:/D:/Maven/repository/javax/servlet/servlet-api/2.5/servlet-api-2.5.jar!/javax/servlet/ServletContext.class jar:file:/D:/Maven/repository/javax/servlet/javax.servlet-api/4.0.1/javax.servlet-api-4.0.1.jar!/javax/servlet/ServletContext.class jar:file:/D:/Maven/repository/org/apache/tomcat/embed/tomcat-embed-core/9.0.96/tomcat-embed-core-9.0.96.jar!/javax/servlet/ServletContext.class The called method's class hierarchy was loaded from the following locations: javax.servlet.ServletContext: file:/D:/Maven/repository/javax/servlet/servlet-api/2.5/servlet-api-2.5.jar Action: Correct the classpath of your application so that it contains compatible versions of the classes org.apache.catalina.authenticator.AuthenticatorBase and javax.servlet.ServletContext 16:23:59.301 [Thread-15] WARN c.a.n.c.n.NotifyCenter - [shutdown,136] - [NotifyCenter] Start destroying Publisher 16:23:59.301 [Thread-10] WARN c.a.n.c.h.HttpClientBeanHolder - [shutdown,102] - [HttpClientBeanHolder] Start destroying common HttpClient 16:23:59.301 [Thread-15] WARN c.a.n.c.n.NotifyCenter - [shutdown,153] - [NotifyCenter] Destruction of the end
最新发布
03-22
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值