java.lang.NoSuchMethodException: org.hibernate.validator.ClassValidator Seam weblogic 10.3

前端 未结 3 1680
悲哀的现实
悲哀的现实 2020-12-29 06:52

I have a big problem with Hibernate (use with seam) on weblogic 10.3.

When I publish my application, I get this error:

java.lang.NoSuchMethodExceptio         


        
相关标签:
3条回答
  • 2020-12-29 07:13

    If you happen to hit this issue on Weblogic Server, I solved this problem on Weblogic 10.3.0.0 with placing the package org.hibernate to prefer-application-packages at weblogic-application.xml in the EAR:

    <weblogic-application>
       <prefer-application-packages>
          <package-name>org.hibernate.*</package-name>
       </prefer-application-packages>
    </weblogic-application>
    

    With a properly built application this will prevent Weblogic Server loading the older, conflicting library from the server's classpath and make it work as expected.

    0 讨论(0)
  • 2020-12-29 07:16

    I solved this problem adding this two properties in my hibernate config.

    <property name="hibernate.validator.apply_to_ddl">false</property> 
    <property name="hibernate.validator.autoregister_listeners">false</property>
    
    0 讨论(0)
  • 2020-12-29 07:26

    It happens when you use newer version of Hibernate in your application while pre-packaged hibernate jars (that come with jboss server) are of older version. For details on how to properly upgrade your application server's hibernate jars, read this.

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