-->
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: configuring jdk 1.5 with hibernate 3.xx
PostPosted: Mon Dec 31, 2007 2:34 am 
Newbie

Joined: Mon Dec 31, 2007 2:03 am
Posts: 1
Location: mumbai
Hello Everyone,

I am very new to this technology and i m getting loads of error while i m trying to configure Hibernate with jdk 1.5 :(. Could any one please tell me how to configure jdk 1.5 and hibernate 3 on window xp.

I Have downloaded hibernate3.xx from website and put all the necessary .jar files in the classpath/lib/ folder . I also have created all the required .xml files.

But when I am trying to compile java classes for the same its giving me error mentioned below

"F:\Java\jdk1.5.0_14\src>javac -d . *.java
EventEg.java:3: package org.hibernate does not exist
import org.hibernate.Session;
^
EventEg.java:4: package org.hibernate does not exist
import org.hibernate.SessionFactory;
^
EventEg.java:5: package org.hibernate.cfg does not exist
import org.hibernate.cfg.Configuration;
^
EventEg.java:13: cannot find symbol
symbol : class Session
location: class events.EventEg
Session session = null;
^
EventEg.java:17: cannot find symbol
symbol : class SessionFactory
location: class events.EventEg
SessionFactory sessionFactory = new Configuration().conf
igure().buildSessionFactory();
^
EventEg.java:17: cannot find symbol
symbol : class Configuration
location: class events.EventEg
SessionFactory sessionFactory = new Configuration().conf
igure().buildSessionFactory();
^
EventEg.java:21: setId(long) in events.Event cannot be applied to (java.lang.Str
ing)
evnt.setId("20");
^
7 errors
"
Please help me out in this issue.

Regards
Neil M


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 31, 2007 4:16 am 
Regular
Regular

Joined: Sat Nov 25, 2006 11:37 am
Posts: 72
Clearly a classpath issue. The Java compiler cannot find the classes referenced in your source code. You probably need to use the -cp option on the javac command line to tell the compiler where the Hibernate jar files are.


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.