-->
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: Save object error
PostPosted: Wed May 31, 2006 4:06 am 
Newbie

Joined: Mon May 29, 2006 6:07 am
Posts: 12
Does anybody know that error?

Code:
org.hibernate.PropertyAccessException: exception setting property value with CGLIB (set hibernate.cglib.use_reflection_optimizer=false for more info)


the code is:
Code:
Session session = HibernateUtil.getSessionFactory().getCurrentSession();
        session.beginTransaction();

       
       ListaUsuarios lu=new ListaUsuarios();
       ArrayList list=new ArrayList();
       Usuario object =(Usuario) session.createQuery("from Usuario as u where u.nombre=:nombre").setString("nombre", "Francisco").uniqueResult();
       list.add(object);
       lu.setId(2);
       lu.setLusuarios(list);
       session.save(lu);
       session.getTransaction().commit();
        HibernateUtil.getSessionFactory().close();


thanks a lot


Top
 Profile  
 
 Post subject: Re
PostPosted: Wed May 31, 2006 4:23 am 
Newbie

Joined: Tue Apr 25, 2006 12:21 am
Posts: 5
Location: Sri lanka
It seems that the property type is not maching with the defined type and the type which u r trying to set. for more info refer the following.

http://www.laliluna.de/264.html

_________________
Best regards,
Nadikani


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.