setSerializationId没有这样的方法错误
我试图运行我的项目,但每次都会遇到这个错误:
org.springframework.web.context.ContextLoaderListener
java.lang.NoSuchMethodError: org.springframework.beans.factory.support.DefaultListableBeanFactory.setSerializationId(Ljava/lang/String;)V
at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:128)
at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:467)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:397)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
这是我的 spring 应用程序上下文:
是什么原因造成的?任何帮助将不胜感激。
提前致谢。
Im trying to run my project, but this error hits me everytime:
org.springframework.web.context.ContextLoaderListener
java.lang.NoSuchMethodError: org.springframework.beans.factory.support.DefaultListableBeanFactory.setSerializationId(Ljava/lang/String;)V
at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:128)
at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:467)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:397)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
This is my spring application context:
What can cause this? Any help would be appreciated.
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
setSerializationId
方法存在于 Spring 3.0 中的DefaultListableBeanFactory
类中,但不存在于 Spring 2.5 中的同一类中。我认为你正在使用两个版本的 spring 的混合。看来您使用的库依赖于旧版本的 spring,例如 spring-web。我建议你检查类路径中的所有罐子。The
setSerializationId
method is present inDefaultListableBeanFactory
class from spring 3.0 but not in the same class from spring 2.5. I think you're working with a mixdown of the two versions of spring. It seems that you are using a library which depends on the old version of spring, for instance maybe spring-web. I suggest you to check all the jars in your classpath.