0

I am migrating my old project to Spring Boot 1.3.5. The project has Spring Modules Validation 0.8. But spring-modules-validation (which is no more active) does not work. And throws following exception.

Caused by: java.lang.NoSuchMethodError: org.springframework.util.ClassUtils.forName(Ljava/lang/String;)Ljava/lang/Class;
at org.springmodules.validation.valang.parser.ValangParser.loadClass(ValangParser.java:130)
at org.springmodules.validation.valang.parser.ValangParser.setFunctionsByName(ValangParser.java:105)
at org.springmodules.validation.valang.parser.ValangParser.<init>(ValangParser.java:55)
at org.springmodules.validation.valang.parser.SimpleValangBased.createValangParser(SimpleValangBased.java:77)
at org.springmodules.validation.valang.ValangValidator.afterPropertiesSet(ValangValidator.java:159)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1637)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1574)

I have already followed some of old threads on similar issue. But those are not directly related to the versions I am using. This is how my related pom looks like.

  <dependency>
        <groupId>org.springmodules</groupId>
        <artifactId>spring-modules-validation</artifactId>
        <version>0.8</version>
        <exclusions>
            <exclusion>
                <artifactId>spring</artifactId>
                <groupId>org.springframework</groupId>
            </exclusion>
            <exclusion>
                <groupId>org.springframework</groupId>
                <artifactId>spring-mock</artifactId>
            </exclusion>
        </exclusions>
    </dependency>
Sudhirkd
  • 233
  • 1
  • 3
  • 10
  • spring-modules-validation is old, heck no it is ancient and not maintained anymore. So it is bound to break with newer spring versions, basically it isn't usable anymore. – M. Deinum Jul 06 '16 at 05:33
  • @Deinum Thanks for the comments. I understand that but I need that to work, as I have no time to rewrite with different approach. Any ideas ? – Sudhirkd Jul 06 '16 at 14:15
  • 1
    Don't use spring boot and newer spring versions. That is the only way to make it work, or fix the out-dated spring modules stuff. Either left or right you need to fix it as the current combi will simply not work. – M. Deinum Jul 07 '16 at 04:51

0 Answers0