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="jdbcracle:thin....................................................
/>
Any help on this issue will be greatly appreciated..
Thanks
NK">
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="jdbcracle:thin....................................................
/>
Any help on this issue will be greatly appreciated..
Thanks
NK">