Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3242292
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T18:17:53+00:00 2026-05-17T18:17:53+00:00

How do I cure the cause of the occasional exception IllegalArgumentException occurred while calling

  • 0

How do I cure the cause of the occasional exception IllegalArgumentException occurred while calling setter that Hibernate throws when my program attempts to load a user by name from the database?

Am I incorrectly mapping column USER_RV in table User to class Integer instead of BigDecimal or some other integer type? Note that the same application maps NUMBER columns in other tables to Integer objects, but Hibernate does not throw this exception when populating an object with a row from those tables.

Further note that the program enables RMI cache replication for the User cache only. Might this exception be related to cache replication? Is it a bug in Ehcache or Hibernate?

Caused by: org.springframework.orm.hibernate3.HibernateSystemException: IllegalArgumentException occurred while calling setter of com.db.spgit.abstrack.model.User.rv; nested exception is org.hibernate.PropertyAccessException: IllegalArgumentException occurred while calling setter of com.db.spgit.abstrack.model.User.rv
    at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:676)
    at org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:412)
    at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:424)
    at org.springframework.orm.hibernate3.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:374)
    at org.springframework.orm.hibernate3.HibernateTemplate.findByCriteria(HibernateTemplate.java:1055)
    at org.springframework.orm.hibernate3.HibernateTemplate.findByCriteria(HibernateTemplate.java:1048)
    at com.db.abstrack.dao.hibernate.AbstrackDaoHibernate.findByCriteria(AbstrackDaoHibernate.java:57)
    at com.db.abstrack.dao.hibernate.UserDaoHibernate.loadByName(UserDaoHibernate.java:63)
    at com.db.spgit.abstrack.manager.QuoteManager.populateUser(QuoteManager.java:330)
    at com.db.spgit.abstrack.manager.QuoteManager.populateOwnerUK(QuoteManager.java:307)
    at com.db.spgit.abstrack.manager.QuoteManager.populateGuids(QuoteManager.java:254)
    at com.db.spgit.abstrack.manager.QuoteManager.addQuoteReturnVwRfqUK(QuoteManager.java:429)
    at com.db.spgit.abstrack.manager.QuoteManager$$FastClassByCGLIB$$d817accb.invoke(<generated>)
    at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
    at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:700)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
    at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:635)
    at com.db.spgit.abstrack.manager.QuoteManager$$EnhancerByCGLIB$$cc8d0025.addQuoteReturnVwRfqUK(<generated>)
    at com.db.abstrack.ejb.RfqBean.addRfqDraftListUK(RfqBean.java:370)
    ... 59 more
Caused by: org.hibernate.PropertyAccessException: IllegalArgumentException occurred while calling setter of com.db.spgit.abstrack.model.User.rv
    at org.hibernate.property.BasicPropertyAccessor$BasicSetter.set(BasicPropertyAccessor.java:104)
    at org.hibernate.tuple.entity.AbstractEntityTuplizer.setPropertyValues(AbstractEntityTuplizer.java:337)
    at org.hibernate.tuple.entity.PojoEntityTuplizer.setPropertyValues(PojoEntityTuplizer.java:200)
    at org.hibernate.persister.entity.AbstractEntityPersister.setPropertyValues(AbstractEntityPersister.java:3514)
    at org.hibernate.cache.entry.CacheEntry.assemble(CacheEntry.java:116)
    at org.hibernate.cache.entry.CacheEntry.assemble(CacheEntry.java:82)
    at org.hibernate.event.def.DefaultLoadEventListener.assembleCacheEntry(DefaultLoadEventListener.java:553)
    at org.hibernate.event.def.DefaultLoadEventListener.loadFromSecondLevelCache(DefaultLoadEventListener.java:508)
    at org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:357)
    at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:139)
    at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:179)
    at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:103)
    at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:878)
    at org.hibernate.impl.SessionImpl.internalLoad(SessionImpl.java:846)
    at org.hibernate.type.EntityType.resolveIdentifier(EntityType.java:557)
    at org.hibernate.type.ManyToOneType.assemble(ManyToOneType.java:196)
    at org.hibernate.cache.StandardQueryCache.get(StandardQueryCache.java:130)
    at org.hibernate.loader.Loader.getResultFromQueryCache(Loader.java:2152)
    at org.hibernate.loader.Loader.listUsingQueryCache(Loader.java:2117)
    at org.hibernate.loader.Loader.list(Loader.java:2087)
    at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:95)
    at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1569)
    at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:283)
    at org.springframework.orm.hibernate3.HibernateTemplate$36.doInHibernate(HibernateTemplate.java:1065)
    at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:419)
    ... 77 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@6be0d6
    at sun.reflect.GeneratedMethodAccessor104.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.hibernate.property.BasicPropertyAccessor$BasicSetter.set(BasicPropertyAccessor.java:42)
    ... 101 more

