-->
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: CGLIB enh. fails: NoClassDefFoundError for some classes only
PostPosted: Thu May 12, 2005 9:22 pm 
Regular
Regular

Joined: Fri Oct 01, 2004 2:19 am
Posts: 111
Location: Melbourne, Australia
Hibernate version: 3.03 (cglib 2.1.0)

I get the exception below only for some of my persistent classes. This results,
as you'd expect, with the code misbehaving once the configuration
phase completes and the actual interaction using Hibernate begins.

I admit to not knowing much about cglib, but I found some references
to a change in cglib regarding private constructors, but those classes
that fail all have protected default (no args) constructors.

Code:
java.lang.NoClassDefFoundError
   at java.lang.Class.forName0(Native Method)
   at java.lang.Class.forName(Class.java:164)
   at au.com.siemens.ecs.spct.model.beans.IGR$$EnhancerByCGLIB$$13f72024.CGLIB$STATICHOOK17(<generated>)
   at au.com.siemens.ecs.spct.model.beans.IGR$$EnhancerByCGLIB$$13f72024.<clinit>(<generated>)
   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:585)
   at net.sf.cglib.proxy.Enhancer.setCallbacksHelper(Enhancer.java:586)
   at net.sf.cglib.proxy.Enhancer.setThreadCallbacks(Enhancer.java:579)
   at net.sf.cglib.proxy.Enhancer.createUsingReflection(Enhancer.java:601)
   at net.sf.cglib.proxy.Enhancer.firstInstance(Enhancer.java:532)
   at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:220)
   at net.sf.cglib.proxy.Enhancer.createHelper(Enhancer.java:373)
   at net.sf.cglib.proxy.Enhancer.create(Enhancer.java:281)
   at net.sf.cglib.proxy.Enhancer.create(Enhancer.java:640)
   at org.hibernate.proxy.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:94)
   at org.hibernate.proxy.CGLIBProxyFactory.postInstantiate(CGLIBProxyFactory.java:42)
   at org.hibernate.tuple.PojoTuplizer.buildProxyFactory(PojoTuplizer.java:144)
   at org.hibernate.tuple.AbstractTuplizer.<init>(AbstractTuplizer.java:96)
   at org.hibernate.tuple.PojoTuplizer.<init>(PojoTuplizer.java:54)
   at org.hibernate.tuple.TuplizerLookup.create(TuplizerLookup.java:47)
   at org.hibernate.tuple.EntityMetamodel.<init>(EntityMetamodel.java:217)
   at org.hibernate.persister.entity.BasicEntityPersister.<init>(BasicEntityPersister.java:400)
   at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:104)
   at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55)
   at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:210)
   at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1055)
   at au.com.siemens.ecs.spct.util.persistence.HibernateUtil.afterPropertiesSet(HibernateUtil.java:92)
   at au.com.siemens.ecs.spct.AbstractHibernateTestCase.initHibernateUtil(AbstractHibernateTestCase.java:107)
   at au.com.siemens.ecs.spct.AbstractHibernateTestCase.<clinit>(AbstractHibernateTestCase.java:30)
   at java.lang.Class.forName0(Native Method)
   at java.lang.Class.forName(Class.java:164)
   at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.<init>(JUnitTestRunner.java:204)
   at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.<init>(JUnitTestRunner.java:177)
   at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:651)
   at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:558)
10:03:19,031 WARN main org.hibernate.tuple.PojoTuplizer - could not create proxy factory for:au.com.siemens.ecs.spct.model.beans.IGR

The exception is severe enough (I think) that Hibernate should not be
expected to continue to work and so I would have assumed that
I should get a fatal configuration / session factory building error?

Any help resolving this will be appreciated.

_________________
Cheers,

Bonny

please don't forget to rate :)


Top
 Profile  
 
 Post subject: Regarding Issue with NoClassDefFoundError
PostPosted: Sun Jun 25, 2006 5:38 pm 
Newbie

Joined: Wed Jun 21, 2006 4:21 pm
Posts: 3
Hi

Were you able to sort this problem?

Even I get teh same error, though all the required jars are in the classpath.

Pls let me know. Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jun 25, 2006 11:21 pm 
Regular
Regular

Joined: Fri Oct 01, 2004 2:19 am
Posts: 111
Location: Melbourne, Australia
infosuresh,

No, I've not been able to fix that problem. However, I've since made
several changes to my persistent classes, and I cannot recall any
particular change that would have solved this.

_________________
Cheers,

Bonny

please don't forget to rate :)


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.