MartK MartK - 1 year ago 220
Java Question

setSerializationId no such method error

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.

Answer Source

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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download