Deployment problem on JBOSS server 5.0.1.GA Deployment problem on JBOSS server 5.0.1.GA spring spring

Deployment problem on JBOSS server 5.0.1.GA


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>


the likely cause of this is that JBoss has its own internal copy of Hibernate, along with Hibernate Search and Hibernate Validator.

If your application also has its own copy of Hibernate in its lib directory, and this is a different version to that held inside JBoss, then the risk is that they'll clash. Specifically, Hibernate will attempt to auto-discover the Validator and Search libraries, and if there is a version clash, this is the result.

The simplest thing to do is to disable the auto-discovery of Hibernate Search and Validator, by adding these to your hibernate properties inside the application:

hibernate.validator.autoregister_listeners=falsehibernate.search.autoregister_listeners=false


This issue is caused since JBoss is shipped with hibernate 3.3 libraries. I had the same error message and fixed it by deleting hibernate-validator.jar from {JBOSS_HOME}/common/lib/ folder. Just make sure that your application is shipped with correct version of hibernate-validator.jar file.

I know this is not actually a solution but I have gone through JBoss forum threads 573076 and 621877; tried the jboss-classloading.xml solution as described in here.. None of these helped me resolve the issue..

Further materials on jboss-classloading.xml, in case any one needs are here,here and here.