Is it still possible to force Hibernate 3.3 or 3.5 to use CGLib instead of Javassist? In my properties file, I set
hibernate.bytecode.provider = cglib
But this doesn’t seem to do it. Any thoughts?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It seems some people didn’t read my answer correctly so I’ll rephrase: your
hibernate.propertieslooks correct, the property is well defined, it should work. So, sorry for the question but is CGlib on the classpath?Update: Just tested and it works for me. Here is the output I get at initialization time:
15 [main] INFO org.hibernate.cfg.Environment - Hibernate 3.3.0.SP1 18 [main] INFO org.hibernate.cfg.Environment - loaded properties from resource hibernate.properties: {hibernate.bytecode.use_reflection_optimizer=false, hibernate.bytecode.provider=cglib} 20 [main] INFO org.hibernate.cfg.Environment - Bytecode provider name : cglibPS: Note that CGLIB support has been deprecated recently (this doesn’t mean you won’t be able to use CGLIB but the integration it not maintained anymore).