javax.persistence.PersistenceException

org.hibernate.PropertyAccessException: Could not set field value [TS time:Mon Jun 27 16:46:59 CEST 2016 inc:83] value by reflection : [class com.energielibre.middleware.service.mongodatalayergeneric.beans.EnlFluxF12Entry.sysReadDateTime] setter of com.energielibre.middleware.service.mongodatalayergeneric.beans.EnlFluxF12Entry.sysReadDateTime

Samebug tips0

We couldn't find tips for this exception.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web515

  • via Stack Overflow by Med Besbes
    ,
  • via Unknown by Cary.Yu,
  • Stack trace

    • javax.persistence.PersistenceException: org.hibernate.PropertyAccessException: Could not set field value [TS time:Mon Jun 27 16:46:59 CEST 2016 inc:83] value by reflection : [class com.energielibre.middleware.service.mongodatalayergeneric.beans.EnlFluxF12Entry.sysReadDateTime] setter of com.energielibre.middleware.service.mongodatalayergeneric.beans.EnlFluxF12Entry.sysReadDateTime at org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1692) at org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1619) at org.hibernate.jpa.spi.AbstractEntityManagerImpl.find(AbstractEntityManagerImpl.java:1106) at org.hibernate.jpa.spi.AbstractEntityManagerImpl.find(AbstractEntityManagerImpl.java:1033) at org.hibernate.ogm.jpa.impl.OgmEntityManager.find(OgmEntityManager.java:97) at com.energielibre.middleware.service.mongodatalayergeneric.Tester.main(Tester.java:30) Caused by: org.hibernate.PropertyAccessException: Could not set field value [TS time:Mon Jun 27 16:46:59 CEST 2016 inc:83] value by reflection : [class com.energielibre.middleware.service.mongodatalayergeneric.beans.EnlFluxF12Entry.sysReadDateTime] setter of com.energielibre.middleware.service.mongodatalayergeneric.beans.EnlFluxF12Entry.sysReadDateTime at org.hibernate.property.access.spi.SetterFieldImpl.set(SetterFieldImpl.java:58) at org.hibernate.tuple.entity.AbstractEntityTuplizer.setPropertyValues(AbstractEntityTuplizer.java:607) at org.hibernate.tuple.entity.PojoEntityTuplizer.setPropertyValues(PojoEntityTuplizer.java:220) at org.hibernate.persister.entity.AbstractEntityPersister.setPropertyValues(AbstractEntityPersister.java:4573) at org.hibernate.engine.internal.TwoPhaseLoad.doInitializeEntity(TwoPhaseLoad.java:172) at org.hibernate.engine.internal.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:128) at org.hibernate.ogm.loader.impl.OgmLoader.initializeEntitiesAndCollections(OgmLoader.java:812) at org.hibernate.ogm.loader.impl.OgmLoader.doQuery(OgmLoader.java:393) at org.hibernate.ogm.loader.impl.OgmLoader.doQueryAndInitializeNonLazyCollections(OgmLoader.java:283) at org.hibernate.ogm.loader.impl.OgmLoader.loadEntity(OgmLoader.java:201) at org.hibernate.ogm.loader.impl.OgmLoader.load(OgmLoader.java:157) at org.hibernate.ogm.loader.impl.OgmLoader.load(OgmLoader.java:149) at org.hibernate.ogm.loader.entity.impl.DynamicBatchingEntityLoaderBuilder$DynamicBatchingEntityLoader.load(DynamicBatchingEntityLoaderBuilder.java:116) at org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractEntityPersister.java:3956) at org.hibernate.event.internal.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:508) at org.hibernate.event.internal.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:478) at org.hibernate.event.internal.DefaultLoadEventListener.load(DefaultLoadEventListener.java:219) at org.hibernate.event.internal.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:278) at org.hibernate.event.internal.DefaultLoadEventListener.doOnLoad(DefaultLoadEventListener.java:121) at org.hibernate.event.internal.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:89) at org.hibernate.internal.SessionImpl.fireLoad(SessionImpl.java:1129) at org.hibernate.internal.SessionImpl.access$2600(SessionImpl.java:164) at org.hibernate.internal.SessionImpl$IdentifierLoadAccessImpl.load(SessionImpl.java:2696) at org.hibernate.internal.SessionImpl.get(SessionImpl.java:975) at org.hibernate.engine.spi.SessionDelegatorBaseImpl.get(SessionDelegatorBaseImpl.java:630) at org.hibernate.jpa.spi.AbstractEntityManagerImpl.find(AbstractEntityManagerImpl.java:1075) ... 3 more Caused by: java.lang.IllegalArgumentException: Can not set java.util.Date field com.energielibre.middleware.service.mongodatalayergeneric.beans.EnlFluxF12Entry.sysReadDateTime to org.bson.types.BSONTimestamp at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:167) at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:171) at sun.reflect.UnsafeObjectFieldAccessorImpl.set(UnsafeObjectFieldAccessorImpl.java:81) at java.lang.reflect.Field.set(Field.java:764) at org.hibernate.property.access.spi.SetterFieldImpl.set(SetterFieldImpl.java:38) ... 28 more

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Unknown visitor
    Unknown visitorOnce,
    Unknown visitor
    Unknown visitorOnce,
    PilleoPilleo
    6 times, last one
    HronomHronom
    Once,
    kjhdofjosvskjhdofjosvs
    7 times, last one
    61 more bugmates