-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Could not find datasource
PostPosted: Fri Jan 12, 2007 1:36 pm 
Newbie

Joined: Fri Jan 12, 2007 1:31 pm
Posts: 3
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.
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:oracle:thin.................................................... />

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


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 15, 2007 12:25 am 
Expert
Expert

Joined: Thu Dec 23, 2004 9:08 pm
Posts: 2008
Aren't JNDI datasources always referenced as URLs? You don't have a protocol in your address. Probably "jndi:" or "java:", though I know next to nothing about JNDI.

_________________
Code tags are your friend. Know them and use them.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.