-->
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.  [ 5 posts ] 
Author Message
 Post subject: Struggling with first-time use in Eclipse
PostPosted: Wed May 20, 2009 7:03 am 
Senior
Senior

Joined: Fri May 08, 2009 12:27 pm
Posts: 168
Base problem: I'm not getting any information out of the DB when I try to reverse engineer. (I may be utterly confused about how reverse engineering is meant to work, so the real problem might be elsewhere entirely.)

I have Eclipse with hibernate-tools installed.
I walked through the wizards for hibernate.cfg.xml and console configuration. I didn't know what to enter for "Session Factory Name" or "Default Catalog", so I left them empty.

The generated hibernate.cfg.xml looks like this:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC
      "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
      "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
    <session-factory>
        <property name="hibernate.connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
        <property name="hibernate.connection.password">xxxx</property>
        <property name="hibernate.connection.url">jdbc:oracle:thin:@xxx:1521:xxx</property>
        <property name="hibernate.connection.username">xxxx</property>
        <property name="hibernate.default_schema">XXXX</property>
        <property name="hibernate.dialect">org.hibernate.dialect.Oracle9iDialect</property>
    </session-factory>
</hibernate-configuration>


Now when I open Hibernate Configuration, I get no subentries under "Configuration" or "Session Factory", and a permanent "Pending..." under database.
The wizard for hibernate.reveng.xml gives me the same perma-"Pending..." under "Database schema:" if I click "Refresh" (after selecting the proper console configuration).
In both cases, I get a permanent "Fetching children of Database" entry in the Progress view and nothing in the Eclipse logfile.

What's wrong?


Top
 Profile  
 
 Post subject: Re: Struggling with first-time use in Eclipse
PostPosted: Fri May 22, 2009 2:09 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
oracle is notoriously slow for us to get all the metadata - make sure you have set default_schema and it is not scott if your schema is named SCOTT

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject: Re: Struggling with first-time use in Eclipse
PostPosted: Mon May 25, 2009 4:36 am 
Senior
Senior

Joined: Fri May 08, 2009 12:27 pm
Posts: 168
max wrote:
oracle is notoriously slow for us to get all the metadata


Ah. It worked - I see patience is a virtue in this case. Thanks :)
(Would it be possible to add some continuous feedback to the UI? Something indicating how much work was done - tables analyzed, bytes read, or similar.)

I see that "Configuration" and "Session Factory" remain empty in Hibernate Configuration.
Is that intentional?


Top
 Profile  
 
 Post subject: Re: Struggling with first-time use in Eclipse
PostPosted: Mon May 25, 2009 4:58 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
Joachim Durchholz wrote:
max wrote:
oracle is notoriously slow for us to get all the metadata


Ah. It worked - I see patience is a virtue in this case. Thanks :)
(Would it be possible to add some continuous feedback to the UI? Something indicating how much work was done - tables analyzed, bytes read, or similar.)


It should be showing you the progress in the Progress/Job view.

Quote:
I see that "Configuration" and "Session Factory" remain empty in Hibernate Configuration.
Is that intentional?


If there aren't any entities configured (i.e. an empty project) then they will be empty.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject: Re: Struggling with first-time use in Eclipse
PostPosted: Mon May 25, 2009 5:48 am 
Senior
Senior

Joined: Fri May 08, 2009 12:27 pm
Posts: 168
max wrote:
Joachim Durchholz wrote:
(Would it be possible to add some continuous feedback to the UI? Something indicating how much work was done - tables analyzed, bytes read, or similar.)

It should be showing you the progress in the Progress/Job view.

There is a "Fetching children of Database" entry.
No progress bar or other messages, and certainly not anything that changes (at least I didn't notice anything during the first 80% of the running time).
max wrote:
Quote:
I see that "Configuration" and "Session Factory" remain empty in Hibernate Configuration.
Is that intentional?

If there aren't any entities configured (i.e. an empty project) then they will be empty.

OK, I haven't done anything with Hibernate yet. I'll be back with a new question if I hit another problem.

Thanks for the help!


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