-->
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: URGENT, PLEASE. CGLIB error with 2.1rc and cglib2.jar
PostPosted: Fri Dec 05, 2003 2:54 pm 
Pro
Pro

Joined: Mon Sep 08, 2003 4:30 pm
Posts: 203
Hi [again], :(

I get the following error when switching from 2.1 beta 5 to 2.1 rc with the new CGLIB2 jar:

13:47:28,218 ERROR LazyInitializer:59 - CGLIB Enhancement failed
java.lang.ExceptionInInitializerError
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at net.sf.cglib.proxy.EnhancerEmitter.setThreadCallbacks(EnhancerEmitter.java:194)
at net.sf.cglib.proxy.Enhancer.createUsingReflection(Enhancer.java:345)
at net.sf.cglib.proxy.Enhancer.firstInstance(Enhancer.java:326)
at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:195)
at net.sf.cglib.proxy.Enhancer.createHelper(Enhancer.java:305)
at net.sf.cglib.proxy.Enhancer.create(Enhancer.java:221)
at net.sf.cglib.proxy.Enhancer.create(Enhancer.java:380)
at net.sf.hibernate.proxy.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:50)
at net.sf.hibernate.persister.AbstractEntityPersister.<init>(AbstractEntityPersister.java:793)
at net.sf.hibernate.persister.NormalizedEntityPersister.<init>(NormalizedEntityPersister.java:739)
at net.sf.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:44)
at net.sf.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:136)
at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:720)
at com.persistence.HibernateSessionFactory.currentFactory(HibernateSessionFactory.java:25)
at com.persistence.HibernateSession.currentSession(HibernateSession.java:38)
at com.persistence.HibernateSession.newSession(HibernateSession.java:48)
at com.persistence.PersistentSession.<init>(PersistentSession.java:64)
at com.db.device.DeviceHelper.getAllDevices(DeviceHelper.java:39)
at com.db.device.MainDevice.go(MainDevice.java:444)
at com.db.device.MainDevice.main(MainDevice.java:48)
Caused by: java.lang.NoSuchMethodException: com.db.device.EthernetInterfaceOptions.setVlanId([B)
at java.lang.Class.getMethod0(Class.java:1756)
at java.lang.Class.getDeclaredMethod(Class.java:1233)
at com.db.device.EthernetInterfaceOptions$$EnhancerByCGLIB$$a31f33cc.<clinit>(<generated>)
... 24 more
com.dao.DAOException: CGLIB Enhancement failed wraps: [net.sf.hibernate.HibernateException: CGLIB Enhancement failed]
at com.persistence.PersistentSession.<init>(PersistentSession.java:68)
at com.db.device.DeviceHelper.getAllDevices(DeviceHelper.java:39)
at com.db.device.MainDevice.go(MainDevice.java:444)
at com.db.device.MainDevice.main(MainDevice.java:48)
net.sf.hibernate.HibernateException: CGLIB Enhancement failed
at net.sf.hibernate.proxy.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:60)
at net.sf.hibernate.persister.AbstractEntityPersister.<init>(AbstractEntityPersister.java:793)
at net.sf.hibernate.persister.NormalizedEntityPersister.<init>(NormalizedEntityPersister.java:739)
at net.sf.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:44)
at net.sf.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:136)
at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:720)
at com.persistence.HibernateSessionFactory.currentFactory(HibernateSessionFactory.java:25)
at com.persistence.HibernateSession.currentSession(HibernateSession.java:38)
at com.persistence.HibernateSession.newSession(HibernateSession.java:48)
at com.persistence.PersistentSession.<init>(PersistentSession.java:64)
at com.db.device.DeviceHelper.getAllDevices(DeviceHelper.java:39)
at com.db.device.MainDevice.go(MainDevice.java:444)
at com.db.device.MainDevice.main(MainDevice.java:48)
Caused by: java.lang.ExceptionInInitializerError
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at net.sf.cglib.proxy.EnhancerEmitter.setThreadCallbacks(EnhancerEmitter.java:194)
at net.sf.cglib.proxy.Enhancer.createUsingReflection(Enhancer.java:345)
at net.sf.cglib.proxy.Enhancer.firstInstance(Enhancer.java:326)
at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:195)
at net.sf.cglib.proxy.Enhancer.createHelper(Enhancer.java:305)
at net.sf.cglib.proxy.Enhancer.create(Enhancer.java:221)
at net.sf.cglib.proxy.Enhancer.create(Enhancer.java:380)
at net.sf.hibernate.proxy.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:50)
... 12 more
Caused by: java.lang.NoSuchMethodException: com.db.device.EthernetInterfaceOptions.setVlanId([B)
at java.lang.Class.getMethod0(Class.java:1756)
at java.lang.Class.getDeclaredMethod(Class.java:1233)
at com.db.device.EthernetInterfaceOptions$$EnhancerByCGLIB$$a31f33cc.<clinit>(<generated>)
... 24 more
net.sf.hibernate.HibernateException: CGLIB Enhancement failed
at net.sf.hibernate.proxy.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:60)
at net.sf.hibernate.persister.AbstractEntityPersister.<init>(AbstractEntityPersister.java:793)
at net.sf.hibernate.persister.NormalizedEntityPersister.<init>(NormalizedEntityPersister.java:739)
at net.sf.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:44)
at net.sf.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:136)
at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:720)
at com.persistence.HibernateSessionFactory.currentFactory(HibernateSessionFactory.java:25)
at com.persistence.HibernateSession.currentSession(HibernateSession.java:38)
at com.persistence.HibernateSession.newSession(HibernateSession.java:48)
at com.persistence.PersistentSession.<init>(PersistentSession.java:64)
at com.db.device.DeviceHelper.getAllDevices(DeviceHelper.java:39)
at com.db.device.MainDevice.go(MainDevice.java:444)
at com.db.device.MainDevice.main(MainDevice.java:48)
Caused by: java.lang.ExceptionInInitializerError
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at net.sf.cglib.proxy.EnhancerEmitter.setThreadCallbacks(EnhancerEmitter.java:194)
at net.sf.cglib.proxy.Enhancer.createUsingReflection(Enhancer.java:345)
at net.sf.cglib.proxy.Enhancer.firstInstance(Enhancer.java:326)
at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:195)
at net.sf.cglib.proxy.Enhancer.createHelper(Enhancer.java:305)
at net.sf.cglib.proxy.Enhancer.create(Enhancer.java:221)
at net.sf.cglib.proxy.Enhancer.create(Enhancer.java:380)
at net.sf.hibernate.proxy.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:50)
... 12 more
Caused by: java.lang.NoSuchMethodException: com.db.device.EthernetInterfaceOptions.setVlanId([B)
at java.lang.Class.getMethod0(Class.java:1756)
at java.lang.Class.getDeclaredMethod(Class.java:1233)
at com.db.device.EthernetInterfaceOptions$$EnhancerByCGLIB$$a31f33cc.<clinit>(<generated>)
... 24 more
Exception in thread "main"

Same code worked before ...


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 05, 2003 3:55 pm 
Regular
Regular

Joined: Tue Sep 02, 2003 5:09 pm
Posts: 81
Location: Whitefish Montana
You might check the faq http://www.hibernate.org/74.html and search for CGLIB2 in this forum. There have been several issues reported. I ran into problems caused by conflicts between CGLIB1 and CGLIB2. I ended up removing CGLIB support from the other application.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 05, 2003 6:19 pm 
Expert
Expert

Joined: Tue Sep 16, 2003 4:06 pm
Posts: 318
Location: St. Petersburg, Russia
Same story - while I had both CGLIB2 & old CGLIB (from HB 2.0.3) in the classpath, I was getting same exception.


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.