Error using hibernate-validator on JBoss 6
I get the following error at deploy time:
22:34:40,393 ERROR 开发者_如何学运维[AbstractKernelController] Error installing to Start: name=persistence.unit:unitName=fizio.ear/events-service.war#fizio state=Create: org.hibernate.HibernateException: Unable to get the default Bean Validation factory
Caused by:
Caused by: java.lang.IllegalAccessException: Class org.hibernate.cfg.beanvalidation.BeanValidationActivator can not access a member of class org.hibernate.cfg.beanvalidation.TypeSafeActivator with modifiers "public static"
at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:65) [:1.6.0_22]
at java.lang.reflect.Method.invoke(Method.java:588) [:1.6.0_22]
at org.hibernate.cfg.beanvalidation.BeanValidationActivator.applyDDL(BeanValidationActivator.java:118) [:3.6.0.Final]
Any suggestions on how to fix it would be appreciated. Thanks in advance.
you have a version conflict with hibernate-core (maybe with jboss?). Check your dependencies and exclude hibernate-core from another dependencies. I had the same error with jboss and hibernate-search (it depends on hibernate-core).
I had the same error, but I solved it. Just remove all hibernate dependencies from your ear, except: hibernate-search, hibernate-search-analyzers. They are already in your AS. For JBoss you can see them here: jboss_home/common/lib
精彩评论