com.proinsight.core.KMSException: net.sf.hibernate.PropertyAccessException: IllegalArgumentException occurred calling getter of system.UserSession.id

Hibernate JIRA | Benoit Menendez | 1 decade ago
  1. 0

    I know I shouldn't do this, but I am calling: ClassPersister persister = getPersister(object); Serializable identifier = persister.getIdentifier(object); if (persister.isUnsaved(identifier)) ... where object is declared to have an "assigned" id generator. in AbstractEntityPersister.isUnsaved(Object object) the following lines: ... if ( hasIdentifierPropertyOrEmbeddedCompositeIdentifier() ) { return unsavedIdentifierValue.isUnsaved( getIdentifier(object) ); } ... appear wrong since the unsavedIdentifierValue.isUnsaved needs to be passed the object, not the identifier... Basically the getter method is called on the identifier (a String in this case) and not on the object itself. com.proinsight.core.KMSException: net.sf.hibernate.PropertyAccessException: IllegalArgumentException occurred calling getter of system.UserSession.id at net.sf.hibernate.property.BasicPropertyAccessor$BasicGetter.get(BasicPropertyAccessor.java:110) at net.sf.hibernate.persister.AbstractEntityPersister.getIdentifier(AbstractEntityPersister.java:284) at net.sf.hibernate.persister.AbstractEntityPersister.isUnsaved(AbstractEntityPersister.java:406) ... 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) ...

    Hibernate JIRA | 1 decade ago | Benoit Menendez
    com.proinsight.core.KMSException: net.sf.hibernate.PropertyAccessException: IllegalArgumentException occurred calling getter of system.UserSession.id
  2. 0

    I know I shouldn't do this, but I am calling: ClassPersister persister = getPersister(object); Serializable identifier = persister.getIdentifier(object); if (persister.isUnsaved(identifier)) ... where object is declared to have an "assigned" id generator. in AbstractEntityPersister.isUnsaved(Object object) the following lines: ... if ( hasIdentifierPropertyOrEmbeddedCompositeIdentifier() ) { return unsavedIdentifierValue.isUnsaved( getIdentifier(object) ); } ... appear wrong since the unsavedIdentifierValue.isUnsaved needs to be passed the object, not the identifier... Basically the getter method is called on the identifier (a String in this case) and not on the object itself. com.proinsight.core.KMSException: net.sf.hibernate.PropertyAccessException: IllegalArgumentException occurred calling getter of system.UserSession.id at net.sf.hibernate.property.BasicPropertyAccessor$BasicGetter.get(BasicPropertyAccessor.java:110) at net.sf.hibernate.persister.AbstractEntityPersister.getIdentifier(AbstractEntityPersister.java:284) at net.sf.hibernate.persister.AbstractEntityPersister.isUnsaved(AbstractEntityPersister.java:406) ... 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) ...

    Hibernate JIRA | 1 decade ago | Benoit Menendez
    com.proinsight.core.KMSException: net.sf.hibernate.PropertyAccessException: IllegalArgumentException occurred calling getter of system.UserSession.id

    Root Cause Analysis

    1. com.proinsight.core.KMSException

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

      at net.sf.hibernate.property.BasicPropertyAccessor$BasicGetter.get()
    2. net.sf.hibernate
      AbstractEntityPersister.isUnsaved
      1. net.sf.hibernate.property.BasicPropertyAccessor$BasicGetter.get(BasicPropertyAccessor.java:110)
      2. net.sf.hibernate.persister.AbstractEntityPersister.getIdentifier(AbstractEntityPersister.java:284)
      3. net.sf.hibernate.persister.AbstractEntityPersister.isUnsaved(AbstractEntityPersister.java:406)
      3 frames