title: hibernate ogm Could not obtain JBoss Transactions transaction manager instance
body: <p>I'm trying to run hibernate ogm in standalone mode (not jee container).
  my persistence.xml file is the following</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;persistence xmlns="http://java.sun.com/xml/ns/persistence"
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
               version="2.0"&gt;
  
      &lt;persistence-unit name="primary" transaction-type="JTA"&gt;
          &lt;!-- Use Hibernate OGM provider: configuration will be transparent --&gt;
          &lt;provider&gt;org.hibernate.ogm.jpa.HibernateOgmPersistence&lt;/provider&gt;
          &lt;properties&gt;
               &lt;property name="hibernate.ogm.datastore.provider" value="infinispan"/&gt;
                &lt;property name="hibernate.ogm.mongodb.database" value="Heroku Read Only"/&gt;
                &lt;property name="hibernate.ogm.mongodb.host" value="host"/&gt;
                &lt;property name="hibernate.ogm.mongodb.port" value="99999"/&gt;
                &lt;property name="hibernate.ogm.mongodb.username" value="user"/&gt;
                &lt;property name="hibernate.ogm.mongodb.password" value="pass"/&gt;
          &lt;/properties&gt;
      &lt;/persistence-unit&gt;
  &lt;/persistence&gt;
  </code></pre>
  
  <p>in my main i added the following code </p>
  
  <pre><code>private static EntityManagerFactory entityManagerFactory;
  public static void main(String[] args){
         entityManagerFactory = Persistence.createEntityManagerFactory( "primary" );
         EntityManager entityManager = entityManagerFactory.createEntityManager();
  }
  </code></pre>
  
  <p>when I run my main I get the following exception</p>
  
  <blockquote>
    <p>Exception in thread "main"
    org.hibernate.engine.transaction.jta.platform.spi.JtaPlatformException:
    Could not obtain JBoss Transactions transaction manager instance</p>
  </blockquote>
  
  <p>here after all the log</p>
  
  <pre><code>janv. 06, 2017 5:04:13 PM org.hibernate.jpa.internal.util.LogHelper logPersistenceUnitInformation INFO: HHH000204: Processing PersistenceUnitInfo [
          name: primary
          ...] janv. 06, 2017 5:04:13 PM org.hibernate.Version logVersion INFO: HHH000412: Hibernate Core {5.0.1.Final} janv. 06, 2017 5:04:13 PM org.hibernate.cfg.Environment &lt;clinit&gt; INFO: HHH000206: hibernate.properties not found janv. 06, 2017 5:04:13 PM org.hibernate.cfg.Environment buildBytecodeProvider INFO: HHH000021: Bytecode provider name : javassist janv. 06, 2017 5:04:13 PM org.hibernate.annotations.common.reflection.java.JavaReflectionManager &lt;clinit&gt; INFO: HCANN000001: Hibernate Commons Annotations {5.0.1.Final} janv. 06, 2017 5:04:15 PM org.hibernate.ogm.datastore.impl.DatastoreProviderInitiator initiateService INFO: OGM000016: NoSQL Datastore provider: org.hibernate.ogm.datastore.infinispan.impl.InfinispanDatastoreProvider janv. 06, 2017 5:04:15 PM org.hibernate.ogm.transaction.impl.OgmJtaPlatformInitiator initiateService INFO: OGM000075: JBoss Transaction Manager (com.arjuna.ats.jta.TransactionManager) detected on classpath. Using JBossStandAloneJtaPlatform as JTAPlatform implementation janv. 06, 2017 5:04:15 PM org.hibernate.ogm.dialect.impl.GridDialectInitiator$GridDialectInstantiator newInstance INFO: OGM000017: Grid Dialect: org.hibernate.ogm.datastore.infinispan.InfinispanDialect janv. 06, 2017 5:04:15 PM org.hibernate.ogm.dialect.impl.GridDialectInitiator$GridDialectInstantiator newInstance INFO: Grid dialect logs are disabled janv. 06, 2017 5:04:15 PM org.hibernate.dialect.Dialect &lt;init&gt; INFO: HHH000400: Using dialect: org.hibernate.ogm.dialect.impl.OgmDialect janv. 06, 2017 5:04:15 PM org.hibernate.engine.jdbc.env.internal.LobCreatorBuilderImpl makeLobCreatorBuilder INFO: HHH000422: Disabling contextual LOB creation as connection was null janv. 06, 2017 5:04:15 PM org.hibernate.ogm.cfg.impl.Version &lt;clinit&gt; INFO: OGM000001: Hibernate OGM 5.0.0.CR1 Exception in thread "main" org.hibernate.engine.transaction.jta.platform.spi.JtaPlatformException: Could not obtain JBoss Transactions transaction manager instance
          at org.hibernate.engine.transaction.jta.platform.internal.JBossStandAloneJtaPlatform.locateTransactionManager(JBossStandAloneJtaPlatform.java:35)
          at org.hibernate.engine.transaction.jta.platform.internal.AbstractJtaPlatform.retrieveTransactionManager(AbstractJtaPlatform.java:87)
          at org.hibernate.engine.transaction.jta.platform.internal.AbstractJtaPlatform.getTransactionManager(AbstractJtaPlatform.java:98)
          at org.hibernate.engine.transaction.jta.platform.internal.TransactionManagerBasedSynchronizationStrategy.canRegisterSynchronization(TransactionManagerBasedSynchronizationStrategy.java:39)
          at org.hibernate.engine.transaction.jta.platform.internal.AbstractJtaPlatform.canRegisterSynchronization(AbstractJtaPlatform.java:131)
          at org.hibernate.resource.transaction.backend.jta.internal.JtaTransactionCoordinatorImpl.pulse(JtaTransactionCoordinatorImpl.java:141)
          at org.hibernate.resource.transaction.backend.jta.internal.JtaTransactionCoordinatorImpl.&lt;init&gt;(JtaTransactionCoordinatorImpl.java:92)
          at org.hibernate.resource.transaction.backend.jta.internal.JtaTransactionCoordinatorBuilderImpl.buildTransactionCoordinator(JtaTransactionCoordinatorBuilderImpl.java:28)
          at org.hibernate.internal.SessionImpl.&lt;init&gt;(SessionImpl.java:273)
          at org.hibernate.internal.SessionFactoryImpl$SessionBuilderImpl.openSession(SessionFactoryImpl.java:1322)
          at org.hibernate.ogm.hibernatecore.impl.OgmSessionBuilderDelegator.openSession(OgmSessionBuilderDelegator.java:39)
          at org.hibernate.ogm.hibernatecore.impl.OgmSessionBuilderDelegator.openSession(OgmSessionBuilderDelegator.java:25)
          at org.hibernate.jpa.internal.EntityManagerImpl.internalGetSession(EntityManagerImpl.java:133)
          at org.hibernate.jpa.spi.AbstractEntityManagerImpl.postInit(AbstractEntityManagerImpl.java:174)
          at org.hibernate.jpa.internal.EntityManagerImpl.&lt;init&gt;(EntityManagerImpl.java:83)
          at org.hibernate.jpa.internal.EntityManagerFactoryImpl.internalCreateEntityManager(EntityManagerFactoryImpl.java:319)
          at org.hibernate.jpa.internal.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:286)
          at org.hibernate.ogm.jpa.impl.OgmEntityManagerFactory.createEntityManager(OgmEntityManagerFactory.java:45)
          at com.energielibre.middleware.service.mongodatalayergeneric.Tester.main(Tester.java:26) Caused by: java.lang.reflect.InvocationTargetException
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:498)
          at org.hibernate.engine.transaction.jta.platform.internal.JBossStandAloneJtaPlatform.locateTransactionManager(JBossStandAloneJtaPlatform.java:32)
          ... 18 more Caused by: java.lang.RuntimeException: java.lang.RuntimeException: missing property file arjuna-properties.xml
          at com.arjuna.common.internal.util.propertyservice.BeanPopulator.getNamedInstance(BeanPopulator.java:81)
          at com.arjuna.common.internal.util.propertyservice.BeanPopulator.getDefaultInstance(BeanPopulator.java:49)
          at com.arjuna.ats.jta.common.jtaPropertyManager.getJTAEnvironmentBean(jtaPropertyManager.java:42)
          at com.arjuna.ats.jta.TransactionManager.transactionManager(TransactionManager.java:72)
          ... 23 more Caused by: java.lang.RuntimeException: missing property file arjuna-properties.xml
          at com.arjuna.common.util.propertyservice.PropertiesFactory.getPropertiesFromFile(PropertiesFactory.java:93)
          at com.arjuna.common.util.propertyservice.PropertiesFactory.initDefaultProperties(PropertiesFactory.java:236)
          at com.arjuna.common.util.propertyservice.PropertiesFactory.getDefaultProperties(PropertiesFactory.java:66)
          at com.arjuna.common.internal.util.propertyservice.BeanPopulator.getNamedInstance(BeanPopulator.java:77)
          ... 26 more
  </code></pre>
  
  <p>my dependencies are</p>
  
  <pre><code>&lt;dependencies&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.hibernate.javax.persistence&lt;/groupId&gt;
          &lt;artifactId&gt;hibernate-jpa-2.0-api&lt;/artifactId&gt;
          &lt;version&gt;1.0.1.Final&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;org.jboss.spec.javax.transaction&lt;/groupId&gt;
          &lt;artifactId&gt;jboss-transaction-api_1.1_spec&lt;/artifactId&gt;
          &lt;version&gt;1.0.0.Final&lt;/version&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;!-- JBoss Transactions dependency --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.jboss.jbossts&lt;/groupId&gt;
          &lt;artifactId&gt;jbossjta&lt;/artifactId&gt;
          &lt;version&gt;4.16.4.Final&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;org.hibernate.ogm&lt;/groupId&gt;
          &lt;artifactId&gt;hibernate-ogm-mongodb&lt;/artifactId&gt;
          &lt;version&gt;5.0.0.CR1&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;org.hibernate.common&lt;/groupId&gt;
          &lt;artifactId&gt;hibernate-commons-annotations&lt;/artifactId&gt;
          &lt;version&gt;5.0.1.Final&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.hibernate.ogm&lt;/groupId&gt;
          &lt;artifactId&gt;hibernate-ogm-infinispan&lt;/artifactId&gt;
          &lt;version&gt;5.0.0.Alpha1&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
          &lt;artifactId&gt;hibernate-search-orm&lt;/artifactId&gt;
          &lt;version&gt;5.5.0.Final&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.commons&lt;/groupId&gt;
          &lt;artifactId&gt;commons-io&lt;/artifactId&gt;
          &lt;version&gt;1.3.2&lt;/version&gt;
      &lt;/dependency&gt;
  &lt;/dependencies&gt;
  </code></pre>