Uploaded image for project: 'z - Hibernate 2'
  1. HB-557

IllegalArgumentException when using log4j.xml

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Rejected
    • Affects Version/s: 2.1 final
    • Fix Version/s: None
    • Component/s: core
    • Labels:
      None
    • Environment:
      Windows 2000, Java 1.4.2-b28
    • Bug Testcase Reminder (view):

      Bug reports should generally be accompanied by a test case!

    • Last commented by a user?:
      true
    • Sprint:

      Description

      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

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: