-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
Author Message
 Post subject: IllegalArgumentException occurred calling getter
PostPosted: Fri Aug 01, 2008 8:03 pm 
Newbie

Joined: Fri Aug 01, 2008 7:25 pm
Posts: 2
Hibernate version:3.2.6.ga

Mapping documents:<hibernate-mapping package="com.cme.cphone.model.config">
<class name="Contact" table="SP_CONTACT_LIST_DETAIL">
<id name="contactId" type="int" column="ID">
<generator class="sequence">
<param name="sequence">CONTACT_LIST_DETAIL_SEQ</param>
</generator>
</id>
<property name="firstName" type="string" column="FIRST_NAME" />
... other properties omitted.
</class>
</hibernate-mapping>


Full stack trace of any exception that occurs:
org.springframework.orm.hibernate3.HibernateSystemException: IllegalArgumentException occurred calling getter of com.cme.cphone.model.config.ModelClass.id; nested exception is org.hibernate.PropertyAccessException: IllegalArgumentException occurred calling getter of com.cme.cphone.model.config.ModelClass.id
at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:661)
at org.springframework.orm.hibernate3.HibernateTransactionManager.convertHibernateAccessException(HibernateTransactionManager.java:738)
at org.springframework.orm.hibernate3.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:614)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:709)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:678)
at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:321)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:116)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy33.saveUserOptions(Lcom.cme.cphone.model.config.UserOptions;)V(Unknown Source)
at com.cme.cphone.controller.UserOptionsUpdateController.handleRequest(UserOptionsUpdateController.java:17)
at com.cme.cphone.base.BasicController.handleRequest(BasicController.java:37)
at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:874)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:808)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:523)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:463)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:223)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
Caused by: org.hibernate.PropertyAccessException: IllegalArgumentException occurred calling getter of com.cme.cphone.model.config.ModelClass.id
at org.hibernate.property.BasicPropertyAccessor$BasicGetter.get(BasicPropertyAccessor.java:171)
at org.hibernate.tuple.entity.AbstractEntityTuplizer.getIdentifier(AbstractEntityTuplizer.java:183)
at org.hibernate.persister.entity.AbstractEntityPersister.getIdentifier(AbstractEntityPersister.java:3596)
at org.hibernate.persister.entity.AbstractEntityPersister.isTransient(AbstractEntityPersister.java:3312)
at org.hibernate.engine.ForeignKeys.isTransient(ForeignKeys.java:181)
at org.hibernate.event.def.AbstractSaveEventListener.getEntityState(AbstractSaveEventListener.java:512)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:80)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:70)
at org.hibernate.impl.SessionImpl.fireSaveOrUpdate(SessionImpl.java:507)
at org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:499)
at org.hibernate.engine.CascadingAction$5.cascade(CascadingAction.java:218)
at org.hibernate.engine.Cascade.cascadeToOne(Cascade.java:268)
at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:216)
at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:169)
at org.hibernate.engine.Cascade.cascade(Cascade.java:130)
at org.hibernate.event.def.AbstractFlushingEventListener.cascadeOnFlush(AbstractFlushingEventListener.java:131)
at org.hibernate.event.def.AbstractFlushingEventListener.prepareEntityFlushes(AbstractFlushingEventListener.java:122)
at org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:65)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:26)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:338)
at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106)
at org.springframework.orm.hibernate3.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:606)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:709)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:678)
at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:321)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:116)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy33.saveUserOptions(Lcom.cme.cphone.model.config.UserOptions;)V(Unknown Source)
at com.cme.cphone.controller.UserOptionsUpdateController.handleRequest(UserOptionsUpdateController.java:17)
at com.cme.cphone.base.BasicController.handleRequest(BasicController.java:37)


Name and version of the database you are using:Oracle 9i

Based on the stack trace, I have no way of knowing which entity is causing the problem. I am updating a fairly sizable object graph without calling either save/saveOrUpdate.

I have a base class called ModelClass from which all classes inherit basic properties which are present in most tables. One of the properties is called id(getId() and setId()). id is a String(legacy database). This one table whose mapping I have given above has an ID column which is an int. I have therefore included a property called contactId in this class which is an int. The id property continues to exist in the class via inheritance. There is no table to which Model is mapped.

The code seems to work fine when I run it on Windows based WebLogic. After moving the code to Linux based WebLogic, I started getting the above error.

The above table used to have the ID column as a varchar2. It was recently changed to an integer. The WebLogic server has been bounced after the change.

Can someone point out what I am doing wrong. Let me know if you need additional code.


Top
 Profile  
 
 Post subject: Problem solved
PostPosted: Mon Aug 04, 2008 5:21 pm 
Newbie

Joined: Fri Aug 01, 2008 7:25 pm
Posts: 2
Found my problem. Nothing to do with Hibernate. Nothing wrong with my mappings/code either. It appears to be a jrockit JVM issue. I reconfigured my WebLogic server on Linux to use the HotSpot JVM from Sun and the problem vanished.

My local installation of WebLogic on Windows was also using the HotSpot JVM so I did not encounter the issue then.

Hope this helps others!


Top
 Profile  
 
 Post subject: same problem
PostPosted: Sun Aug 17, 2008 10:18 pm 
Newbie

Joined: Thu Feb 08, 2007 2:21 am
Posts: 2
i got the same problem in tomcat 6,jdk 6, redhat 64bit.but redhat 32bit was fine.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 20, 2009 4:01 am 
Newbie

Joined: Wed Oct 11, 2006 4:54 am
Posts: 5
same problem here.
Tested with jdk 1.6.6 and 1.6.12 on a winxp32.

Is this a hibernate bug?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.