-->
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.  [ 5 posts ] 
Author Message
 Post subject: Use CGLIB instead of Javassist
PostPosted: Tue Sep 16, 2008 4:56 pm 
Beginner
Beginner

Joined: Mon Sep 01, 2008 9:35 am
Posts: 24
Hi,

Is it possible to instruct hibernate to use cglib instead of javassist in the new release (3.3.1) ????

Thanks in advance.


Top
 Profile  
 
 Post subject: Re: Use CGLIB instead of Javassist
PostPosted: Wed Sep 17, 2008 4:08 am 
Pro
Pro

Joined: Tue Jun 12, 2007 4:13 am
Posts: 209
Location: Berlin, Germany
fvitorc wrote:
Hi,

Is it possible to instruct hibernate to use cglib instead of javassist in the new release (3.3.1) ????



Yes, of course. There is a property named "hibernate.bytecode.provider" and it can take the values "cglib" or "javassist".

Code:
<property name="hibernate.bytecode.provider" value="cglib" /> <!-- value="javassist" -->

_________________
Carlo
-----------------------------------------------------------
please don't forget to rate if this post helped you


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 17, 2008 1:50 pm 
Beginner
Beginner

Joined: Mon Sep 01, 2008 9:35 am
Posts: 24
I've tested it and it works.
By the way, this can only be set in hibernate.properties, and not in the hibernate.cfg.xml.

The problem is that hibernate will use it own repack version. Is it possible to use the version that I can dowload from the cglib project???


Top
 Profile  
 
 Post subject:
PostPosted: Mon Oct 06, 2008 3:07 pm 
Newbie

Joined: Tue Jul 24, 2007 1:48 pm
Posts: 1
fvitorc,

Did you not run into this issue?

http://opensource.atlassian.com/project ... e/HHH-3504


Top
 Profile  
 
 Post subject: Maven Shade Plugin
PostPosted: Thu Nov 13, 2008 10:44 pm 
Newbie

Joined: Tue Nov 11, 2008 4:30 pm
Posts: 2
Actually, that is a problem related to a maven shade plugin. This plugin repack cglib-nodep-2.1_3.jar file and also replace all dependencies from the classes. All references to net.sf.cglib are changed to org.hibernate.repackage.cglib. However, there is a string("[Lnet/sf/cglib/proxy/Callback") into Enhancer class that the shade plugin does not understand as valid reference for a class and can't change, so that problem occurs


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