I am facing following error,
java.lang.NoSuchMethodError: org.springframework.beans.factory.xml.XmlReaderContext.getEnvironment()Lorg/springframework/core/e
This error is pretty clear, The class
org.springframework.beans.factory.xml.XmlReaderContext
does not contain the method getEnvironment (java method notation)
.getEnvironment()Lorg/springframework/core/env/Environment
If you look at the Spring bean library that is included in you application, and run a javap -l on the class, you will probably notice that this method really does not exist...
**javap.exe c:\XmlReaderContext.class** -l
Compiled from "XmlReaderContext.java"
public class org.springframework.beans.factory.xml.XmlReaderContext extends org.springframework.beans.factory.parsing.ReaderContext {
public org.springframework.beans.factory.xml.XmlReaderContext(org.springframework.core.io.Resource, org.springframework.beans.factory.parsing.ProblemReporter, org.springframework.beans.factory.par
aderEventListener, org.springframework.beans.factory.parsing.SourceExtractor, org.springframework.beans.factory.xml.XmlBeanDefinitionReader, org.springframework.beans.factory.xml.NamespaceHandlerRes
public final org.springframework.beans.factory.xml.XmlBeanDefinitionReader getReader();
public final org.springframework.beans.factory.support.BeanDefinitionRegistry getRegistry();
public final org.springframework.core.io.ResourceLoader getResourceLoader();
public final java.lang.ClassLoader getBeanClassLoader();
public final org.springframework.beans.factory.xml.NamespaceHandlerResolver getNamespaceHandlerResolver();
public java.lang.String generateBeanName(org.springframework.beans.factory.config.BeanDefinition);
public java.lang.String registerWithGeneratedName(org.springframework.beans.factory.config.BeanDefinition);
public org.w3c.dom.Document readDocumentFromString(java.lang.String);
}
Just upgrade to a later version that contains the method for this Spring bean dependency > 4.3.2
Regards
Sahi