Hii,
after adding Hibernate OGM 5 CR1, iam getting multiple exceptions after adding the dependency jars by changing the versions...
org/hibernate/boot/registry/classloading/spi/ClassLoaderService
org/hibernate/metamodel/source/XsdException
org/hibernate/engine/jndi/JndiNameException
org/hibernate/resource/transaction/TransactionCoordinatorBuilder
Hibernate dependency jars that iam using are:
Code:
<dependency>
<groupId>org.mongodb</groupId>
<artifactId>mongo-java-driver</artifactId>
<version>3.2.2</version>
</dependency>
<dependency>
<groupId>org.hibernate.ogm</groupId>
<artifactId>hibernate-ogm-mongodb</artifactId>
<version>4.2.0.Final</version>
</dependency>
<dependency>
<groupId>org.hibernate.ogm</groupId>
<artifactId>hibernate-ogm-core</artifactId>
<version>5.0.0.CR1</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>4.0.0.Alpha3</version>
</dependency>
the code is:
Code:
entityManager.getTransaction().begin();
Query desc = entityManager
.createNativeQuery("db.UserFactualContent.update({'TOKEN':'8gphgbceqqlih270b3993mian7'},{'$inc':{'clicks': 1}})");
System.out.println(desc.executeUpdate());
entityManager.getTransaction().commit();
Regards,
Javed.