-
1. Re: Deploy a war with hibernate-ogm
davided80 Feb 14, 2017 6:04 AM (in response to fpezzati)Hi,
I think you need to set the properties under the paragraph "Persistence unit properties" in the following link: JPA Reference Guide - WildFly 10 - Project Documentation Editor
Basically, you need to tell WildFly that you want to use the JPA implementation is in your application.
This porperty should be enough: jboss.as.jpa.providerModule
We don't have a test for this use case at the moment. Please, let us know if it doesn't work and will have a deeper look into it.
-
2. Re: Deploy a war with hibernate-ogm
fpezzati Feb 14, 2017 8:56 AM (in response to davided80)Hello Davide,
thanks for your reply. I got your tip, here is my persistence.xml:
<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns="http://xmlns.jcp.org/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence
http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd"
version="2.1">
<persistence-unit name="yodb" transaction-type="RESOURCE_LOCAL">
<provider>org.hibernate.ogm.jpa.HibernateOgmPersistence</provider>
<class>edu.pezzati.yo.offer.model.Offer</class>
<properties>
<property name="hibernate.ogm.datastore.provider" value="mongodb" />
<property name="hibernate.ogm.datastore.database" value="yodb" />
<property name="hibernate.ogm.datastore.create_database" value="true" />
<property name="jboss.as.jpa.providerModule" value="application" />
<!--
<property name="jboss.as.jpa.providerModule" value="org.hibernate:5.0.3.Final" />
-->
</properties>
</persistence-unit>
</persistence>
but I am still facing the same error. I updated my git sandbox if you want to take a look.
Francesco
-
3. Re: Deploy a war with hibernate-ogm
davided80 Feb 14, 2017 9:39 AM (in response to fpezzati)Thanks,
I would like to have a look at the sandbox.
Where can I find it?
-
4. Re: Deploy a war with hibernate-ogm
fpezzati Feb 14, 2017 10:53 AM (in response to davided80)It is the link in the first post. Thankyou Davide.