开发者社区> 问答> 正文

tomcat启动报错:Annotation-specified bean nam?报错

在google和baidu上没有找到答案,环境也调试过了。java7,tomcat7和spring3.2.14,不知道哪里错了?来问下大神门。

八月 08, 2015 11:30:51 上午 org.apache.catalina.core.StandardContext listenerStart
严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.context.annotation.ConflictingBeanDefinitionException: Annotation-specified bean name 'pickingCallback' for bean class [com.sun.j3d.utils.picking.behaviors.PickingCallback] conflicts with existing, non-compatible bean definition of same name and class [com.sun.j3d.utils.behaviors.picking.PickingCallback]
at org.springframework.context.annotation.ClassPathBeanDefinitionScanner.checkCandidate(ClassPathBeanDefinitionScanner.java:312)
at org.mybatis.spring.mapper.ClassPathMapperScanner.checkCandidate(ClassPathMapperScanner.java:237)
at org.springframework.context.annotation.ClassPathBeanDefinitionScanner.doScan(ClassPathBeanDefinitionScanner.java:253)
at org.mybatis.spring.mapper.ClassPathMapperScanner.doScan(ClassPathMapperScanner.java:164)
at org.springframework.context.annotation.ClassPathBeanDefinitionScanner.scan(ClassPathBeanDefinitionScanner.java:220)
at org.mybatis.spring.mapper.MapperScannerConfigurer.postProcessBeanDefinitionRegistry(MapperScannerConfigurer.java:319)
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:632)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:461)
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:4994)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5492)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1575)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1565)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)



展开
收起
爱吃鱼的程序员 2020-06-12 15:16:12 1037 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

    是不是按beanname注入的?[com.sun.j3d.utils.picking.behaviors.PickingCallback]conflictswithexisting,non-compatiblebeandefinitionofsamenameandclass<spanstyle="font-family:Consolas,'BitstreamVeraSansMono','CourierNew',Courier,monospace;font-size:14px;line-height:15.3999996185303px;background-color:#FFFFFF;">[com.sun.j3d.utils.behaviors.picking.PickingCallback]按类型注入,或者改类名吧。

    Annotation-specifiedbeanname'pickingCallback'<spanstyle="font-family:Consolas,'BitstreamVeraSansMono','CourierNew',Courier,monospace;font-size:14px;line-height:15.3999996185303px;background-color:#FFFFFF;">for<spanstyle="font-family:Consolas,'BitstreamVeraSansMono','CourierNew',Courier,monospace;font-size:14px;line-height:15.3999996185303px;background-color:#FFFFFF;">beanclass<spanstyle="font-family:Consolas,'BitstreamVeraSansMono','CourierNew',Courier,monospace;font-size:14px;line-height:15.3999996185303px;background-color:#FFFFFF;">[com.sun.j3d.utils.picking.behaviors.PickingCallback]conflictswithexisting,non-compatiblebeandefinitionofsamenameandclass<spanstyle="font-family:Consolas,'BitstreamVeraSansMono','CourierNew',Courier,monospace;font-size:14px;line-height:15.3999996185303px;background-color:#FFFFFF;">[com.sun.j3d.utils.behaviors.picking.PickingCallback]

    我外语不好,但是看到这个报错,第一个感觉就是 pickingCallback这个bean有问题...

    pickingCallback这个类我也不知道是spring哪里引用的,貌似是jdk8里的一个类解决了,其实我都没发现错误在哪里。重新改了改配置文件,就好了。
    我觉得是之前的错误导致spring容器中有残留的bean再次修改正确之后重新运行也会报错,现在你修改了配置文件可能之前的暂留还在但是已经不会影响他运行了我的问题是一直报错重复然后我把文件名加了一个下划线,神奇的就好使了但是我可以确定项目中绝对不存在重名的文件只是spring容器的问题而已

    2020-06-12 15:16:31
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
Apache Tomcat 的云原生演进 立即下载
低代码开发师(初级)实战教程 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载