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>(JaxpVersion.java:51)
at org.springframework.xml.transform.TraxUtils.isStaxResult(TraxUtils.java:87)
at org.springframework.oxm.AbstractMarshaller.marshal(AbstractMarshaller.java:90)



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










©2024 concretepage.com | Privacy Policy | Contact Us