-->
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.  [ 1 post ] 
Author Message
 Post subject: run time exception classnot found exception due to cglib
PostPosted: Sun Oct 05, 2008 11:16 am 
Newbie

Joined: Sun Oct 05, 2008 10:44 am
Posts: 7
i am newbee at hibernate
i tried to execute a program using hibernate
the code to get an hibernate session is like this

SessionFactory factory =
new Configuration().configure().buildSessionFactory();
Session session = factory.openSession();
session.beginTransaction();
Message m1 = new Message(
"Hibernated a message on " + new Date());
session.save(m1);
session.getTransaction().commit();
session.close();

the exception is given below




Exception in thread "main" java.lang.NoClassDefFoundError: net/sf/cglib/proxy/Callbac
at org.hibernate.bytecode.cglib.BytecodeProviderImpl.getProxyFactoryFactory(B
at org.hibernate.tuple.entity.PojoEntityTuplizer.buildProxyFactoryInternal(Po
at org.hibernate.tuple.entity.PojoEntityTuplizer.buildProxyFactory(PojoEntity
at org.hibernate.tuple.entity.AbstractEntityTuplizer.<init>(AbstractEntityTup
at org.hibernate.tuple.entity.PojoEntityTuplizer.<init>(PojoEntityTuplizer.ja
at org.hibernate.tuple.entity.EntityEntityModeToTuplizerMapping.<init>(Entity
at org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:302
at org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEnti
at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTab
at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFac
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:226)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:130
at sample.PopulateMessages.main(PopulateMessages.java:9)
Caused by: java.lang.ClassNotFoundException: net.sf.cglib.proxy.CallbackFilter
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
... 13 more


i have kept the cglib jar in to my classpath but still the problem persists

please help


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.