Look in the Hibernate log for "Could not find datasource" (fatal level)
and you'll see what reference is actually used.
If you have info-level, also look for "JNDI InitialContext properties"
and post here.

 /Mattias

Guru wrote (2007-12-03 20:53):
> Hi,
>
> I have tried this also. But no luck.
>
>
>
> On Dec 3, 2007 12:08 PM, Shane Cruz <[EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>> wrote:
>
>     Can you try?:
>
>      
>
>     <property name="connection.datasource">jdbc/RO_DS1</property>
>
>      
>
>     ------------------------------------------------------------------------
>
>     *From:* [EMAIL PROTECTED]
>     <mailto:[EMAIL PROTECTED]>
>     [mailto:[EMAIL PROTECTED]
>     <mailto:[EMAIL PROTECTED]>] *On Behalf Of *Guru
>     *Sent:* Monday, December 03, 2007 10:39 AM
>     *To:* General Discussion for the Resin application server
>     *Subject:* Re: [Resin-interest] Could not find datasource
>
>      
>
>     Hi,
>
>     Thanks for you immediate response. My hibernate config is as follows.
>
>             <property
>     name="connection.datasource">java:comp/env/jdbc/RO_DS1</property>
>             <property name="dialect">
>     org.hibernate.dialect.Oracle9Dialect</property>
>             <property
>     name="myeclipse.connection.profile">dev-local</property>
>             <property name="show_sql">true</property>
>             <property name="format_sql">true</property>
>             <property
>     name="cache.provider_class">org.hibernate.cache.EhCacheProvider</property>
>             <property name="generate_statistics">true</property>
>
>     Which is referring to the datasource created in resin.conf. Please
>     let me know is there any other reason for the class cast exception.
>
>     Thanks,
>     KG
>
>
>     On Dec 3, 2007 11:31 AM, Mattias Jiderhamn <
>     [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:
>
>     You should probably check your Hibernate configuration. It seems
>     you are not providing the JDNI reference to the actual DataSource.
>
>      /Mattias
>
>     Guru wrote (2007-12-03 17:18):
>
>>     Hi,
>>
>>     I am trying to connect to Oracle 10g using Resin 3.0.14. My jdk
>>     version is 1.5.0.13 <http://1.5.0.13>. I am getting the following
>>     error while trying to lookup the datasource configured in
>>     resin.conf.
>>
>>     Caused by: org.hibernate.HibernateException: Could not find
>>     datasource at
>>     
>> org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:56)
>>     at
>>     
>> org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:124)
>>     at
>>     
>> org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:56)
>>     at
>>     
>> org.hibernate.cfg.SettingsFactory.createConnectionProvider(SettingsFactory.java:385)
>>     at
>>     org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:61)
>>     at
>>     org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1928)
>>     at
>>     
>> org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1211)
>>     at
>>     
>> com.thc.common.util.HibernateFactory.currentSession(HibernateFactory.java:38)
>>     ... 18 more
>>
>>     *Caused by: java.lang.ClassCastException:
>>     com.caucho.naming.ContextImpl at
>>     
>> org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:52)
>>     ... 25 more *
>>
>>     My database configuration in resin.conf is,
>>
>>         <database>
>>             <jndi-name>jdbc/RO_DS1</jndi-name>
>>             <driver>
>>                    
>>     <type>oracle.jdbc.pool.OracleConnectionPoolDataSource </type>
>>                     <url>jdbc:oracle:thin:@localhost:1521:xxxxx</url>
>>                     <user>username</user>
>>                     <password>password</password>
>>             </driver>
>>                     <max-connections>20</max-connections>
>>                     <max-idle-time>30</max-idle-time>
>>                     <max-active-time>6</max-active-time>
>>                     <max-pool-time>24</max-pool-time>
>>                     <connection-wait-time>30</connection-wait-time>
>>                     <ping-table>dual</ping-table>
>>                     <spy>false</spy>
>>         </database>
>>
>>     Any help in this regard is greatly appreciated.
>>
>>
>>     Thanks,
>>     KG
>>
>      
>
>
>     _______________________________________________
>     resin-interest mailing list
>     resin-interest@caucho.com <mailto:resin-interest@caucho.com>
>     http://maillist.caucho.com/mailman/listinfo/resin-interest
>
>      
>
>
>     _______________________________________________
>     resin-interest mailing list
>     resin-interest@caucho.com <mailto:resin-interest@caucho.com>
>     http://maillist.caucho.com/mailman/listinfo/resin-interest
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> resin-interest mailing list
> resin-interest@caucho.com
> http://maillist.caucho.com/mailman/listinfo/resin-interest
>   

_______________________________________________
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest

Reply via email to