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.  [ 4 posts ] 
Author Message
 Post subject: Newbie questions: Getting Started
PostPosted: Mon Feb 27, 2006 2:23 pm 
Newbie

Joined: Mon Feb 27, 2006 1:37 pm
Posts: 2
Hibernate version:

I am attempting to follow the Getting Started Roadmap which is at http://www.hibernate.org/152.html.

Quote:
1. Download Hibernate 3.1 and extract the archive
.
I've done this.

Quote:
place your JDBC driver jar file in the lib directory
.
I've done this.

Quote:
edit etc/hibernate.properties, specifying connection settings for your database (Hibernate will create a schema for the demo automatically)
.
I've done this.

Quote:
from a command prompt in the install dir
1. if you have Ant installed (and copied antlr.jar and junit.jar to ANT_HOME/lib), type ant eg
2. if not, type build eg under Windows
3. the example should run successfully
.
What does "the example should run successfully" mean? The build command runs and there is some output to the console window ending with "BUILD SUCCESSFUL. Total time: 3 seconds". Is this what is supposed to happen?

Quote:
browse the sourcecode of the example in the eg directory
.
I've done this!

Quote:
edit etc/hibernate.properties again, setting hibernate.show_sql=true
.
I've done this.

Quote:
run the example again, and look at the SQL statements Hibernate generates
.
This implies that I have run the example already. Have I?

Basically, because there is nothing telling me what should happen, I have no idea whether it has happened.

I would very much appreciate any help.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 27, 2006 3:43 pm 
Regular
Regular

Joined: Wed Feb 15, 2006 9:09 pm
Posts: 76
Quote:
What does "the example should run successfully" mean? The build command runs and there is some output to the console window ending with "BUILD SUCCESSFUL. Total time: 3 seconds". Is this what is supposed to happen?


The app will run on its own if you type "ant eg" or "build eg". If you don't get any errors, you're good to go. The application runs a bunch of statements on a temporary database, but you don't get any output until you do the "hibernate.show_sql=true" in hibernate.properties and run the sample again (ant eg or build eg).

You should follow the long tutorial at http://www.hibernate.org/hib_docs/v3/reference/en/html/tutorial.html to get a better feel for what's going on in the build process.[/quote]


Top
 Profile  
 
 Post subject: Thanks, but ...
PostPosted: Mon Feb 27, 2006 4:12 pm 
Newbie

Joined: Mon Feb 27, 2006 1:37 pm
Posts: 2
Thanks, I can now see something happening. It falls over with an error message but I'll be able to track that down.

I still have a problem with knowing what the example is supposed to do. Is there anything written down anywhere? If not, then I have no real way of knowing when I've got it working correctly. Seems like a strange way to give an example.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 27, 2006 4:56 pm 
Regular
Regular

Joined: Wed Feb 15, 2006 9:09 pm
Posts: 76
It's helpful to go over the code, but you're right, there's no general overview as to what it's supposed to do. It seems to be an auction-type application that tracks auctions, bids, bidders and sellers. The schema is set up in-memory on the fly so the data is reset between runs, but you can inspect the classes to see how they're stored. Test data is set up through createTestAuctions (in Main.java), then a bid is placed on an auction, results are displayed, a user is updated, and further auctions are displayed.

I think the main purpose of the example is to make sure your environment is set up correctly to help clear up many of the problems people have when they first get started. Chances are good that if the example runs correctly then you should have no problems setting up the environment for your own projects.


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