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

萬事功到自然成發表於2020-12-11

 

如有以下這種錯誤,其他辦法都試過沒用,那麼可能是你用了springboot  部署在tomcat7 不相容,換成tomcat 8試試 

ction 10.7.2. Offending class: javax/el/Expression.class
十二月 10, 2020 10:47:28 下午 org.apache.catalina.loader.WebappClassLoaderBase validateJarFile
資訊: validateJarFile(/home/app/kuaiyueboche-service/webapps/web-1.0.0.0-SNAPSHOT/WEB-INF/lib/tomcat-embed-core-9.0.35.jar) - jar not loaded. See Servlet Spec 3.0, section 10.7.2. Offending class: javax/servlet/Servlet.class
十二月 10, 2020 10:47:28 下午 org.apache.catalina.core.ContainerBase addChildInternal
嚴重: ContainerBase.addChild: start: 
org.apache.catalina.LifecycleException: 無法啟動元件[StandardEngine[Catalina].StandardHost[localhost].StandardContext[/web-1.0.0.0-SNAPSHOT]]
    at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:440)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:1007)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:983)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:639)
    at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1127)
    at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:2019)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NoClassDefFoundError: javax/servlet/GenericFilter
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:756)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:3258)
    at org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:1416)
    at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1920)
    at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1795)
    at org.apache.tomcat.websocket.server.WsServerContainer.<init>(WsServerContainer.java:106)
    at org.apache.tomcat.websocket.server.WsSci.init(WsSci.java:137)
    at org.apache.tomcat.websocket.server.WsSci.onStartup(WsSci.java:49)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5642)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
    ... 10 more
Caused by: java.lang.ClassNotFoundException: javax.servlet.GenericFilter
    at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1951)
    at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1795)
    ... 22 more


資訊: Server startup in 841 ms
 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

資訊: validateJarFile(/home/app/kuaiyueboche-service/webapps/ROOT/WEB-INF/lib/tomcat-embed-core-9.0.35.jar) - jar not loaded. See Servlet Spec 3.0, section 10.7.2. Offending class: javax/servlet/Servlet.class
十二月 10, 2020 11:30:41 下午 org.apache.catalina.core.ContainerBase addChildInternal
嚴重: ContainerBase.addChild: start: 
org.apache.catalina.LifecycleException: 無法啟動元件[StandardEngine[Catalina].StandardHost[localhost].StandardContext[]]
    at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:440)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:1007)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:983)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:639)
    at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1127)
    at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:2019)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NoClassDefFoundError: javax/servlet/GenericFilter
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:756)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:3258)
    at org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:1416)
    at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1920)
    at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1795)
    at org.apache.tomcat.websocket.server.WsServerContainer.<init>(WsServerContainer.java:106)
    at org.apache.tomcat.websocket.server.WsSci.init(WsSci.java:137)
    at org.apache.tomcat.websocket.server.WsSci.onStartup(WsSci.java:49)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5642)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
    ... 10 more
Caused by: java.lang.ClassNotFoundException: javax.servlet.GenericFilter
    at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1951)
    at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1795)
    ... 22 more

十二月 10, 2020 11:30:41 下午 org.apache.catalina.startup.HostConfig deployWAR
嚴重: 部署 Web 應用程式 archive [/home/app/kuaiyueboche-service/webapps/ROOT.war] 時出錯
java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: 無法啟動元件[StandardEngine[Catalina].StandardHost[localhost].StandardContext[]]
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:1011)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:983)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:639)
    at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1127)
    at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:2019)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)

 

 

 

 

 

 

 

 

 

相關文章