-->
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.  [ 2 posts ] 
Author Message
 Post subject: NoClassDefFoundError: net.sf.cglib.proxy.Enhancer
PostPosted: Thu Feb 23, 2006 3:47 am 
Newbie

Joined: Tue Feb 21, 2006 4:03 pm
Posts: 10
Hey,

my first Hibernate trial ends up with the following error message
(see below) for every persistent class:

in the example, zenodot.database.entities.Article is the persistent class.
It seems that the cglib class net.sf.cglib.proxy.Enhancer cannot be found.
However, I have cglib in my class path (exactly that version 2.1.3 which comes with Hibernate 3.1.2). That jar contains the Enhancer class.

What is wrong?

In the end the programm which lists all entries of a database fails with a NullPointerException except the simple case when listing entries from a table without any associations.

Quote:
9947 [main] ERROR org.hibernate.proxy.BasicLazyInitializer - CGLIB Enhancement failed: zenodot.database.entities.Article
java.lang.NoClassDefFoundError: while resolving class: net.sf.cglib.proxy.Enhancer
at java.lang.VMClassLoader.transformException(java.lang.Class, java.lang.Throwable) (/usr/lib/libgcj.so.6.0.0)
at java.lang.VMClassLoader.resolveClass(java.lang.Class) (/usr/lib/libgcj.so.6.0.0)
at java.lang.Class.initializeClass() (/usr/lib/libgcj.so.6.0.0)
at org.hibernate.proxy.CGLIBLazyInitializer.getProxyFactory(java.lang.Class, java.lang.Class[]) (Unknown Source)
at org.hibernate.proxy.CGLIBProxyFactory.postInstantiate(java.lang.String, java.lang.Class, java.util.Set, java.lang.reflect.Method, java.lang.reflect.Method, org.hibernate.type.AbstractComponentType) (Unknown Source)
at org.hibernate.tuple.PojoEntityTuplizer.buildProxyFactory(org.hibernate.mapping.PersistentClass, org.hibernate.property.Getter, org.hibernate.property.Setter) (Unknown Source)
at org.hibernate.tuple.AbstractEntityTuplizer.AbstractEntityTuplizer(org.hibernate.tuple.EntityMetamodel, org.hibernate.mapping.PersistentClass) (Unknown Source)
at org.hibernate.tuple.PojoEntityTuplizer.PojoEntityTuplizer(org.hibernate.tuple


Top
 Profile  
 
 Post subject: JDK
PostPosted: Tue Feb 28, 2006 7:09 pm 
Expert
Expert

Joined: Fri Jul 22, 2005 2:42 pm
Posts: 670
Location: Seattle, WA
Just install Sun's JDK (lets say in /usr/java/jdk5-64),
export JAVA_HOME=/usr/java/jdk5-64
export PATH=${JAVA_HOME}/bin:$PATH

and everything should be OK

_________________
--------------
Konstantin

SourceLabs - dependable OpenSource systems


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