JBoss 5.1 上的 Spring 3 MVC:ConflictingBeanDefinitionException
当我尝试在 JBoss 5.1 Spring 3 MVC 上部署应用程序时,向我抛出以下堆栈跟踪: http://pastebin.com/Aah386PJ< /a>
告诉我,我在两个不同的包中对同一个 bean 有两个定义。问题是我在控制器包中没有这个 IntershipConfigurationController,但我在controller.internshipConfiguration 中有它。我之前将其添加到控制器的根目录下,但我从 SVN 中将其删除,并且它不再出现在树中。
我清理了 JBoss、Eclipse 的项目,尝试重新部署它、重新启动 JBoss、Eclipse 等,但我无法让这个项目工作,而我的伙伴使用相同的存储库可以毫无问题地运行它。
我不知道该怎么办,这真的很烦人。
When I try to deploy my application on JBoss 5.1 Spring 3 MVC throw me this stack trace: http://pastebin.com/Aah386PJ
Telling me that I have two definition of the same bean in two different packages. The thing is I don't have this IntershipConfigurationController in the controller package, but I have it in controller.internshipConfiguration. I previously add it under the root of controller but I deleted it from SVN and it doesn't appear anymore in the tree.
I cleaned JBoss, Eclipse's project, tried to redeploy it, to restart JBoss, Eclipse, etc. but I can't get this project working while my mates with the same repository can run it with no issue.
I don't know what to do this is really annoying.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我知道这有时会令人沮丧,但您可能想知道为什么会发生这种情况。基于 Spring 注解的 ant 路径匹配器使用 URI 模式检查类路径,以搜索控制器或组件。在您的情况下,类路径要么有一个包含您的类的先前版本的 jar,要么在您的构建路径中包含一些引用 .class 文件。
I know this can be frustrating sometimes but you might want to know why this could happen. Spring annotation based ant path matcher checks for the class-path with a URI pattern to search for controllers or components. In your case the class-path either has a jar having the previous version of your class or some referencing .class file in your build path.
我最终删除了我的 JBoss 文件夹,从 Eclipse 中的 JBoss 中删除了项目,提取了正确的 JBoss,在 Eclipse 中对 JBoss 进行了清理,然后重新部署了我的项目,现在它可以工作了。
尽管如此,这是一个非常奇怪的问题......
编辑:
事实上,这是因为我的项目根目录下的构建文件夹已进行版本控制,并且旧类仍然存在。
现在该文件夹已被忽略并从 SVN 中删除,并且我已从 FS 中删除了旧类。
I finally deleted my JBoss folder, removed the projects from JBoss in Eclipse, extract a proper JBoss, made a clean on JBoss in Eclipse and then redeployed my projects and it's now working.
Nonetheless it's a really strange issue...
Edit :
It was in fact because the build folder at the root of my project was versioned and the old classes were still present.
Now the folder is ignored and removed from the SVN and I've deleted the old classes from my FS.