Context initialization failed
来源:8-7 后台商品图片的springmvc上传与富文本上传ftp服务器功能开发2
土豆咬土豆
2019-01-20
没有写FTP文件上传之前还可以正常启动,不知道是哪里出了问题
一月 20, 2019 7:42:41 下午 org.springframework.web.context.ContextLoader initWebApplicationContext
严重: Context initialization failed
java.lang.NoClassDefFoundError: com/sun/deploy/net/HttpResponse
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
at java.lang.Class.getDeclaredMethods(Class.java:1975)
at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.buildLifecycleMetadata(InitDestroyAnnotationBeanPostProcessor.java:199)
at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.findLifecycleMetadata(InitDestroyAnnotationBeanPostProcessor.java:181)
at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessMergedBeanDefinition(InitDestroyAnnotationBeanPostProcessor.java:124)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessMergedBeanDefinition(CommonAnnotationBeanPostProcessor.java:281)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyMergedBeanDefinitionPostProcessors(AbstractAutowireCapableBeanFactory.java:908)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:512)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:304)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:300)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:195)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:700)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:760)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:381)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:293)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5110)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5633)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:1015)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:991)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
at org.apache.catalina.startup.HostConfig.manageApp(HostConfig.java:1899)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:618)
at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:565)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1468)
at javax.management.remote.rmi.RMIConnectionImpl.access300(RMIConnectionImpl.java:76)atjavax.management.remote.rmi.RMIConnectionImpl300(RMIConnectionImpl.java:76)
at javax.management.remote.rmi.RMIConnectionImpl300(RMIConnectionImpl.java:76)atjavax.management.remote.rmi.RMIConnectionImplPrivilegedOperation.run(RMIConnectionImpl.java:1309)
at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1401)
at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:829)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:357)
at sun.rmi.transport.Transport$1.run(Transport.java:200)
at sun.rmi.transport.Transport1.run(Transport.java:197)atjava.security.AccessController.doPrivileged(NativeMethod)atsun.rmi.transport.Transport.serviceCall(Transport.java:196)atsun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568)atsun.rmi.transport.tcp.TCPTransport1.run(Transport.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568)
at sun.rmi.transport.tcp.TCPTransport1.run(Transport.java:197)atjava.security.AccessController.doPrivileged(NativeMethod)atsun.rmi.transport.Transport.serviceCall(Transport.java:196)atsun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568)atsun.rmi.transport.tcp.TCPTransportConnectionHandler.run0(TCPTransport.java:826)
at sun.rmi.transport.tcp.TCPTransportConnectionHandler.lambdaConnectionHandler.lambdaConnectionHandler.lambdarun0(TCPTransport.java:683)atjava.security.AccessController.doPrivileged(NativeMethod)atsun.rmi.transport.tcp.TCPTransport0(TCPTransport.java:683)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.tcp.TCPTransport0(TCPTransport.java:683)atjava.security.AccessController.doPrivileged(NativeMethod)atsun.rmi.transport.tcp.TCPTransportConnectionHandler.run(TCPTransport.java:682)
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.ClassNotFoundException: com.sun.deploy.net.HttpResponse
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1892)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1735)
… 65 more
一月 20, 2019 7:42:41 下午 org.apache.catalina.core.StandardContext startInternal
严重: One or more listeners failed to start. Full details will be found in the appropriate container log file
一月 20, 2019 7:42:41 下午 org.apache.catalina.core.StandardContext startInternal
严重: Context [] startup failed due to previous errors
一月 20, 2019 7:42:41 下午 org.springframework.context.support.AbstractApplicationContext doClose
信息: Closing Root WebApplicationContext: startup date [Sun Jan 20 19:42:39 CST 2019]; root of context hierarchy
一月 20, 2019 7:42:41 下午 org.springframework.context.support.AbstractApplicationContext doClose
警告: Exception thrown from LifecycleProcessor on context close
java.lang.IllegalStateException: LifecycleProcessor not initialized - call ‘refresh’ before invoking lifecycle methods via the context: Root WebApplicationContext: startup date [Sun Jan 20 19:42:39 CST 2019]; root of context hierarchy
at org.springframework.context.support.AbstractApplicationContext.getLifecycleProcessor(AbstractApplicationContext.java:359)
at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:888)
at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:841)
at org.springframework.web.context.ContextLoader.closeWebApplicationContext(ContextLoader.java:551)
at org.springframework.web.context.ContextLoaderListener.contextDestroyed(ContextLoaderListener.java:115)
at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:5157)
at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5830)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:221)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:149)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:1015)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:991)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
at org.apache.catalina.startup.HostConfig.manageApp(HostConfig.java:1899)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:618)
at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:565)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1468)
at javax.management.remote.rmi.RMIConnectionImpl.access300(RMIConnectionImpl.java:76)atjavax.management.remote.rmi.RMIConnectionImpl300(RMIConnectionImpl.java:76)
at javax.management.remote.rmi.RMIConnectionImpl300(RMIConnectionImpl.java:76)atjavax.management.remote.rmi.RMIConnectionImplPrivilegedOperation.run(RMIConnectionImpl.java:1309)
at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1401)
at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:829)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:357)
at sun.rmi.transport.Transport$1.run(Transport.java:200)
at sun.rmi.transport.Transport1.run(Transport.java:197)atjava.security.AccessController.doPrivileged(NativeMethod)atsun.rmi.transport.Transport.serviceCall(Transport.java:196)atsun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568)atsun.rmi.transport.tcp.TCPTransport1.run(Transport.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568)
at sun.rmi.transport.tcp.TCPTransport1.run(Transport.java:197)atjava.security.AccessController.doPrivileged(NativeMethod)atsun.rmi.transport.Transport.serviceCall(Transport.java:196)atsun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568)atsun.rmi.transport.tcp.TCPTransportConnectionHandler.run0(TCPTransport.java:826)
at sun.rmi.transport.tcp.TCPTransportConnectionHandler.lambdaConnectionHandler.lambdaConnectionHandler.lambdarun0(TCPTransport.java:683)atjava.security.AccessController.doPrivileged(NativeMethod)atsun.rmi.transport.tcp.TCPTransport0(TCPTransport.java:683)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.tcp.TCPTransport0(TCPTransport.java:683)atjava.security.AccessController.doPrivileged(NativeMethod)atsun.rmi.transport.tcp.TCPTransportConnectionHandler.run(TCPTransport.java:682)
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)
[2019-01-20 07:42:41,959] Artifact mmall:war: Error during artifact deployment. See server log for details.
一月 20, 2019 7:42:47 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory F:\迅雷下载\apache-tomcat-7.0.82\webapps\manager
一月 20, 2019 7:42:47 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory F:\迅雷下载\apache-tomcat-7.0.82\webapps\manager has finished in 223 ms
F:\迅雷下载\apache-tomcat-7.0.82\bin\catalina.bat stop
Using CATALINA_BASE: "C:\Users\asus.IntelliJIdea2018.1\system\tomcat\Unnamed_mmall"
Using CATALINA_HOME: "F:\迅雷下载\apache-tomcat-7.0.82"
Using CATALINA_TMPDIR: "F:\迅雷下载\apache-tomcat-7.0.82\temp"
Using JRE_HOME: "C:\Java\jdk1.8.0_144"
Using CLASSPATH: "F:\迅雷下载\apache-tomcat-7.0.82\bin\bootstrap.jar;F:\迅雷下载\apache-tomcat-7.0.82\bin\tomcat-juli.jar"
一月 20, 2019 7:43:12 下午 org.apache.catalina.startup.ClassLoaderFactory validateFile
警告: Problem with directory [F:???×???\apache-tomcat-7.0.82\lib], exists: [false], isDirectory: [false], canRead: [false]
一月 20, 2019 7:43:12 下午 org.apache.catalina.startup.ClassLoaderFactory validateFile
警告: Problem with directory [F:???×???\apache-tomcat-7.0.82\lib], exists: [false], isDirectory: [false], canRead: [false]
一月 20, 2019 7:43:12 下午 org.apache.catalina.core.StandardServer await
信息: A valid shutdown command was received via the shutdown port. Stopping the Server instance.
一月 20, 2019 7:43:12 下午 org.apache.coyote.AbstractProtocol pause
信息: Pausing ProtocolHandler [“http-apr-8088”]
一月 20, 2019 7:43:12 下午 org.apache.coyote.AbstractProtocol pause
信息: Pausing ProtocolHandler [“ajp-apr-8009”]
一月 20, 2019 7:43:12 下午 org.apache.catalina.core.StandardService stopInternal
信息: Stopping service Catalina
一月 20, 2019 7:43:12 下午 org.apache.coyote.AbstractProtocol stop
信息: Stopping ProtocolHandler [“http-apr-8088”]
一月 20, 2019 7:43:12 下午 org.apache.coyote.AbstractProtocol stop
信息: Stopping ProtocolHandler [“ajp-apr-8009”]
一月 20, 2019 7:43:12 下午 org.apache.coyote.AbstractProtocol destroy
信息: Destroying ProtocolHandler [“http-apr-8088”]
一月 20, 2019 7:43:12 下午 org.apache.coyote.AbstractProtocol destroy
信息: Destroying ProtocolHandler [“ajp-apr-8009”]
Disconnected from server
2回答
-
geelylucky
2019-01-21
同学,昨天已经在qq群里和你沟通了,确定了是你的包引错了。一定要细心哦!!!祝你学习愉快!!!
00 -
geelylucky
2019-01-20
亲爱的同学,你好,我是geely老师的助教。
java.lang.NoClassDefFoundError: com/sun/deploy/net/HttpResponse。是没有找到这个类,所以导致加载不了,最终就是spring无法创建Bean。请检查一下是否导错了类。
00
相似问题