-->
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: newbie problem
PostPosted: Tue Mar 09, 2004 4:23 pm 
Beginner
Beginner

Joined: Thu Feb 26, 2004 11:32 am
Posts: 32
I am trying to use hibernate in my project.At run-time I get the follwoing error. I am using hibernate-2.1 with oracle 8i and have hibernate.jar in my classpath. On unjarring hibernate.jar I dont see the "path" net/sf/cglib/core/KeyFactory existing.Am I missing some thing over here.


Exception in thread "main" java.lang.NoClassDefFoundError: net/sf/cglib/core/KeyFactory
at net.sf.hibernate.impl.SessionFactoryImpl.<clinit>(SessionFactoryImpl.java:235)
at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:750)
at eas.hibernate.TestController.poller(TestController.java:45)
at eas.hibernate.TestController.runController(TestController.java:35)
at eas.hibernate.TestController.main(TestController.java:24)


My mapping file is

hibernate.dialect net.sf.hibernate.dialect.OracleDialect
hibernate.connection.driver_class oracle.jdbc.driver.OracleDriver
hibernate.connection.username easusr01_dv
hibernate.connection.password easusr01_dv
hibernate.connection.url jdbc:oracle:oci8:@DEV

my code looks as follows :

sf = new Configuration()
.addClass(eas.hibernate.EasTlKeyvaluelookup.class)
.buildSessionFactory();

session = sf.openSession();

// read next polling period from database
List myList = session.createQuery(
"from EasTlKeyvaluelookup as lookup where lookup.keyidentifier = 'EASDaemonPollInterval'"
).list();

EasTlKeyvaluelookup temp = (EasTlKeyvaluelookup) myList.get(0);
pollInterval = Integer.parseInt(temp.getDefaultvalue());


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 09, 2004 4:37 pm 
Hibernate Team
Hibernate Team

Joined: Thu Dec 18, 2003 9:55 am
Posts: 1977
Location: France
NoClassDefFoundError: net/sf/cglib/core/KeyFactory
--> you need to put cglibxx.jar on your classpath (/lib for a webapp fot example)

you may need others jar like ehcache, c3p0 (if you use it) ....


Top
 Profile  
 
 Post subject: Re: newbie problem
PostPosted: Wed Mar 10, 2004 1:12 am 
Beginner
Beginner

Joined: Mon Dec 15, 2003 5:25 am
Posts: 48
Location: Delhi, India
Look at readme.txt file under lib directory of hibernate distribution. It will tell you which jar files should be in your classpath.

_________________
Vinod K. Singh


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.