-->
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 needs help with tutorial
PostPosted: Fri Apr 14, 2006 2:13 pm 
Newbie

Joined: Fri Apr 14, 2006 2:04 pm
Posts: 2
I'm trying the tutorial at:

http://www.hibernate.org/hib_docs/v3/re ... orial.html

I get to step 1.2.5, Startup and Helpers and get an error. Error text is below. I am not sure if I've done something wrong (major newbie here) or if there is something missing in the tutorial.


Hibernate version:
3.1.3


Full stack trace of any exception that occurs:
C:\downloads\Hibernate\TestDev>ant
Buildfile: build.xml

clean:
[delete] Deleting directory C:\downloads\Hibernate\TestDev\bin
[mkdir] Created dir: C:\downloads\Hibernate\TestDev\bin

copy-resources:
[copy] Copying 3 files to C:\downloads\Hibernate\TestDev\bin
[copy] Copied 3 empty directories to 2 empty directories under C:\downloads
\Hibernate\TestDev\bin

compile:
[javac] Compiling 2 source files to C:\downloads\Hibernate\TestDev\bin
[javac] C:\downloads\Hibernate\TestDev\src\util\HibernateUtil.java:3: packag
e org.hibernate does not exist
[javac] import org.hibernate.*;
[javac] ^
[javac] C:\downloads\Hibernate\TestDev\src\util\HibernateUtil.java:4: packag
e org.hibernate.cfg does not exist
[javac] import org.hibernate.cfg.*;
[javac] ^
[javac] C:\downloads\Hibernate\TestDev\src\util\HibernateUtil.java:8: cannot
resolve symbol
[javac] symbol : class SessionFactory
[javac] location: class util.HibernateUtil
[javac] private static final SessionFactory sessionFactory;
[javac] ^
[javac] C:\downloads\Hibernate\TestDev\src\util\HibernateUtil.java:21: canno
t resolve symbol
[javac] symbol : class SessionFactory
[javac] location: class util.HibernateUtil
[javac] public static SessionFactory getSessionFactory() {
[javac] ^
[javac] C:\downloads\Hibernate\TestDev\src\util\HibernateUtil.java:13: canno
t resolve symbol
[javac] symbol : class Configuration
[javac] location: class util.HibernateUtil
[javac] sessionFactory = new Configuration().configure().buildSe
ssionFactory();
[javac] ^
[javac] 5 errors

BUILD FAILED
C:\downloads\Hibernate\TestDev\build.xml:21: Compile failed; see the compiler error output for details.

Total time: 1 second
C:\downloads\Hibernate\TestDev>


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 14, 2006 7:38 pm 
Regular
Regular

Joined: Wed Jul 07, 2004 2:00 pm
Posts: 64
Are you sure that your lib directory contains hibernate3.jar? This is found in the root of the Hibernate distribution, instead of in the lib folder with all dependencies.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 17, 2006 12:19 pm 
Newbie

Joined: Fri Apr 14, 2006 2:04 pm
Posts: 2
Thanks, that did the trick. I must have missed the step to move that .jar to the directory somewhere.

Again, thanks a ton.

RF


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.