3
I’m getting an error trying to do deploy of my Wildfly 8 app:
Caused by: org.jboss.as.server.Deployment.Deploymentunitprocessingexception: JBAS011445: Failed to get Adapter for persistence Provider 'org.hibernate.jpa.Hibernatepersistenceprovider'
My persistence.xml :
<persistence-unit name="budget-ds" transaction-type="RESOURCE_LOCAL">
<provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
<jta-data-source>java:jboss/budget-ds</jta-data-source>
<properties>
<property name="jboss.as.jpa.providerModule" value="org.hibernate"/>
<property name="jboss.as.jpa.adapterModule" value="org.jboss.as.jpa.hibernate:4"/>
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQL5InnoDBDialect" />
<property name="hibernate.show_sql" value="true" />
<property name="hibernate.format_sql" value="true" />
<property name="hibernate.hbm2ddl.auto" value="update" />
</properties>
</persistence-unit>
I’m using Mysql 5.5, Hibernate 4.1 and Wildfly 8.
Someone knows the cause of the mistake, and how to solve it?
just got confused.. the version of my Hibernate is the: 4.3.1.Final
– Vinícius Carneiro de Brito
@Blacksheep The problem may be caused because Wildfly contains a module with an older version of Hibernate, which is taking precedence over the version in your lib. Check the wildfly directories for the version of Hibernate that comes with it.
– utluiz
in the directory /opt/servers/wildfly-8.0.0.CR1/modules/system/layers/base/org/Hibernate/main Hibernate-core-4.3.0.Final
– Vinícius Carneiro de Brito
@Blacksheep I did a search for "Failed to get Adapter for persistence Provider" and nothing relevant appears. Without the application in hand to snoop around it is difficult to help. I would start by reviewing these properties of Hibernate. Look this link. Try to remove these properties
jboss.jpa.*
. Also try to addjboss.as.jpa.managed
worthwhilefalse
.– utluiz
changed my persitence.XML, took this line here: <Property name="jboss.as.jpa.adapterModule" value="org.jboss.as.jpa.Hibernate:4"/> !!!
– Vinícius Carneiro de Brito
@Blacksheep Legal. I had no way to test it, but I figured tampering with these properties could result in something, so I put the last comment on removing the properties
jboss.as.jpa.*
(had misspelled). Anyway, I updated the answer so that someone who finds this question can get help more easily.– utluiz