nested exception is java.lang.NoClassDefFoundError: Could not initialize class org.hibernate.validator.internal.engine.ConfigurationImpl

前端 未结 4 1061
醉酒成梦
醉酒成梦 2021-01-16 09:55
 public ModelAndView Details(@ModelAttribute(\"\") @Validated App app, BindingResult result, @RequestParam(value=\"paramSessionAttr\", required=false) String session         


        
相关标签:
4条回答
  • 2021-01-16 10:02

    Maybe lib conflict happens.

    With my case:

    jboss.common:jboss-common:jar:1.2.1.GA
    org.jboss.logging:jboss-logging:jar:3.3.0.Final

    exist together, but they have same package "org.jboss.logging".

    Just exclusion one in pom.xml

    0 讨论(0)
  • 2021-01-16 10:04

    I guess some library is missing because I download library à la carte

    you download from here as a package instead of you download à la carte

    setup GUIDELINE http://hibernate.org/validator/documentation/getting-started/

    Import and include library below in your project

    • classmate-1.1.0.jar
    • javax.el-2.2.4.jar
    • javax.el-api-2.2.4.jar
    • jboss-logging-3.2.1.Final.jar
    • validation-api-1.1.0.Final.jar
    • hibernate-validator-5.2.2.Final.jar
    • hibernate-validator-annotation-processor-5.2.2.Final.jar
    • hibernate-validator-cdi-5.2.2.Final.jar

    Then your code should be working.

    0 讨论(0)
  • 2021-01-16 10:05

    I used sts to generate the spring project. I was getting the above error. After spending 2 days, I figured adjusting the version fix the problem.

    In the parent section of pom.xml, I replaced 1.5.4 with 1.2.5

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>1.2.5.RELEASE</version>
      </parent>
    
    0 讨论(0)
  • 2021-01-16 10:07

    I was facing the same issue while working with JSR 303 bean validation I have added below two jar(along with validation-api-1.1.0.final.jar and hibernate-validator-5.0.1.final.jar) and the issue got resolved

    1.classmate-0.8.0.jar 2.jboss-logging-3.1.0.ga.jar

    0 讨论(0)
提交回复
热议问题