org.springframework.orm.jpa.JpaSystemException: Error accessing field [public java.lang.String com.casa.fabbookingbase.entity.AbstractBookingEntity.roomNightBookingId] by reflection for persistent property [com.casa.fabbookingbase.entity.RoomNightEntity#roomNightBookingId] : 2; nested exception is org.hibernate.property.access.spi.PropertyAccessException: Error accessing field [public java.lang.String com.casa.fabbookingbase.entity.AbstractBookingEntity.roomNightBookingId] by reflection for persistent property [com.casa.fabbookingbase.entity.RoomNightEntity#roomNightBookingId] : 2

Stack Overflow | Naveen Kumar | 1 month ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    Calling a function in JPA 2.1

    Oracle Community | 3 years ago | 78ae01e2-9d58-4fb5-ae1d-7bbee32125ab
    org.springframework.orm.jpa.JpaSystemException: No Dialect mapping for JDBC type: -10; nested exception is org.hibernate.MappingException: No Dialect mapping for JDBC type: -10
  2. 0

    Why does Spring Data give me this reflection exception?

    Stack Overflow | 4 months ago | RhythmicDevil
    org.springframework.orm.jpa.JpaSystemException: Error accessing field [private java.lang.Integer com.etisoftware.workorderprinting.beans.cborg.WorkOrderOwner.number] by reflection for persistent property [com.etisoftware.workorderprinting.beans.cborg.WorkOrderOwner#number] : 1; nested exception is org.hibernate.property.access.spi.PropertyAccessException: Error accessing field [private java.lang.Integer com.etisoftware.workorderprinting.beans.cborg.WorkOrderOwner.number] by reflection for persistent property [com.etisoftware.workorderprinting.beans.cborg.WorkOrderOwner#number] : 1
  3. 0

    Calling a function in JPA 2.1

    techhelpbox.com | 1 year ago
    org.springframework.orm.jpa.JpaSystemException: No Dialect mapping for JDBC type: -10; nested exception is org.hibernate.MappingException: No Dialect mapping for JDBC type: -10
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Calling a function in JPA 2.1 | Oracle Community

    oracle.com | 1 year ago
    org.springframework.orm.jpa.JpaSystemException: No Dialect mapping for JDBC type: -10; nested exception is org.hibernate.MappingException: No Dialect mapping for JDBC type: -10
  6. 0

    Hibernate - map a row to either of two subclasses

    Stack Overflow | 5 years ago | imgr8
    org.springframework.orm.hibernate3.HibernateSystemException: could not set a field value by reflection setter of my.test.Caller.sub2; nested exception is org.hibernate.PropertyAccessException: could not set a field value by reflection setter of my.test.Caller.sub2
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.IllegalArgumentException

    Can not set java.lang.String field com.casa.fabbookingbase.entity.AbstractBookingEntity.roomNightBookingId to java.lang.Long

    at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException()
  2. Java RT
    Field.get
    1. sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:167)
    2. sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:171)
    3. sun.reflect.UnsafeFieldAccessorImpl.ensureObj(UnsafeFieldAccessorImpl.java:58)
    4. sun.reflect.UnsafeObjectFieldAccessorImpl.get(UnsafeObjectFieldAccessorImpl.java:36)
    5. java.lang.reflect.Field.get(Field.java:393)
    5 frames
  3. org.hibernate.property
    GetterFieldImpl.get
    1. org.hibernate.property.access.spi.GetterFieldImpl.get(GetterFieldImpl.java:39)
    1 frame
  4. Hibernate
    QueryImpl.list
    1. org.hibernate.tuple.component.AbstractComponentTuplizer.getPropertyValue(AbstractComponentTuplizer.java:58)
    2. org.hibernate.type.ComponentType.getPropertyValue(ComponentType.java:414)
    3. org.hibernate.type.ComponentType.getHashCode(ComponentType.java:238)
    4. org.hibernate.engine.spi.EntityUniqueKey.generateHashCode(EntityUniqueKey.java:67)
    5. org.hibernate.engine.spi.EntityUniqueKey.<init>(EntityUniqueKey.java:48)
    6. org.hibernate.type.EntityType.loadByUniqueKey(EntityType.java:679)
    7. org.hibernate.type.EntityType.resolve(EntityType.java:427)
    8. org.hibernate.engine.internal.TwoPhaseLoad.doInitializeEntity(TwoPhaseLoad.java:151)
    9. org.hibernate.engine.internal.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:125)
    10. org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:1132)
    11. org.hibernate.loader.Loader.processResultSet(Loader.java:992)
    12. org.hibernate.loader.Loader.doQuery(Loader.java:930)
    13. org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:336)
    14. org.hibernate.loader.Loader.doList(Loader.java:2610)
    15. org.hibernate.loader.Loader.doList(Loader.java:2593)
    16. org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2422)
    17. org.hibernate.loader.Loader.list(Loader.java:2417)
    18. org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:501)
    19. org.hibernate.hql.internal.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:371)
    20. org.hibernate.engine.query.spi.HQLQueryPlan.performList(HQLQueryPlan.java:216)
    21. org.hibernate.internal.SessionImpl.list(SessionImpl.java:1339)
    22. org.hibernate.internal.QueryImpl.list(QueryImpl.java:87)
    22 frames
  5. org.hibernate.jpa
    CriteriaQueryTypeQueryAdapter.getResultList
    1. org.hibernate.jpa.internal.QueryImpl.list(QueryImpl.java:606)
    2. org.hibernate.jpa.internal.QueryImpl.getResultList(QueryImpl.java:483)
    3. org.hibernate.jpa.criteria.compile.CriteriaQueryTypeQueryAdapter.getResultList(CriteriaQueryTypeQueryAdapter.java:50)
    3 frames
  6. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    4. java.lang.reflect.Method.invoke(Method.java:497)
    4 frames
  7. Spring ORM
    SharedEntityManagerCreator$DeferredQueryInvocationHandler.invoke
    1. org.springframework.orm.jpa.SharedEntityManagerCreator$DeferredQueryInvocationHandler.invoke(SharedEntityManagerCreator.java:368)
    1 frame
  8. com.sun.proxy
    $Proxy90.getResultList
    1. com.sun.proxy.$Proxy90.getResultList(Unknown Source)
    1 frame
  9. Spring Data JPA
    AbstractJpaQuery.execute
    1. org.springframework.data.jpa.repository.query.JpaQueryExecution$DeleteExecution.doExecute(JpaQueryExecution.java:275)
    2. org.springframework.data.jpa.repository.query.JpaQueryExecution.execute(JpaQueryExecution.java:82)
    3. org.springframework.data.jpa.repository.query.AbstractJpaQuery.doExecute(AbstractJpaQuery.java:116)
    4. org.springframework.data.jpa.repository.query.AbstractJpaQuery.execute(AbstractJpaQuery.java:106)
    4 frames
  10. Spring Data Core
    RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke
    1. org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.doInvoke(RepositoryFactorySupport.java:482)
    2. org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:460)
    2 frames
  11. Spring AOP
    ReflectiveMethodInvocation.proceed
    1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
    1 frame
  12. org.springframework.data
    DefaultMethodInvokingMethodInterceptor.invoke
    1. org.springframework.data.projection.DefaultMethodInvokingMethodInterceptor.invoke(DefaultMethodInvokingMethodInterceptor.java:61)
    1 frame
  13. Spring AOP
    ReflectiveMethodInvocation.proceed
    1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
    1 frame
  14. Spring Tx
    TransactionInterceptor.invoke
    1. org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
    2. org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)
    3. org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
    3 frames
  15. Spring AOP
    ReflectiveMethodInvocation.proceed
    1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
    1 frame
  16. Spring Tx
    PersistenceExceptionTranslationInterceptor.invoke
    1. org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:136)
    1 frame
  17. Spring AOP
    ReflectiveMethodInvocation.proceed
    1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
    1 frame
  18. Spring Data JPA
    CrudMethodMetadataPostProcessor$CrudMethodMetadataPopulatingMethodInterceptor.invoke
    1. org.springframework.data.jpa.repository.support.CrudMethodMetadataPostProcessor$CrudMethodMetadataPopulatingMethodInterceptor.invoke(CrudMethodMetadataPostProcessor.java:133)
    1 frame
  19. Spring AOP
    JdkDynamicAopProxy.invoke
    1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
    2. org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)
    3. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
    4. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
    4 frames
  20. com.sun.proxy
    $Proxy65.deleteByBookingId
    1. com.sun.proxy.$Proxy65.deleteByBookingId(Unknown Source)
    1 frame
  21. com.casa.fabbooking
    BookingServiceTest.testDeleteBooking
    1. com.casa.fabbooking.service.BookingServiceTest.testDeleteBooking(BookingServiceTest.java:179)
    1 frame
  22. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    4. java.lang.reflect.Method.invoke(Method.java:497)
    4 frames
  23. Spring TestContext
    SpringJUnit4ClassRunner.invokeTestMethod
    1. org.springframework.test.context.junit4.SpringTestMethod.invoke(SpringTestMethod.java:160)
    2. org.springframework.test.context.junit4.SpringMethodRoadie.runTestMethod(SpringMethodRoadie.java:233)
    3. org.springframework.test.context.junit4.SpringMethodRoadie$RunBeforesThenTestThenAfters.run(SpringMethodRoadie.java:333)
    4. org.springframework.test.context.junit4.SpringMethodRoadie.runWithRepetitions(SpringMethodRoadie.java:217)
    5. org.springframework.test.context.junit4.SpringMethodRoadie.runTest(SpringMethodRoadie.java:197)
    6. org.springframework.test.context.junit4.SpringMethodRoadie.run(SpringMethodRoadie.java:143)
    7. org.springframework.test.context.junit4.SpringJUnit4ClassRunner.invokeTestMethod(SpringJUnit4ClassRunner.java:160)
    7 frames
  24. JUnit
    JUnit4ClassRunner.run
    1. org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:51)
    2. org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4ClassRunner.java:44)
    3. org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27)
    4. org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37)
    5. org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4ClassRunner.java:42)
    5 frames
  25. Spring TestContext
    SpringJUnit4ClassRunner.run
    1. org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:97)
    1 frame
  26. JUnit4 Runner
    JUnit4TestReference.run
    1. org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
    1 frame
  27. JUnit3 Runner
    RemoteTestRunner.main
    1. org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    2. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
    3. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
    4. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
    5. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
    5 frames