-->
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: Unable to get any table from my database
PostPosted: Tue Oct 23, 2007 3:56 am 
Newbie

Joined: Tue Oct 23, 2007 3:33 am
Posts: 2
Location: Paris
I'm using Hibernate tools plugin for Eclipse.
I've correctly created an hibernate.cfg.xml with the tool.
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">veristat_dev</property>
        <property name="hibernate.connection.url">jdbc:oracle:thin:@VWDWEB001:1521:INTD01</property>
        <property name="hibernate.connection.username">veristat_dev</property>
        <property name="hibernate.default_schema">veristat_dev</property>
        <property name="hibernate.dialect">org.hibernate.dialect.Oracle10gDialect</property>
    </session-factory>
</hibernate-configuration>


I can normaly access to my database with regular JDBC connexion with these parameters.

I've created an Hibernate Console Configuration. When trying to get tables from my database, the list is empty and no error message appears exept this log in hibernate-tools.log (I don't know if it's linked because it doesn't appears all the times) :
Code:
2007-10-22 18:24:03,700 2072152 [       Worker-3] WARN  pl.SessionFactoryObjectFactory  - Could not bind factory to JNDI
javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file:  java.naming.factory.initial
   at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:645)
   at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
   at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:325)
   at javax.naming.InitialContext.getNameParser(InitialContext.java:480)
   at org.hibernate.util.NamingHelper.bind(NamingHelper.java:52)
   at org.hibernate.impl.SessionFactoryObjectFactory.addInstance(SessionFactoryObjectFactory.java:90)
   at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:306)
   at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1294)
   at org.hibernate.console.ConsoleConfiguration$3.execute(ConsoleConfiguration.java:357)
   at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:65)
   at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:88)
   at org.hibernate.console.ConsoleConfiguration.buildSessionFactory(ConsoleConfiguration.java:352)
   at org.hibernate.eclipse.console.workbench.LazySessionFactoryAdapter.getChildren(LazySessionFactoryAdapter.java:41)
   at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.getChildren(BasicWorkbenchAdapter.java:89)
   at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.fetchDeferredChildren(BasicWorkbenchAdapter.java:95)
   at org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:196)
   at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)


Anyone can help me ? :)

Hibernate Tools version: 3.2.0 beta9a

Database: Oracle 10.2.0.3


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 23, 2007 12:48 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
upgrade to the latest release and let me know if it doesn't work there automatically.

If it doesn't then make sure the default_schema is set to uppercase.

Let me know what works for you and on what version ;)

thanks

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 24, 2007 4:33 am 
Newbie

Joined: Tue Oct 23, 2007 3:33 am
Posts: 2
Location: Paris
Great ! It works !

Only upgrading to HibernateTools-3.2.0.beta11 didn't work.
But, setting the default_schema in upercase worked : I got my tables !

Thank you very much !


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 24, 2007 5:13 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
ok thanks for that info - need to fix my algorithm for deciding if databases needs casing or not.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 24, 2007 5:16 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
ok thanks for that info - need to fix my algorithm for deciding if databases needs casing or not.

_________________
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.