-->
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: I cant see my oracle tables !! help me
PostPosted: Mon Mar 27, 2006 6:20 am 
Newbie

Joined: Mon Mar 27, 2006 5:59 am
Posts: 2
I'm testing hibernate with JBossIDE1.5 (? latest version) , oracle9, windows 2000 , jvm 1.4.*
and patched eclipseplugin up with HibernateTools-3.1.0.beta4
and deleted HibernateTools-3.1.0.beta3 in eclipse/plugin.

and made hibernate.cfg.xml with eclipse wizard..
but cant see oracle tables....

I think eclipseIde has no problem because I've tested with Mysql Server
and no problem It worked perfect!!

could you suggest any ideas why It doesnt work with oracle servers ?
I forgot to say this.. I've tested with oracle drivers (classes12.jar and ojdbc14.jar) but It did neither work ..

please help me... T.T

this is oracle's hibernate.cfg.xml

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


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 27, 2006 1:31 pm 
Expert
Expert

Joined: Mon Jan 09, 2006 5:01 pm
Posts: 311
Location: Sacramento, CA
are you sure you setup the schema correctly? usually if you create tables in the "user" account, you don't have to specify a schema and/or catalog it just defaults to the "user"s account.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 27, 2006 1:41 pm 
Expert
Expert

Joined: Mon Jan 09, 2006 5:01 pm
Posts: 311
Location: Sacramento, CA
I would get rid of default_catalog and schema and see if you can see your tables.

The other thing to do is to make sure you can even get to your database from your machine - write a simple JDBC program that uses the info you have...

Here is a quick/little program:

Code:
        try
        {
            DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
        }
        catch (SQLException e)
        {
            System.err.println("Exception thrown:" + e.getMessage());
            e.printStackTrace();
        }

        // Connect to the database.
      // You can put a database name after the @ sign in the connection URL.
        Connection conn =null;
        try
        {
            conn = DriverManager.getConnection("jdbc:oracle:thin:@", "bibbie", "secret");
        }
        catch (SQLException e)
        {
            System.err.println("Exception thrown:" + e.getMessage());
            e.printStackTrace();
        }

       String sSQL = "select first_name,last_name from person";
       Statement stmt = null;
       try
       {
           stmt = conn.createStatement();
           
           ResultSet rs=(ResultSet)stmt.executeQuery(sSQL);

           while(rs!=null&&rs.next())
           {
               System.out.println("rs.getString(1) = " + rs.getString(1));                  //FIRST_NAME
               System.out.println("rs.getString(2) = " + rs.getString(2));               // LAST_NAME
           }
           rs.close();
           stmt.close();
           conn.close();

       }  catch(SQLException e)
       {
           System.out.println("e.getMessage() = " + e.getMessage());
           e.printStackTrace(System.out);
       }
[/code]

_________________
-JT

If you find my replies helpful, please rate by clicking 'Y' on them. I appreciate it.


Top
 Profile  
 
 Post subject: thank you
PostPosted: Mon Mar 27, 2006 10:53 pm 
Newbie

Joined: Mon Mar 27, 2006 5:59 am
Posts: 2
jt_1000 wrote:
are you sure you setup the schema correctly? usually if you create tables in the "user" account, you don't have to specify a schema and/or catalog it just defaults to the "user"s account.


Thank you for your reply...

The Hibernate's schema is case sensitive....

I didn't think that the reason is case because my DBEdit plugin's schema consists of lower case...

but the DB server's schema is upper case.....


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 28, 2006 5:35 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
it is most likely the schema case thingy.

_________________
Max
Don't forget to rate


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.