-->
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.  [ 1 post ] 
Author Message
 Post subject: Using JNDI and Hibernate in Eclipse
PostPosted: Wed Aug 26, 2009 11:43 am 
Newbie

Joined: Wed Aug 26, 2009 11:35 am
Posts: 5
Hi. I'm trying to set up a Seam app in Eclipse to use a JNDI datasource file on my JBoss instance /server/default/ora-forms-ds.xml. I can use the identical credentials in the JNDI file to connect successfully to the database by creating a new connection; but Eclipse can't read the JNDI file. When I try to use the "Seam Generate Entities" to read the database, it gives the following error:
Code:
Can't generate seam entities
  org.hibernate.exception.JDBCConnectionException: Getting database metadata
  Getting database metadata
    org.hibernate.exception.JDBCConnectionException: Getting database metadata
    Getting database metadata
    java.sql.SQLException: No suitable driver
    No suitable driver

Here's the persistence.xml file for the app:
Code:
   <persistence-unit name="ora-forms" transaction-type="JTA">
      <provider>org.hibernate.ejb.HibernatePersistence</provider>
      <jta-data-source>java:/ora-forms</jta-data-source>
      <properties>
         <property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect"/>
         <property name="hibernate.connection.driver_class" value="oracle.jdbc.driver.OracleDriver"/>
         <property name="hibernate.hbm2ddl.auto" value="update"/>
         <property name="hibernate.show_sql" value="true"/>
         <property name="hibernate.format_sql" value="true"/>
         <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookup"/>
         <property name="jboss.entity.manager.factory.jndi.name" value="java:/ora-forms"/>
      </properties>
   </persistence-unit>

Here's the hibernate-console.properties:
Code:
#File used by hibernate tools to override <datasource> and other container specific settings in persistence.xml
hibernate.connection.password=
hibernate.connection.username=
hibernate.connection.driver_class=oracle.jdbc.driver.OracleDriver
hibernate.dialect=org.hibernate.dialect.Oracle10gDialect
hibernate.connection.url=
hibernate.connection.provider_class=org.hibernate.connection.DriverManagerConnectionProvider
hibernate.datasource=java:/ora-forms
hibernate.transaction.manager_lookup_class=


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.