eclipse中tomcat启动报错

严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
java.lang.ExceptionInInitializerError
at org.springframework.beans.factory.support.AbstractBeanFactory.requiresDestruction(AbstractBeanFactory.java:1474)
at org.springframework.beans.factory.support.AbstractBeanFactory.registerDisposableBeanIfNecessary(AbstractBeanFactory.java:1492)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:565)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:198)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:439)
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:624)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:461)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:389)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:294)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4323)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4771)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:138)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:785)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:763)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:558)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:674)
at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:599)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:538)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1390)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:355)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:89)
at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:312)
at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:292)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:998)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:772)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:138)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:990)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:275)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:138)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:424)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:138)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:648)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:138)
at org.apache.catalina.startup.Catalina.start(Catalina.java:576)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:415)
Caused by: java.lang.SecurityException: Prohibited package name: java.lang
at java.lang.ClassLoader.preDefineClass(Unknown Source)
at java.lang.ClassLoader.defineClassCond(Unknown Source)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$000(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1651)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1509)
at org.springframework.beans.factory.support.DisposableBeanAdapter.(DisposableBeanAdapter.java:72)
... 46 more
2017-3-15 10:48:12 org.apache.catalina.core.ApplicationContext log

以前正常启动,今天突然不能启动了

5个回答

Spring有错误,你不能只看能不能开启来啊。看看配置

m0_37594616
张小七七 以前启动正常的,我需要看哪一块配置呢
3 年多之前 回复

以前就是正常的,看哪一块配置呢?

你先试试把tomcat下的缓存删掉,然后在eclipse上的project里有个clean,,然后再重新打包部署

m0_37594616
张小七七 回复耶戈尔-黑莱: 好吧。谢谢啦
3 年多之前 回复
qq_33195578
耶戈尔-黑莱 好吧,我帮不到你了,,你可以百度一下Prohibited package name: java.lang这个,然后再看看
3 年多之前 回复
m0_37594616
张小七七 回复耶戈尔-黑莱: 报的这些错都跟代码没关系
3 年多之前 回复
qq_33195578
耶戈尔-黑莱 这都不是跟自己代码有关的bug,看不出来
3 年多之前 回复
m0_37594616
张小七七 回复耶戈尔-黑莱: 最先报的错是这个:[AppsPlate] 2017-03-15 11:16:09.744 ERROR [ContextLoader.java:324] Context initialization failed java.lang.ExceptionInInitializerError at org.springframework.beans.factory.support.AbstractBeanFactory.requiresDestruction(AbstractBeanFactory.java:1474)
3 年多之前 回复
qq_33195578
耶戈尔-黑莱 回复m0_37594616: 你看看最先报错的地方是什么错
3 年多之前 回复
m0_37594616
张小七七 没有用,还是报错。其中有个错是这个:Caused by: java.lang.SecurityException: Prohibited package name: java.lang
3 年多之前 回复

AbstractBeanFactory.java:1474-----------
_
是不是有这个文件 AbstractBeanFactory 如果有你找到看看1474行

或者 文件里 有没有这个 参数/变量 :requiresDestruction_

gongziyayu
公子崖余 回复张小七七: 那应该是缓存吧
3 年多之前 回复
m0_37594616
张小七七 解决了,换了个纯净的tomcat就好了,虽然不明白为啥
3 年多之前 回复

看各种注解缺没缺,再就是spring扫描包

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问