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

微笑、不失礼 提交于 2019-11-30 04:49: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.

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>

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!