Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version:Hibernate3.0
Mapping documents:
Code between sessionFactory.openSession() and session.close():
Full stack trace of any exception that occurs: ERROR [STDERR] org.hibernate.HibernateException: Could not find datasource
at org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:48)
at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:80)
at org.hibernate.cfg.SettingsFactory.createConnectionProvider(SettingsFactory.java:362)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:60)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1463)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1004)
Name and version of the database you are using:Oracle 9i
The generated SQL (show_sql=true):
Debug level Hibernate log excerpt:
Hi,
I m trying to run one application in Jboss with jndi datasource connection. For that i did the following..
1) In jboss server\default\deploy folder we have oracle-ds.xml file which have the following entry.
<local-tx-datasource>
<jndi-name>OracleDS</jndi-name>
<connection-url>XXXX</connection-url>
<driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
<user-name>XXXX</user-name>
<password>XXXX</password>
<exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
<metadata>
<type-mapping>Oracle9i</type-mapping>
</metadata>
</local-tx-datasource>
2) in the hibernate.cfg.xml file we have the following.....
<session-factory>
<property name="connection.driver_class">
sun.jdbc.odbc.JdbcOdbcDriver
</property>
<property name="dialect">
org.hibernate.dialect.Oracle9Dialect
</property>
<property name="connection.datasource">OracleDS</property>
<property name="show_sql">false</property>
<property name="cache.provider_class">
org.hibernate.cache.HashtableCacheProvider
</property>
<property name="query.factory_class">
org.hibernate.hql.classic.ClassicQueryTranslatorFactory
</property>
While running my application i m getting the exception.
ERROR [STDERR] org.hibernate.HibernateException: Could not find datasource
Please share any ideas..
Problems with Session and transaction handling?
Read this:
http://hibernate.org/42.html