-->
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.  [ 2 posts ] 
Author Message
 Post subject: WHY CGLIB Exception ????
PostPosted: Thu Apr 15, 2004 1:44 am 
Newbie

Joined: Sun Mar 14, 2004 1:37 am
Posts: 4
Location: china
i use Hibernate2.1 and tools.

run ddl2hbm.bat generate java code and hbm xml.

then i choose use hibernate Types to generate code

for emp and dept tables on scott/tiger.

and write 2 method use following query :

Query query = session.createQuery("select t from Emp as t");
Query query = session.createQuery("select t from Dept as t");

and when i list the results. the Dept no problem

but to list the emp occur Exception like this:

net.sf.hibernate.PropertyAccessException:
exception setting property value
with CGLIB
(set hibernate.cglib.use_reflection_optimizer=false for more info)
setter of com.yan.jdo.Emp.setComm

then i re-generate code choose use javaTypes.

and no error occur

_________________
--*--


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 15, 2004 3:40 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
setComm most likely accepts a type which is not compatible with the values Hibernate is trying to set. Most likely it is a int and you have null values in the db.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.