-->
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.  [ 9 posts ] 
Author Message
 Post subject: Trouble with Middlegen - rookie question...
PostPosted: Wed Aug 30, 2006 12:40 pm 
Newbie

Joined: Wed Aug 30, 2006 12:24 pm
Posts: 3
Location: Denver, CO
I'm running Hibernate 2.1 with Middlegen-Hibernate R4 plugin. I'm attempting to complete a tutorial by Tyler Pitchford (http://www.warfrog.com/hibernatetutorial/)

Anyway, I've got a local HSQL database server running locally and I can connect the GUI to that server with no problems (in Server mode), however, when I run ANT to launch middlegen, it says that it's connecting and reading all tables from the database, but it just gets stuck and never returns - here's the output of the ant script with -verbose setting. Please give me a clue on what's hanging it up:

----------------------
C:\hibernatetutorial\apps\middlegen\Middlegen-Hibernate-r4>ant middlegen -verbos
e
Apache Ant version 1.5.3 compiled on April 16 2003
Buildfile: build.xml
Detected Java version: 1.4 in: C:\j2sdk1.4.2_08\jre
Detected OS: Windows 2000
parsing buildfile build.xml with URI = file:C:/hibernatetutorial/apps/middlegen/
Middlegen-Hibernate-r4/build.xml
Project base dir set to: C:\hibernatetutorial\apps\middlegen\Middlegen-Hibernate
-r4
[property] Loading C:\hibernatetutorial\apps\middlegen\Middlegen-Hibernate-r4\b
uild.properties
[property] Unable to find property file: C:\hibernatetutorial\apps\middlegen\Mi
ddlegen-Hibernate-r4\build.properties
resolving systemId: file:./config/database/hsqldb.xml
Build sequence for target `middlegen' is [init, fail-if-no-xdoclet-1.2, check-dr
iver-present, panic-if-driver-not-present, middlegen]
Complete build sequence is [init, fail-if-no-xdoclet-1.2, check-driver-present,
panic-if-driver-not-present, middlegen, hsqldb-gui, compile-hibernate, create-ta
bles, clean, validate, hbm2java, all]

init:

fail-if-no-xdoclet-1.2:
Skipped because property 'xdoclet1.2+' set.

check-driver-present:
[available] Found file: lib\hsqldb-1.7.1.jar

panic-if-driver-not-present:
Skipped because property 'driver.present' set.

middlegen:
[echo] Class path = C:\hibernatetutorial\apps\middlegen\Middlegen-Hibernate
-r4
[middlegen] Database URL:jdbc:hsqldb:hsql://localhost
Property ${java.naming.factory.initial} has not been set
Property ${java.naming.provider.url} has not been set
[middlegen] No <table> elements specified. Reading all tables. This might take a
while...

---------------------


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 30, 2006 7:23 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
I have no idea why it is having a problem. I usually use HSQL when doing dev work on Middlegen., Please note there is a R5 release. Even better is to use the CVS version - a release is way behind schedule. For now - get R5 release from Hibernate SF downloads - its all setup for a quick setup and test.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 30, 2006 7:24 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
Also you may want to consider hibernate tools - especially if your using H3.x and on.


Top
 Profile  
 
 Post subject: hB tools?!
PostPosted: Wed Aug 30, 2006 8:04 pm 
Newbie

Joined: Wed Aug 30, 2006 12:24 pm
Posts: 3
Location: Denver, CO
david wrote:
Also you may want to consider hibernate tools - especially if your using H3.x and on.


Tell me more: what do you mean hibernate tools - is this different from the Hibernate-MiddlegenPlugin that I'm using?!


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 31, 2006 5:33 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
http://tools.hibernate.org

similiar functionallity than middlegen, but has more functionallity, is updated an actively developed.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 31, 2006 6:13 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
http://tools.hibernate.org

similiar functionallity than middlegen, but has more functionallity, is updated an actively developed.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 31, 2006 8:28 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
http://tools.hibernate.org

similiar functionallity than middlegen, but has more functionallity, is updated an actively developed.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject: Found the problem...
PostPosted: Fri Sep 01, 2006 11:36 am 
Newbie

Joined: Wed Aug 30, 2006 12:24 pm
Posts: 3
Location: Denver, CO
david wrote:
I have no idea why it is having a problem.

Ok - I finally figured it out - here's a description of the resolution in case someone else has similar problems with hibernate-middlegen plugin.

I believe the core issue was with the incorrect JDBC driver settings. In my case there was a wrong setting in the database.driver.file property in my hsqldb.xml file which was pointing to a JAR inside Middlegen directory (apparently not a correct driver)... the property SHOULD have been pointing at the hsqldb.jar file in the /lib/hsql directory instead - which contains the RIGHT jdbc driver.

Once I found that and corrected the entry, then Middlegen was able to connect without a prolem and it's all good for now.

I love it when I can solve my own problems... :) Best of luck to all -
James


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 01, 2006 9:44 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
Great - thanks for the followup.


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