org.springframework.util.ClassUtils. forName(Ljava/lang/String;)Ljava/lang/Class

Asked on March 25, 2015
While running my Spring OXM application,  I am getting error. Need help.

Exception in thread "main" java.lang.NoSuchMethodError: org.springframework.util.ClassUtils.forName(Ljava/lang/String;)Ljava/lang/Class;
at org.springframework.xml.JaxpVersion.<clinit>(
at org.springframework.xml.transform.TraxUtils.isStaxResult(
at org.springframework.oxm.AbstractMarshaller.marshal(

Replied on March 26, 2015
The beginner of OXM, mostly get the error you have mentioned. I also got same error. This error is because of wrong spring-oxm JAR. I have solved my problem using the  following Gradle file. 

dependencies {
compile 'org.springframework.boot:spring-boot-starter:1.2.2.RELEASE'
compile 'org.springframework:spring-oxm:4.1.5.RELEASE'
compile 'org.codehaus.castor:castor-xml:1.3.3'

Write Answer

©2023 | Privacy Policy | Contact Us