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=