0

Using Hibernate OGM, MongoDB and JTA on Glassfish 4.1. When a try to persist a get an error with this:

Caused by: javax.persistence.PersistenceException: org.hibernate.PropertyAccessException: could not get a field value by reflection getter

and

Caused by: java.lang.IllegalArgumentException: Can not set java.lang.String field br.com.juliocnsouza.mongojpaexemple.model.Developer.id to br.com.juliocnsouza.mongojpaexemple.model.Developer
Sanne
  • 6,027
  • 19
  • 34

1 Answers1

0

After try everythig I found on the internet. The solution was stop using Hibernate OGM e try Eclipselink NoSQL. Just added a new dependency and changed some parts of my persistence xml and now its working just fine!

https://wiki.eclipse.org/EclipseLink/Examples/JPA/NoSQL

<dependency> <groupId>org.eclipse.persistence</groupId> <artifactId>org.eclipse.persistence.nosql</artifactId> <version>2.6.0-M3</version> </dependency>

simple exemple project: https://github.com/juliocnsouzadev/hibernateMongoDB/tree/master/OgmJpaMongodbEclipseLink

  • Sorry to hear about these troubles. Could you file an issue in the Hibernate OGM [issue tracker](https://hibernate.atlassian.net/browse/OGM), describing some more details (your entities, the code using them etc)? Then we can take a closer look and provide a fix in case there is a bug. Thanks! – Gunnar Feb 17 '15 at 16:51
  • Ok @Gunnar I'll do it. Thanks. :D – juliocnsouza Feb 18 '15 at 20:25