Could not find datasource: jdbc/msmydb, NamingException.....

N

nkunkov

Hello,
I have a Oracle application server 10.1.2 running on a Unix box, to
which I'm trying to deploy a java application that uses hibernate. Not
sure if this an oracle or hibernate question but maybe you can help me.
Here are the exceptions that I get:

Could not find datasource: jdbc/msmydb
javax.naming.NamingException: Not in an application scope - start Orion
with the -userThreads switch if using user-created threads
org.hibernate.HibernateException: Could not find datasource

If I try to get a connection without using hibernate it works fine, but
hibernate throws exceptions...

Here are my configurations:
In my web.xml I have the following:
<servlet>
<servlet-name>apploader</servlet-name>
<servlet-class>com.mypackage.MyServlet</servlet-class>
<init-param>
<param-name>DataSource</param-name>
<param-value>jdbc/msmydb</param-value>
</init-param>
<load-on-startup>200</load-on-startup>
</servlet>


In my hibernate file (hibernate.cfg.xml) i have the following:
<property name="hibernate.connection.datasource">jdbc/msmydb</property>


In my datasources.xml file i have the following:
<data-source

name="MYDB"
location="jdbc/msmydb"
class="oracle.jdbc.pool.OracleDataSource"
password="mypassword"
connection-driver="oracle.jdbc.driver.OracleDriver"
username="user"
min-connections="5"
max-connections="10"
url="jdbc:eek:racle:thin....................................................
/>

Any help on this issue will be greatly appreciated..
Thanks
NK">
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,077
Latest member
SangMoor21

Latest Threads

Top