You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by ng...@kouame.us on 2006/02/27 21:08:50 UTC

Oracle 10G and JNDI & DataSource - Configuration files

Hi all,

I am trying to connect to an Oracle 10G database, which is located on a
server on the same network. My application and Tomcat 5.5 reside on the
same Windows 2003 machine. Oracle 10G is installed on a separate Windows
2003 machine. The name for the Oracle service is "OracleServicensmsb";
the database to connect is named "msbdb" and resides on the oracle
server, which is called msbdev2; the port is 1521. I am unable to
connect and all my tests point to errors in the configuration files. I
have the following:

In $CATALINA_HOME\conf\server.xml

<Resource name="jdbc/msbDB"  auth="Container" 
type="javax.sql.DataSource"
	      username="userMe"  password="myPassword"  
	     
driverClassName="jdbc:oracle:thin:@msbdev2:1521:OracleServicensbdb"/>


In $CATALINA_HOME\conf\context.xml

  <Resource name="jdbc/msbDB"  auth="Container"  
   type="javax.sql.DataSource"  username="userMe"  password="myPassword"
   driverClassName="jdbc:oracle:thin:@msbdev2:1521:OracleServensbdb" 
   url="jdbc:msbdev2:msbDB"/>

In my application's web.xml file, I have:

<resource-ref>
       <res-ref-name>jdbc/msbDB</res-ref-name>
       <res-type>javax.sql.DataSource</res-type>
       <res-auth>Container</res-auth>
     </resource-ref>

Am I missing something or doing something wrong? Thank you for your
help.

Nguessan


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Oracle 10G and JNDI & DataSource - Configuration files

Posted by Shankar Unni <sh...@netscape.net>.
nguessan@kouame.us wrote:

> 	      username="userMe"  password="myPassword"  
> driverClassName="jdbc:oracle:thin:@msbdev2:1521:OracleServicensbdb"/>

Whoa!

Your driverClassName must be the class name of the oracle driver class: 
oracle.jdbc.driver.OracleDriver.

It's your url= that's "jdbc:oracle:thin:@blahblah:".


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org