报错org.apache.catalina.LifecycleException caused by java.lang.NoSuchMethodError: javax.servlet.ServletContext.getClassLoader()Ljava/lang/ClassLoader

今天将tomcat6更换成了tomcat7,报错的内容

严重: A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/webandroid]]
 at java.util.concurrent.FutureTask.report(Unknown Source)
 at java.util.concurrent.FutureTask.get(Unknown Source)
 at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1119)
 at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:819)
 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
 at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1571)
 at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1561)
 at java.util.concurrent.FutureTask.run(Unknown Source)
 at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
 at java.lang.Thread.run(Unknown Source)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/webandroid]]
 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:153)
 ... 6 more
Caused by: java.lang.NoSuchMethodError: javax.servlet.ServletContext.getClassLoader()Ljava/lang/ClassLoader;
 at org.apache.catalina.startup.WebappServiceLoader.load(WebappServiceLoader.java:96)
 at org.apache.catalina.startup.ContextConfig.processServletContainerInitializers(ContextConfig.java:1573)
 at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1279)
 at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:887)
 at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:387)
 at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
 at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
 at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5503)
 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
 ... 6 more

解决方法:java的jre里面lib/ext/文件夹的

el-api.jar servlet-api.jar jsp-api.jar 需要更换成新的tomcat7里面的lib

时间: 2025-01-31 06:45:18

报错org.apache.catalina.LifecycleException caused by java.lang.NoSuchMethodError: javax.servlet.ServletContext.getClassLoader()Ljava/lang/ClassLoader的相关文章

【原】tomcat 7 启动报错:java.lang.NoSuchMethodError: javax.servlet.ServletContext.getSessionCookieConfig()Ljavax/servlet/SessionCookieConfig的解决

现象: tomcat 7 启动报错:java.lang.NoSuchMethodError: javax.servlet.ServletContext.getSessionCookieConfig()Ljavax/servlet/SessionCookieConfig 解决: 把tomcat目录下的lib/servlet-api.jar文件拷贝到$JAVA_HOME/jre/lib/ext目录下,再启动tomcat问题解决

tomcat7 启动项目报错 java.lang.NoSuchMethodError: javax.servlet.ServletContext.getSessionCookieConfig()

JDK版本:jdk1.8.0_77 Tomcat 版本:apache-tomcat-7.0.47 异常重现步骤: 1.完成项目部署 2.启动Tomcat 异常头部信息:java.lang.NoSuchMethodError: javax.servlet.ServletContext.getSessionCookieConfig() 解决方案: 把apache-tomcat-7.0.47/lib/servlet-api.jar 拷贝到$JAVA_HOME/jre/lib/ext目录下去 参考博文:

Tomcat启动报错:org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalin

Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled. 20:36:46.361 [RMI TCP Connection(3)-127.0.0.1] ERROR o.s.boot.SpringApplication - Application startup failed org.springframework

springboot启动端口占用问题,报错org.apache.catalina.LifecycleException: Protocol handler start failed

解决办法,找到被占用的端口 原文地址:https://www.cnblogs.com/taopanfeng/p/11229529.html

mavne install 报错org.apache.maven.surefire.util.SurefireReflectionException: java.lang.reflect.InvocationTargetException

maven install 报错 org.apache.maven.surefire.util.SurefireReflectionException: java.lang.reflect.InvocationTargetException; nested exception is java.lang.reflect.InvocationTargetException: nulljava.lang.reflect.InvocationTargetException at sun.reflect.

原创:idea启动项目的是否报错:java.lang.ClassNotFoundException: javax.servlet.ServletContext

在Intellij IDEA中默认所有 scope 为 provided 的依赖不会被加入到 classpath: 想想配置正确,怎么不能创建窗容器呢 ava.lang.ClassNotFoundException: javax.servlet.ServletContext 2020-03-21 17:33:17,156 WARN [org.springframework.context.support.ClassPathXmlApplicationContext] - Exception en

Caused by: java.lang.NoSuchMethodError:javax.servlet.http.HttpServletRequest.getServletContext()L

在做项目的时候,出现Caused by: java.lang.NoSuchMethodError: javax.servlet.http.HttpServletRequest.getServletContext()L这个问题,也就是使用request.getServletContext().getRealPath("/")这个报错,感觉好郁闷,看了别人写的文章,可能是tomcat版本过低,我之前用的是tomcat6,现在我改成tomcat7,问题解决了,故分享给大家

Caused by: java.lang.NoClassDefFoundError: javax/servlet/ServletContext

org.springframework.beans.factory.BeanDefinitionStoreException: Failed to parse configuration class [com.linewell.wechat.WechatApplication]; nested exception is java.lang.IllegalStateException: Failed to introspect annotated methods on class org.spri

关于tomcat启动 报tomcat org.apache.catalina.LifecycleException异常

出现这个异常 tomcat org.apache.catalina.LifecycleException 时,没在意,还以为是数据库配置没配置好,瞎搞了一通.后来从百度上搜了搜,得到了几种答案 一. web.xml没有配置好  转:{               出现这个错误,郁闷了好久,刚开始的时候去网上找了很多,也没有解决,还以为是因为我用的是最新版的tomcat出了问题了,结果后来在看xml的配置时候看到了servlet    的url-pattern的配置少写了一个"/",添加