Upgraded to 2.2 & broke hibernate 3.6 using JPA in Intellij Idea

100 views
Skip to first unread message

jones34

unread,
Feb 28, 2011, 2:56:31 PM2/28/11
to Google Web Toolkit
I updated to 2.2 and started immediately getting hibernate exceptions
on the first attempt to use the database (see below) in my development
environment Intellij Idea 10.

I suspect that updating stomps something in my classpath or just
reorders the class path in a way that makes hibernate fail. Has anyone
seen this?

Does anyone know which jars/classes might be conflicting?

thanks.

Caused by: javax.persistence.PersistenceException: [PersistenceUnit:
vingenius] Unable to configure EntityManagerFactory
at
org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:
374)
at
org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:
56)
at
javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:
78)
at
javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:
54)
at us.vingeni.vingenius.server.db.DAO.<clinit>(DAO.java:29)
... 32 more
Caused by: org.hibernate.HibernateException: Unable to get the default
Bean Validation factory
at
org.hibernate.cfg.beanvalidation.BeanValidationActivator.applyDDL(BeanValidationActivator.java:
127)
at
org.hibernate.cfg.Configuration.applyBeanValidationConstraintsOnDDL(Configuration.java:
1674)
at
org.hibernate.cfg.Configuration.applyConstraintsToDDL(Configuration.java:
1624)
at
org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:
1415)
at org.hibernate.cfg.Configuration.buildMappings(Configuration.java:
1345)
at
org.hibernate.ejb.Ejb3Configuration.buildMappings(Ejb3Configuration.java:
1477)
at
org.hibernate.ejb.EventListenerConfigurator.configure(EventListenerConfigurator.java:
193)
at
org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:
1096)
at
org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:
278)
at
org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:
362)
... 36 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
at
org.hibernate.cfg.beanvalidation.BeanValidationActivator.applyDDL(BeanValidationActivator.java:
118)
... 45 more
Caused by: org.hibernate.HibernateException: Unable to build the
default ValidatorFactory
at
org.hibernate.cfg.beanvalidation.TypeSafeActivator.getValidatorFactory(TypeSafeActivator.java:
345)
at
org.hibernate.cfg.beanvalidation.TypeSafeActivator.applyDDL(TypeSafeActivator.java:
106)
... 50 more
Caused by: javax.validation.ValidationException: Unable to find a
default provider
at javax.validation.Validation
$GenericBootstrapImpl.configure(Validation.java:264)
at
javax.validation.Validation.buildDefaultValidatorFactory(Validation.java:
111)
at
org.hibernate.cfg.beanvalidation.TypeSafeActivator.getValidatorFactory(TypeSafeActivator.java:
342)
... 51 more

jones34

unread,
Feb 28, 2011, 4:05:45 PM2/28/11
to Google Web Toolkit
It seems like 2.2 (or the upgrade process) triggers in hibernate the
hallucination that I wanted to use bean validation (maybe it's just
the presence of javax.validation in the gwt servlet-dep jar, although
it was present in 2.1 as well).

If you don't want to use hibernate bean validation, you can add this
line to your hibernate persistence.xml file:

<validation-mode>NONE</validation-mode>

And all is well again.
Reply all
Reply to author
Forward
0 new messages