net.sf.hibernate.PropertyAccessException: IllegalArgumentException occurred calling getter of Actor.id

Hibernate JIRA | Kai Prünte | 1 decade ago
  1. 0

    After updateing from 2.0.2 to 2.2 I have got strange problems with joined subclasses. After creating some classes and insert it into a Hibernate session, I get during commit an exception (see below). However if I exchange my log4j.xml by a log4j.properties everything is working well! I know it sounds strange, so I will attach the example to this issue. DEBUG 13:40:26.200 Flushed: 6 (re)creations, 0 updates, 0 removals to 6 collections DEBUG 13:40:26.210 listing entities: ERROR 13:40:26.220 IllegalArgumentException in class: Actor, getter method of property: id Problems during configuring Hibernate! net.sf.hibernate.PropertyAccessException: IllegalArgumentException occurred calling getter of Actor.id net.sf.hibernate.PropertyAccessException: IllegalArgumentException occurred calling getter of Actor.id at net.sf.hibernate.property.BasicPropertyAccessor$BasicGetter.get(BasicPropertyAccessor.java:110) at net.sf.hibernate.persister.AbstractEntityPersister.getIdentifier(AbstractEntityPersister.java:303) at net.sf.hibernate.proxy.HibernateProxyHelper.getIdentifier(HibernateProxyHelper.java:50) at net.sf.hibernate.type.EntityType.toString(EntityType.java:84) at net.sf.hibernate.type.PersistentCollectionType.toString(PersistentCollectionType.java:81) at net.sf.hibernate.impl.Printer.toString(Printer.java:49) at net.sf.hibernate.impl.Printer.toString(Printer.java:82) at net.sf.hibernate.impl.SessionImpl.flushEverything(SessionImpl.java:2226) at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2184) at net.sf.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:61) at JoinedActor.testSearchUser(JoinedActor.java:45) at JoinedActor.main(JoinedActor.java:84) Caused by: java.lang.IllegalArgumentException: object is not an instance of declaring class at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at net.sf.hibernate.property.BasicPropertyAccessor$BasicGetter.get(BasicPropertyAccessor.java:96) ... 11 more

    Hibernate JIRA | 1 decade ago | Kai Prünte
    net.sf.hibernate.PropertyAccessException: IllegalArgumentException occurred calling getter of Actor.id
  2. 0

    After updateing from 2.0.2 to 2.2 I have got strange problems with joined subclasses. After creating some classes and insert it into a Hibernate session, I get during commit an exception (see below). However if I exchange my log4j.xml by a log4j.properties everything is working well! I know it sounds strange, so I will attach the example to this issue. DEBUG 13:40:26.200 Flushed: 6 (re)creations, 0 updates, 0 removals to 6 collections DEBUG 13:40:26.210 listing entities: ERROR 13:40:26.220 IllegalArgumentException in class: Actor, getter method of property: id Problems during configuring Hibernate! net.sf.hibernate.PropertyAccessException: IllegalArgumentException occurred calling getter of Actor.id net.sf.hibernate.PropertyAccessException: IllegalArgumentException occurred calling getter of Actor.id at net.sf.hibernate.property.BasicPropertyAccessor$BasicGetter.get(BasicPropertyAccessor.java:110) at net.sf.hibernate.persister.AbstractEntityPersister.getIdentifier(AbstractEntityPersister.java:303) at net.sf.hibernate.proxy.HibernateProxyHelper.getIdentifier(HibernateProxyHelper.java:50) at net.sf.hibernate.type.EntityType.toString(EntityType.java:84) at net.sf.hibernate.type.PersistentCollectionType.toString(PersistentCollectionType.java:81) at net.sf.hibernate.impl.Printer.toString(Printer.java:49) at net.sf.hibernate.impl.Printer.toString(Printer.java:82) at net.sf.hibernate.impl.SessionImpl.flushEverything(SessionImpl.java:2226) at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2184) at net.sf.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:61) at JoinedActor.testSearchUser(JoinedActor.java:45) at JoinedActor.main(JoinedActor.java:84) Caused by: java.lang.IllegalArgumentException: object is not an instance of declaring class at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at net.sf.hibernate.property.BasicPropertyAccessor$BasicGetter.get(BasicPropertyAccessor.java:96) ... 11 more

    Hibernate JIRA | 1 decade ago | Kai Prünte
    net.sf.hibernate.PropertyAccessException: IllegalArgumentException occurred calling getter of Actor.id
  3. 0

    Hibernate Community • View topic - IllegalArgumentException occurred calling getter...

    hibernate.org | 1 year ago
    org.hibernate.PropertyAccessException: IllegalArgumentException occurred calling getter of com.hibernate.Comment.Item
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Surprised By Source Code Annotation Behavior

    wpthm.com | 1 year ago
    java.lang.IllegalArgumentException: object is not an instance of declaring class
  6. 0

    Java.lang.IllegalArgumentException:object is not an instance of declaring class from JAX-RPC client - scriptscoop.com

    iswwwup.com | 1 year ago
    java.lang.IllegalArgumentException: object is not an instance of declaring class

  1. Aria Pahlavan 16 times, last 3 weeks ago
  2. kjhdofjosvs 2 times, last 1 month ago
  3. tyson925 2 times, last 1 month ago
  4. kuldeep 2 times, last 2 months ago
  5. aldrinleal 1 times, last 5 months ago
6 more registered users
72 unregistered visitors
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

    object is not an instance of declaring class

    at sun.reflect.NativeMethodAccessorImpl.invoke0()
  2. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    4. java.lang.reflect.Method.invoke(Method.java:324)
    4 frames
  3. net.sf.hibernate
    JDBCTransaction.commit
    1. net.sf.hibernate.property.BasicPropertyAccessor$BasicGetter.get(BasicPropertyAccessor.java:96)
    2. net.sf.hibernate.persister.AbstractEntityPersister.getIdentifier(AbstractEntityPersister.java:303)
    3. net.sf.hibernate.proxy.HibernateProxyHelper.getIdentifier(HibernateProxyHelper.java:50)
    4. net.sf.hibernate.type.EntityType.toString(EntityType.java:84)
    5. net.sf.hibernate.type.PersistentCollectionType.toString(PersistentCollectionType.java:81)
    6. net.sf.hibernate.impl.Printer.toString(Printer.java:49)
    7. net.sf.hibernate.impl.Printer.toString(Printer.java:82)
    8. net.sf.hibernate.impl.SessionImpl.flushEverything(SessionImpl.java:2226)
    9. net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2184)
    10. net.sf.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:61)
    10 frames
  4. Unknown
    JoinedActor.main
    1. JoinedActor.testSearchUser(JoinedActor.java:45)
    2. JoinedActor.main(JoinedActor.java:84)
    2 frames