-->
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.  [ 3 posts ] 
Author Message
 Post subject: problem with CGLIB when use session.load()
PostPosted: Mon May 31, 2004 10:31 am 
Newbie

Joined: Mon May 31, 2004 10:17 am
Posts: 3
good morning for all!
sorry, but my english is not very well (if anybody knows portuguese of brazil tell me! :) )


hibernate 2.1.3
sqlserver


im having a litle problem when i make session.load with hibernate


Code:
net.sf.hibernate.PropertyAccessException: exception setting property value with CGLIB (set hibernate.cglib.use_reflection_optimizer=false for more info) setter of Produto.setDesc
   at net.sf.hibernate.persister.AbstractEntityPersister.setPropertyValues(AbstractEntityPersister.java:212)
   at net.sf.hibernate.impl.SessionImpl.initializeEntity(SessionImpl.java:2199)
   at net.sf.hibernate.loader.Loader.doQuery(Loader.java:240)
   at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:133)
   at net.sf.hibernate.loader.Loader.loadEntity(Loader.java:836)
   at net.sf.hibernate.loader.Loader.loadEntity(Loader.java:856)
   at net.sf.hibernate.loader.EntityLoader.load(EntityLoader.java:59)
   at net.sf.hibernate.loader.EntityLoader.load(EntityLoader.java:51)
   at net.sf.hibernate.persister.EntityPersister.load(EntityPersister.java:419)
   at net.sf.hibernate.impl.SessionImpl.doLoad(SessionImpl.java:2106)
   at net.sf.hibernate.impl.SessionImpl.doLoadByClass(SessionImpl.java:1980)
   at net.sf.hibernate.impl.SessionImpl.load(SessionImpl.java:1909)



this my class Produto

Code:
public class Produto {
   
   private int ID;
   private String desc;
   private double preco;
   
   Produto(){
      //default is empty
   }
   public void setDesc(String desc){
      this.desc = desc;
   }
   public String getDesc(){
      return desc;
   }

//sets and gets....



the hbm.xml....
Code:
<property name="desc"  column="DESCRICAO" type="char"/>
<!-- i try put char(50), this is the size of my table, but dont accept too..
-->



the insert its ok! the problem is when i try take the object form the db


thanks!

_________________
--
Thomas Petry Dalazen
Cinq Technologies


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 31, 2004 10:52 am 
CGLIB Developer
CGLIB Developer

Joined: Thu Aug 28, 2003 1:44 pm
Posts: 1217
Location: Vilnius, Lithuania
try <... type="string" />


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 31, 2004 11:05 am 
Newbie

Joined: Mon May 31, 2004 10:17 am
Posts: 3
baliukas wrote:
try <... type="string" />


hey master yoda!!!

thats it!!!

thanks a lot!


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.