-->
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.  [ 1 post ] 
Author Message
 Post subject: Serialization issue of proxy object
PostPosted: Thu Mar 17, 2005 12:13 am 
Newbie

Joined: Wed Mar 16, 2005 11:49 pm
Posts: 1
Hibernate version:
3

Full stack trace of any exception that occurs:
java.lang.InstantiationException: org.hibernate.proxy.CGLIBLazyInitializer
Continuing ...
java.lang.RuntimeException: failed to evaluate: <unbound>=CGLIBLazyInitializer.new();
Continuing ...

Name and version of the database you are using:
MySQL 4.0.23

Hi,

I am getting the aforementioned exception when attempting to serialize a POJO that contains a proxy object. A terrible hack around this is to re-construct the original object from the proxy object.

E.g
public void setClassX(ClassX classX) {
this.classX = new ClassX(classX.getName());
}

Is there a cleaner solution for this? Perhaps I need to do something to prevent this exception. It doesn't seem to be a proxy initialization issue as I've successfully accessed the object before serialization. Alternatively, is there a way to get the real object from a proxy object?

Any response will be very much appreciated.

Thanks

lkla


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

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.