<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">

<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>

                                <td>

                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="http://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>

                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px;  -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
    Hibernate 3 validation: Unable to find a default provider
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="http://community.jboss.org/people/guinotphil">guinotphil</a> in <i>JBoss AS7 Development</i> - <a href="http://community.jboss.org/message/619053#619053">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p>Hello !</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>I'm trying to deploy an EAR application running on Hibernate 3.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span>I've been following the steps on </span><a class="jive-link-external-small" href="https://docs.jboss.org/author/display/AS7/JPA+Reference+Guide" target="_blank">https://docs.jboss.org/author/display/AS7/JPA+Reference+Guide</a><span> by adding a module org.hibernate3 and adding in my persitence.xml:</span></p><p>&lt;property name=<span class="code-quote">"jboss.as.jpa.providerModule"</span> value=<span class="code-quote">"org.hibernate3"</span>/&gt;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>My module org.hibernate3 contains the following jar and dependencies:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span style="font-family: courier new,courier; font-size: 8pt;">&lt;module xmlns="urn:jboss:module:1.0" name="org.hibernate3"&gt;</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">&#160;&#160;&#160; &lt;resources&gt;</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;resource-root path="hibernate-core-3.6.6.Final.jar"/&gt;</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;resource-root path="hibernate-entitymanager-3.6.6.Final.jar"/&gt;</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;resource-root path="hibernate-validator-3.1.0.GA.jar"/&gt;</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;resource-root path="hibernate-commons-annotations-3.2.0.Final.jar"/&gt;</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;!-- Insert resources here --&gt;</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">&#160;&#160;&#160; &lt;/resources&gt;</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span style="font-family: courier new,courier; font-size: 8pt;">&#160;&#160;&#160; &lt;dependencies&gt;</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;module name="asm.asm"/&gt;</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;module name="javax.api"/&gt;</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;module name="javax.persistence.api"/&gt;</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;module name="javax.transaction.api"/&gt;</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;module name="javax.validation.api"/&gt;</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;module name="org.antlr"/&gt;</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;module name="org.apache.ant"/&gt;</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;module name="org.apache.commons.collections"/&gt;</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;module name="org.dom4j"/&gt;</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;module name="org.infinispan"/&gt;</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;module name="org.javassist"/&gt;</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;module name="org.jboss.as.jpa.hibernate3"/&gt;</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;module name="org.jboss.logging"/&gt;</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;module name="org.slf4j"/&gt;</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">&#160;&#160;&#160; &lt;/dependencies&gt;</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">&lt;/module&gt;</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>My trouble is that when I try to deploy the application I get the following error:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span style="font-family: courier new,courier; font-size: 8pt;">javax.persistence.PersistenceException: [PersistenceUnit: entityManagerFactory] Unable to configure EntityManagerFactory</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">&#160;&#160;&#160; at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:378) [hibernate-entitymanager-3.6.6.Final.jar:3.6.6.Final]</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">&#160;&#160;&#160; at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:56) [hibernate-entitymanager-3.6.6.Final.jar:3.6.6.Final]</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">&#160;&#160;&#160; at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:63) [hibernate-jpa-2.0-api-1.0.1.Final.jar:1.0.1.Final]</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">&#160;&#160;&#160; at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:47) [hibernate-jpa-2.0-api-1.0.1.Final.jar:1.0.1.Final]</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">&#160;&#160;&#160; at org.jboss.seam.persistence.EntityManagerFactory.createEntityManagerFactory(EntityManagerFactory.java:81) [jboss-seam.jar:]</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">&#160;&#160;&#160; at org.jboss.seam.persistence.EntityManagerFactory.startup(EntityManagerFactory.java:50) [jboss-seam.jar:]</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">&#160;&#160;&#160; at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_22]</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">&#160;&#160;&#160; at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_22]</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">&#160;&#160;&#160; at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_22]</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">&#160;&#160;&#160; at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_22]</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">&#160;&#160;&#160; at org.jboss.seam.util.Reflections.invoke(Reflections.java:22) [jboss-seam.jar:]</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">&#160;&#160;&#160; at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:144) [jboss-seam.jar:]</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">&#160;&#160;&#160; at org.jboss.seam.Component.callComponentMethod(Component.java:2257) [jboss-seam.jar:]</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">&#160;&#160;&#160; at org.jboss.seam.Component.callCreateMethod(Component.java:2172) [jboss-seam.jar:]</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">&#160;&#160;&#160; at org.jboss.seam.Component.newInstance(Component.java:2132) [jboss-seam.jar:]</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">&#160;&#160;&#160; ... 63 more</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">Caused by: org.hibernate.HibernateException: Unable to get the default Bean Validation factory</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">&#160;&#160;&#160; at org.hibernate.cfg.beanvalidation.BeanValidationActivator.applyDDL(BeanValidationActivator.java:127) [hibernate-core-3.6.6.Final.jar:3.6.6.Final]</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">&#160;&#160;&#160; at org.hibernate.cfg.Configuration.applyBeanValidationConstraintsOnDDL(Configuration.java:1704) [hibernate-core-3.6.6.Final.jar:3.6.6.Final]</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">&#160;&#160;&#160; at org.hibernate.cfg.Configuration.applyConstraintsToDDL(Configuration.java:1654) [hibernate-core-3.6.6.Final.jar:3.6.6.Final]</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">&#160;&#160;&#160; at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1445) [hibernate-core-3.6.6.Final.jar:3.6.6.Final]</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">&#160;&#160;&#160; at org.hibernate.cfg.Configuration.buildMappings(Configuration.java:1375) [hibernate-core-3.6.6.Final.jar:3.6.6.Final]</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">&#160;&#160;&#160; at org.hibernate.ejb.Ejb3Configuration.buildMappings(Ejb3Configuration.java:1519) [hibernate-entitymanager-3.6.6.Final.jar:3.6.6.Final]</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">&#160;&#160;&#160; at org.hibernate.ejb.EventListenerConfigurator.configure(EventListenerConfigurator.java:193) [hibernate-entitymanager-3.6.6.Final.jar:3.6.6.Final]</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">&#160;&#160;&#160; at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:1100) [hibernate-entitymanager-3.6.6.Final.jar:3.6.6.Final]</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">&#160;&#160;&#160; at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:282) [hibernate-entitymanager-3.6.6.Final.jar:3.6.6.Final]</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">&#160;&#160;&#160; at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:366) [hibernate-entitymanager-3.6.6.Final.jar:3.6.6.Final]</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">&#160;&#160;&#160; ... 77 more</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">Caused by: java.lang.reflect.InvocationTargetException</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">&#160;&#160;&#160; at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_22]</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">&#160;&#160;&#160; at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_22]</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">&#160;&#160;&#160; at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_22]</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">&#160;&#160;&#160; at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_22]</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">&#160;&#160;&#160; at org.hibernate.cfg.beanvalidation.BeanValidationActivator.applyDDL(BeanValidationActivator.java:118) [hibernate-core-3.6.6.Final.jar:3.6.6.Final]</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">&#160;&#160;&#160; ... 86 more</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">Caused by: org.hibernate.HibernateException: Unable to build the default ValidatorFactory</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">&#160;&#160;&#160; at org.hibernate.cfg.beanvalidation.TypeSafeActivator.getValidatorFactory(TypeSafeActivator.java:383) [hibernate-core-3.6.6.Final.jar:3.6.6.Final]</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">&#160;&#160;&#160; at org.hibernate.cfg.beanvalidation.TypeSafeActivator.applyDDL(TypeSafeActivator.java:109) [hibernate-core-3.6.6.Final.jar:3.6.6.Final]</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">&#160;&#160;&#160; ... 91 more</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">Caused by: javax.validation.ValidationException: Unable to find a default provider</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">&#160;&#160;&#160; at javax.validation.Validation$GenericBootstrapImpl.configure(Validation.java:264) [validation-api-1.0.0.GA.jar:]</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">&#160;&#160;&#160; at javax.validation.Validation.buildDefaultValidatorFactory(Validation.java:111) [validation-api-1.0.0.GA.jar:]</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">&#160;&#160;&#160; at org.hibernate.cfg.beanvalidation.TypeSafeActivator.getValidatorFactory(TypeSafeActivator.java:380) [hibernate-core-3.6.6.Final.jar:3.6.6.Final]</span></p><p><span style="font-family: courier new,courier; font-size: 8pt;">&#160;&#160;&#160; ... 92 more</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>I've <span style="font-family: arial,helvetica,sans-serif; font-size: 10pt;">also tried to upgrade hibernate-validator to hibernate-val</span>idator-4.2.0.Final.jar + hibernate-validator-legacy-4.0.2.GA.jar, but I'm still getting the same error.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Is there a way to make validation working with Hibernate 3 on JBoss AS 7 ? Or should I disable validation (how?) ?</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Thank you very much !</p></div>

<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style="margin: 0;">Reply to this message by <a href="http://community.jboss.org/message/619053#619053">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in JBoss AS7 Development at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2225">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


                </td>
            </tr>
        </tbody>
    </table>

</div>

</body>
</html>