Definition of class User:

@Entity
@Proxy(lazy=false)
@Cache(usage=CacheConcurrencyStrategy.TRANSACTIONAL)
@Table(name="TB_USER"
    ,schema="ABSOL_USER"
)
public class User  implements java.io.Serializable {
     private String id;
     private String userName;
     private Integer rv;

     public User() {
     }

     public User(String userName, Integer rv) {
        this.userName = userName;
        this.rv = rv;
     }

     @GenericGenerator(name="generator", strategy="guid")@Id @GeneratedValue(generator="generator")

     @Column(name="USER_ID", unique=true, nullable=false)
     public String getId() {
         return this.id;
     }

     public void setId(String id) {
         this.id = id;
     }

     @Column(name="USER_NAME", nullable=false, length=20)
     public String getUserName() {
         return this.userName;
     }

     public void setUserName(String userName) {
         this.userName = userName;
     }

     @Column(name="USER_RV", precision=22, scale=0)
     public Integer getRv() {
         return this.rv;
     }

     public void setRv(Integer rv) {
         this.rv = rv;
     }
}

Definition of table TB_USER:

CREATE TABLE "ABSOL_OWNER"."TB_USER" (
   "USER_ID" RAW(16) DEFAULT SYS_GUID(), 
   "USER_NAME" VARCHAR2(20 CHAR) NOT NULL ENABLE, 
   "USER_RV" NUMBER NOT NULL ENABLE, 
   PRIMARY KEY ("USER_ID")
)

Environment:

  • Hibernate 3.3.2.GA
  • Ehcache 2.2.0
  • WebLogic Server 10.3.2
  • Oracle database
  • Caching User objects
  • Enabled RMI cache replication via remote key invalidation
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T18:17:53+00:00Added an answer on May 17, 2026 at 6:17 pm

    It turns out that this exception is due to a bug in Hibernate. One of my teammates found a related bug report, Re-assembling entity from clustered JBoss Cache may fail with “argument type mismatch”, that occurs when using Hibernate and JBoss Cache.

    According to the report, setting Hibernate property hibernate.cache.use_structured_entries to true avoids the exception. According to the Hibernate documentation, this property “forces Hibernate to store data in the second-level cache in a more human-friendly format”. Apparently, structured cache entries also ensure that Hibernate correctly maps properties of an object in the second-level cache to the corresponding property in an entity.

    Javalobby has an interesting article that explains how Hibernate uses the second-level cache.

    Do versions of Hibernate after 3.3.2GA also exhibit this behaviour?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

http://cure.org/brant/ On the right side of the page, I have some text getting cut
I am looking for a way to cure at least the symptoms of a
So I have a simple flickr image feed on http://cure.org/ just above the footer.
I would like to know if there's a compiler option that could allow me
I hope that this one is not going to be ask-and-answer question... here goes:
I recently ran against a very interesting site that expresses a very interesting idea
Should the name of command line options for a program in a POSIX-style operating
There is a virus in our network that sets all root directories attributes hidden
How can I find what's hanging all new installations on a Windows box? While
i have a little trouble while making my first play application. I got a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.