-->
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: Help! Help! Problems with Hibernate tools on Oracle DB.
PostPosted: Thu Nov 09, 2006 5:51 am 
Newbie

Joined: Thu Nov 09, 2006 4:37 am
Posts: 7
Location: Beijing China
My environment is described as below:

Eclipse : eclipse-SDK-3.2.1-win32
Hiberante tools : HibernateTools-3.2.0.beta8
WTP : wtp-R-1.0.3-200607290929
Oracle : ora9i
OS : WIN XP PRO

With the following steps, I can not generate POJO or *.hbm.xml filse:

1. New a java project in eclipse.
2. New a Hibernate configuration file with related wizard.
In this step I generated a hibernate configure file described as below( BECAUSE I DON'T KNOW WHAT

hibernate.default_catalog MEAN, SO I USE hibernate.default_schema FILLED HERE, IS THIS A PROBLEM ??
):

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">mvpdev2x</property>
        <property name="hibernate.connection.url">jdbc:oracle:thin:@localhost:1521:ramon</property>
        <property name="hibernate.connection.username">mvpdev2x</property>
        <property name="hibernate.default_catalog">mvpdev2x</property>
        <property name="hibernate.default_schema">mvpdev2x</property>
        <property name="hibernate.dialect">org.hibernate.dialect.Oracle9Dialect</property>
    </session-factory>
</hibernate-configuration>


3. Created a "Hibernate Console configuration file" with "Hibernate configuration file" created in step 2. Included

ojdbc14.jar file for oracle server.

4. Then I open the "Hibernate Configurations" view in Eclipse, there are there items in this view, they are

"Configuration", "Session Factory" and "Database", WHEN I TRY TO CLICK "Database", NO TABLES RETRIEVED FROM MY DATABASE, just a "pending" sign shown few seconds and no error shown here.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 09, 2006 5:56 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
schema is case sensitive on oracle, use upper case.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 09, 2006 8:22 am 
Newbie

Joined: Thu Nov 09, 2006 4:37 am
Posts: 7
Location: Beijing China
Hi Max, I will have a try with the upper case schema, hope it was helpfule. I copy this lower case schema from a KODO properties file, which can connect to my Oracle server properly.

Another question, from where I can find any useful logs when I use Hibernate Tools, thanks!


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 09, 2006 8:44 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
there is no problem in connecting; it is just that hibernate tools pre-beta9 did not try and "monge" your schema/catalog specification to make the jdbc metadata api get data back.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 09, 2006 10:50 am 
Newbie

Joined: Thu Nov 09, 2006 4:37 am
Posts: 7
Location: Beijing China
Thanks for your help, Max! After changing my schema name to upper case, I can find tables in my database. And generated POJO and *.hbm.xml files successfully ;)


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.