setSerializationId no such method error

▼魔方 西西 提交于 2020-01-23 09:09:06

问题


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:

http://sharetext.org/2E7

What can cause this? Any help would be appreciated.

Thanks in advance.


回答1:


The setSerializationId method is present in DefaultListableBeanFactory 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.



来源:https://stackoverflow.com/questions/5626818/setserializationid-no-such-method-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!