Tomcate启动运行时出BUG,求解!!!

Caused by: java.lang.ClassNotFoundException: org.springframework.cglib.core.SpringNamingPolicy
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1305)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1157)
... 28 more
十一月 25, 2017 8:17:38 上午 org.apache.catalina.core.StandardContext listenerStart
严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'appCategoryServiceImpl' defined in file [D:\Tencent\QQPhoneManager.metadata.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\AppInfoSystem\WEB-INF\classes\cn\appsys\service\AppCategoryServiceImpl.class]: Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: org/springframework/cglib/core/SpringNamingPolicy
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:529)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:296)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:293)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:628)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:410)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4729)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5167)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1409)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1399)
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: org/springframework/cglib/core/SpringNamingPolicy
at org.springframework.aop.framework.CglibAopProxy.getProxy(CglibAopProxy.java:186)
at org.springframework.aop.framework.ProxyFactory.getProxy(ProxyFactory.java:109)
at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.createProxy(AbstractAutoProxyCreator.java:479)
at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.wrapIfNecessary(AbstractAutoProxyCreator.java:364)
at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.postProcessAfterInitialization(AbstractAutoProxyCreator.java:324)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFactory.java:409)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1518)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:521)
... 20 more
Caused by: java.lang.ClassNotFoundException: org.springframework.cglib.core.SpringNamingPolicy
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1305)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1157)
... 28 more

十一月 25, 2017 8:17:38 上午 org.apache.catalina.core.StandardContext startInternal
严重: One or more listeners failed to start. Full details will be found in the appropriate container log file
十一月 25, 2017 8:17:38 上午 org.apache.catalina.core.StandardContext startInternal
严重: Context [/AppInfoSystem] startup failed due to previous errors
十一月 25, 2017 8:17:38 上午 org.apache.catalina.core.ApplicationContext log
信息: Closing Spring root WebApplicationContext
十一月 25, 2017 8:17:38 上午 org.apache.catalina.loader.WebappClassLoaderBase clearReferencesJdbc
警告: The web application [AppInfoSystem] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
十一月 25, 2017 8:17:38 上午 org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads
警告: The web application [AppInfoSystem] appears to have started a thread named [MySQL Statement Cancellation Timer] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
java.lang.Object.wait(Native Method)
java.lang.Object.wait(Object.java:502)
java.util.TimerThread.mainLoop(Timer.java:526)
java.util.TimerThread.run(Timer.java:505)
十一月 25, 2017 8:17:38 上午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["http-nio-8080"]
十一月 25, 2017 8:17:38 上午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["ajp-nio-8009"]
十一月 25, 2017 8:17:38 上午 org.apache.catalina.startup.Catalina start
信息: Server startup in 25185 ms

bug

11个回答

Caused by: java.lang.ClassNotFoundException:
后面跟的包,你没有
你去tomcat官网再下一个

是不是某个业务层的类没有实现任何接口,类上注解了@Service

像这样 :
@Service
public class ***Service {

}
而不是
@Service
public class ***Service implements **{

}

1.清空
2.卸载
3.用的eclipse?删除项目列表中server文件夹
4.重装

tomcat出现错误有超多种,有可能出现重名的urlmapping路径,也有可能导错jar包等等

Caused by: java.lang.ClassNotFoundException: org.springframework.cglib.core.SpringNamingPolicy
最关键是这个错误。原因应该:楼上wb_snail说的。
没有接口的话,会使用cglib代理。而你没有cglib的相关jar包

weiruiqingyi
weiruiqingyi 有接口实现,还报的这个错
大约 2 年之前 回复

没有接口的话,会使用cglib代理。而你没有cglib的相关jar包

weiruiqingyi
weiruiqingyi 有接口实现,但还是出这个bug
大约 2 年之前 回复

Caused by: java.lang.ClassNotFoundException: org.springframework.cglib.core.SpringNamingPolicy
目测是缺少cglib相关jar包

cglib jar包没有?????

异常的错误提示为, 没有找到SpringNamingPolicy这个类 , 还有个错误是Error creating bean with name 'appCategoryServiceImpl'
意思是你错误的创建了一个名字叫appCategoryServiceImpl的类, 可能是没有添加@service注解,

而且不是tomcat启动出现bug, 标题该改为 运行tomcat,自己项目报错

异常的错误提示为, 没有找到SpringNamingPolicy这个类 , 还有个错误是Error creating bean with name 'appCategoryServiceImpl'
意思是你错误的创建了一个名字叫appCategoryServiceImpl的类, 可能是没有添加@service注解,

而且不是tomcat启动出现bug, 标题该改为 运行tomcat,自己项目报错

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