tomcat 5 and oracle 8i

2004-01-12 Thread Jeremy Martinez
I am running tomcat 5 and java 1.4.  I am attempting to connect to an oracle 8i 
database.   However, the drivers listed on oracles download site for the jdbc's do not 
have this combination of tomcat5, java 1.4 and oracle 8i.   Has anyone got this 
combination working?  And if so, was there anything special that had to be done to 
make it work?

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: tomcat 5 and oracle 8i

2004-01-12 Thread Reynir Þór Hübner
Hi, 
I use tomcat 4.1.x with oracle all the time, I don’t think the version
of tomcat matters, as there should not be any conflicts between
libraries in tomcat and the driver. 

Just get the driver for j2sdk 1.4 and oracle 8i, the only special
thing you need to do, is use the Thin driver, and then refer to the
documentation on how to create a valid jdbc url, and make connection to
the database. 

Hope it helps

-reynir




 -Original Message-
 From: Jeremy Martinez [mailto:[EMAIL PROTECTED] 
 Sent: 12. janúar 2004 16:29
 To: [EMAIL PROTECTED]
 Subject: tomcat 5 and oracle 8i
 
 
 I am running tomcat 5 and java 1.4.  I am attempting to 
 connect to an oracle 8i database.   However, the drivers 
 listed on oracles download site for the jdbc's do not have 
 this combination of tomcat5, java 1.4 and oracle 8i.   Has 
 anyone got this combination working?  And if so, was there 
 anything special that had to be done to make it work?
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: tomcat 5 and oracle 8i

2004-01-12 Thread Bruno.Melloni
I am using JDK1.4.2_03, and the oracle drivers ojdbc14.jar.  No problems.

-Original Message-
From: ext Jeremy Martinez [mailto:[EMAIL PROTECTED]
Sent: Monday, January 12, 2004 10:29 AM
To: [EMAIL PROTECTED]
Subject: tomcat 5 and oracle 8i


I am running tomcat 5 and java 1.4.  I am attempting to connect to an oracle 8i 
database.   However, the drivers listed on oracles download site for the jdbc's do not 
have this combination of tomcat5, java 1.4 and oracle 8i.   Has anyone got this 
combination working?  And if so, was there anything special that had to be done to 
make it work?

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: tomcat 5 and oracle 8i

2004-01-12 Thread Shapira, Yoav

Howdy,
The oracle drivers don't care what servlet container you're running.
We've been using oracle 8i with tomcat 5 for a long time now, using
oracle's normal drivers (ojdbc14.jar is the file name).

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Jeremy Martinez [mailto:[EMAIL PROTECTED]
Sent: Monday, January 12, 2004 11:29 AM
To: [EMAIL PROTECTED]
Subject: tomcat 5 and oracle 8i

I am running tomcat 5 and java 1.4.  I am attempting to connect to an
oracle 8i database.   However, the drivers listed on oracles download
site
for the jdbc's do not have this combination of tomcat5, java 1.4 and
oracle
8i.   Has anyone got this combination working?  And if so, was there
anything special that had to be done to make it work?

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat 5 and oracle

2003-12-12 Thread Altankov Peter
By the way, since you are redefining the Resource in your metrology2.xml, you can 
actually remove it form the server.xml.


-Original Message-
From: Jonathan Drnek [mailto:[EMAIL PROTECTED] 
Sent: 11  2003 . 21:05
To: Tomcat Users List
Subject: RE: Tomcat 5 and oracle


I got it. 

I was not putting the ResourceParams in my metrology2.xml file

Thanks for the help

Jon

-Original Message-
From: Jonathan Drnek 
Sent: Thursday, December 11, 2003 1:30 PM
To: Tomcat Users List
Subject: RE: Tomcat 5 and oracle

I've been spending some time RTFM with out much progress.

I don't know if it matters but my data source is setup under GlobalNamingResources

I do not have any context defined in server.xml  instead I have the context in a file 
at conf/Catalina/localhost/metrology2.xml and it looks like

Context debug=9 displayName=Metrology Lab docBase=metrology2 path=/metrology2
  Loader className=org.apache.catalina.loader.WebappLoader debug=9/
  Logger className=org.apache.catalina.logger.FileLogger debug=9 
prefix=metrology2 suffix=.txt timestamp=true verbosity=4/
  Resource auth=Container description=Oracle Datasource example name=jdbc/ordt 
type=javax.sql.DataSource/ /Context 

I didn't actually create it.  Tomcat must have created it for me.

Web.xml is located in webapps/metrology2/WEB-INF and looks like

Context debug=9 displayName=Metrology Lab docBase=metrology2 path=/metrology2
  Loader className=org.apache.catalina.loader.WebappLoader debug=9/
  Logger className=org.apache.catalina.logger.FileLogger debug=9 
prefix=metrology2 suffix=.txt timestamp=true verbosity=4/
  Resource auth=Container description=Oracle Datasource example name=jdbc/ordt 
type=javax.sql.DataSource/ /Context

My default server.xml got overwritten when I was playing around with the admin tool 
and now looks like:

?xml version='1.0' encoding='utf-8'?
Server
  Listener className=org.apache.catalina.mbeans.ServerLifecycleListener/
  Listener className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener/
  GlobalNamingResources
Environment name=simpleValue type=java.lang.Integer value=30/
Resource auth=Container description=User database that can be updated and 
saved name=UserDatabase type=org.apache.catalina.UserDatabase/
Resource auth=Container description=orderline test database name=jdbc/ordt  
scope=Shareable type=javax.sql.DataSource/
ResourceParams name=UserDatabase
  parameter
namefactory/name
valueorg.apache.catalina.users.MemoryUserDatabaseFactory/value
  /parameter
  parameter
namepathname/name
valueconf/tomcat-users.xml/value
  /parameter
/ResourceParams
ResourceParams name=jdbc/ordt
  parameter
namefactory/name
valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
  /parameter
  parameter
nameurl/name
valuejdbc:oracle:thin:@holl302h:1521:ORDT/value
  /parameter
  parameter
namepassword/name
valuejunk/value
  /parameter
  parameter
namemaxActive/name
value4/value
  /parameter
  parameter
namemaxWait/name
value5000/value
  /parameter
  parameter
namedriverClassName/name
valueoracle.jdbc.driver.OracleDriver/value
  /parameter
  parameter
nameusername/name
valueordline/value
  /parameter
  parameter
namemaxIdle/name
value2/value
  /parameter
/ResourceParams
  /GlobalNamingResources 
  Service name=Catalina
Connector acceptCount=100 connectionTimeout=2 disableUploadTimeout=true 
port=8080 redirectPort=8443
/Connector
Connector port=8009 protocol=AJP/1.3 
protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler redirectPort=8443
/Connector
Engine defaultHost=localhost name=Catalina
  Host appBase=webapps name=localhost
Logger className=org.apache.catalina.logger.FileLogger 
prefix=localhost_log. suffix=.txt timestamp=true/
  /Host
  Logger className=org.apache.catalina.logger.FileLogger prefix=catalina_log. 
suffix=.txt timestamp=true/
  Realm className=org.apache.catalina.realm.UserDatabaseRealm/
/Engine
  /Service
/Server

I found a JSP page that will display my JNDI recources and here is part of what that 
shows

* Context: java:/ 
o Context: java:/comp 
* UserTransaction=Reference Class Name: javax.transaction.UserTransaction Reference
type: javax.transaction.UserTransaction
* Context: java:/comp/env 
* Context: java:/comp/env/jdbc 
* ordt=[EMAIL PROTECTED] 
Url - null
DriverClassName - null
Username - null
Password - null
ValidationQuery - null
NumActive - 0
NumIdle - 0


Back to the docs

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED

RE: Tomcat 5 and oracle

2003-12-11 Thread Jonathan Drnek
I've been spending some time RTFM with out much progress.

I don't know if it matters but my data source is setup under GlobalNamingResources

I do not have any context defined in server.xml  instead I have the context in a file 
at conf/Catalina/localhost/metrology2.xml and it looks like

Context debug=9 displayName=Metrology Lab docBase=metrology2 path=/metrology2
  Loader className=org.apache.catalina.loader.WebappLoader debug=9/
  Logger className=org.apache.catalina.logger.FileLogger debug=9 
prefix=metrology2 suffix=.txt timestamp=true verbosity=4/
  Resource auth=Container description=Oracle Datasource example name=jdbc/ordt 
type=javax.sql.DataSource/
/Context 

I didn't actually create it.  Tomcat must have created it for me.

Web.xml is located in webapps/metrology2/WEB-INF and looks like

Context debug=9 displayName=Metrology Lab docBase=metrology2 path=/metrology2
  Loader className=org.apache.catalina.loader.WebappLoader debug=9/
  Logger className=org.apache.catalina.logger.FileLogger debug=9 
prefix=metrology2 suffix=.txt timestamp=true verbosity=4/
  Resource auth=Container description=Oracle Datasource example name=jdbc/ordt 
type=javax.sql.DataSource/
/Context

My default server.xml got overwritten when I was playing around with the admin tool 
and now looks like:

?xml version='1.0' encoding='utf-8'?
Server
  Listener className=org.apache.catalina.mbeans.ServerLifecycleListener/
  Listener className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener/
  GlobalNamingResources
Environment name=simpleValue type=java.lang.Integer value=30/
Resource auth=Container description=User database that can be updated and 
saved name=UserDatabase type=org.apache.catalina.UserDatabase/
Resource auth=Container description=orderline test database name=jdbc/ordt  
scope=Shareable type=javax.sql.DataSource/
ResourceParams name=UserDatabase
  parameter
namefactory/name
valueorg.apache.catalina.users.MemoryUserDatabaseFactory/value
  /parameter
  parameter
namepathname/name
valueconf/tomcat-users.xml/value
  /parameter
/ResourceParams
ResourceParams name=jdbc/ordt
  parameter
namefactory/name
valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
  /parameter
  parameter
nameurl/name
valuejdbc:oracle:thin:@holl302h:1521:ORDT/value
  /parameter
  parameter
namepassword/name
valuejunk/value
  /parameter
  parameter
namemaxActive/name
value4/value
  /parameter
  parameter
namemaxWait/name
value5000/value
  /parameter
  parameter
namedriverClassName/name
valueoracle.jdbc.driver.OracleDriver/value
  /parameter
  parameter
nameusername/name
valueordline/value
  /parameter
  parameter
namemaxIdle/name
value2/value
  /parameter
/ResourceParams
  /GlobalNamingResources 
  Service name=Catalina
Connector acceptCount=100 connectionTimeout=2 disableUploadTimeout=true 
port=8080 redirectPort=8443
/Connector
Connector port=8009 protocol=AJP/1.3 
protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler redirectPort=8443
/Connector
Engine defaultHost=localhost name=Catalina
  Host appBase=webapps name=localhost
Logger className=org.apache.catalina.logger.FileLogger 
prefix=localhost_log. suffix=.txt timestamp=true/
  /Host
  Logger className=org.apache.catalina.logger.FileLogger prefix=catalina_log. 
suffix=.txt timestamp=true/
  Realm className=org.apache.catalina.realm.UserDatabaseRealm/
/Engine
  /Service
/Server

I found a JSP page that will display my JNDI recources and here is part of what that 
shows

* Context: java:/ 
o Context: java:/comp 
* UserTransaction = Reference Class Name: javax.transaction.UserTransaction Reference
type: javax.transaction.UserTransaction
* Context: java:/comp/env 
* Context: java:/comp/env/jdbc 
* ordt =[EMAIL PROTECTED] 
Url - null
DriverClassName - null
Username - null
Password - null
ValidationQuery - null
NumActive - 0
NumIdle - 0


Back to the docs

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat 5 and oracle

2003-12-11 Thread Jonathan Drnek
I got it. 

I was not putting the ResourceParams in my metrology2.xml file

Thanks for the help

Jon

-Original Message-
From: Jonathan Drnek 
Sent: Thursday, December 11, 2003 1:30 PM
To: Tomcat Users List
Subject: RE: Tomcat 5 and oracle

I've been spending some time RTFM with out much progress.

I don't know if it matters but my data source is setup under GlobalNamingResources

I do not have any context defined in server.xml  instead I have the context in a file 
at conf/Catalina/localhost/metrology2.xml and it looks like

Context debug=9 displayName=Metrology Lab docBase=metrology2 path=/metrology2
  Loader className=org.apache.catalina.loader.WebappLoader debug=9/
  Logger className=org.apache.catalina.logger.FileLogger debug=9 
prefix=metrology2 suffix=.txt timestamp=true verbosity=4/
  Resource auth=Container description=Oracle Datasource example name=jdbc/ordt 
type=javax.sql.DataSource/
/Context 

I didn't actually create it.  Tomcat must have created it for me.

Web.xml is located in webapps/metrology2/WEB-INF and looks like

Context debug=9 displayName=Metrology Lab docBase=metrology2 path=/metrology2
  Loader className=org.apache.catalina.loader.WebappLoader debug=9/
  Logger className=org.apache.catalina.logger.FileLogger debug=9 
prefix=metrology2 suffix=.txt timestamp=true verbosity=4/
  Resource auth=Container description=Oracle Datasource example name=jdbc/ordt 
type=javax.sql.DataSource/
/Context

My default server.xml got overwritten when I was playing around with the admin tool 
and now looks like:

?xml version='1.0' encoding='utf-8'?
Server
  Listener className=org.apache.catalina.mbeans.ServerLifecycleListener/
  Listener className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener/
  GlobalNamingResources
Environment name=simpleValue type=java.lang.Integer value=30/
Resource auth=Container description=User database that can be updated and 
saved name=UserDatabase type=org.apache.catalina.UserDatabase/
Resource auth=Container description=orderline test database name=jdbc/ordt  
scope=Shareable type=javax.sql.DataSource/
ResourceParams name=UserDatabase
  parameter
namefactory/name
valueorg.apache.catalina.users.MemoryUserDatabaseFactory/value
  /parameter
  parameter
namepathname/name
valueconf/tomcat-users.xml/value
  /parameter
/ResourceParams
ResourceParams name=jdbc/ordt
  parameter
namefactory/name
valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
  /parameter
  parameter
nameurl/name
valuejdbc:oracle:thin:@holl302h:1521:ORDT/value
  /parameter
  parameter
namepassword/name
valuejunk/value
  /parameter
  parameter
namemaxActive/name
value4/value
  /parameter
  parameter
namemaxWait/name
value5000/value
  /parameter
  parameter
namedriverClassName/name
valueoracle.jdbc.driver.OracleDriver/value
  /parameter
  parameter
nameusername/name
valueordline/value
  /parameter
  parameter
namemaxIdle/name
value2/value
  /parameter
/ResourceParams
  /GlobalNamingResources 
  Service name=Catalina
Connector acceptCount=100 connectionTimeout=2 disableUploadTimeout=true 
port=8080 redirectPort=8443
/Connector
Connector port=8009 protocol=AJP/1.3 
protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler redirectPort=8443
/Connector
Engine defaultHost=localhost name=Catalina
  Host appBase=webapps name=localhost
Logger className=org.apache.catalina.logger.FileLogger 
prefix=localhost_log. suffix=.txt timestamp=true/
  /Host
  Logger className=org.apache.catalina.logger.FileLogger prefix=catalina_log. 
suffix=.txt timestamp=true/
  Realm className=org.apache.catalina.realm.UserDatabaseRealm/
/Engine
  /Service
/Server

I found a JSP page that will display my JNDI recources and here is part of what that 
shows

* Context: java:/ 
o Context: java:/comp 
* UserTransaction = Reference Class Name: javax.transaction.UserTransaction Reference
type: javax.transaction.UserTransaction
* Context: java:/comp/env 
* Context: java:/comp/env/jdbc 
* ordt =[EMAIL PROTECTED] 
Url - null
DriverClassName - null
Username - null
Password - null
ValidationQuery - null
NumActive - 0
NumIdle - 0


Back to the docs

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Tomcat 5 and oracle

2003-12-10 Thread Jonathan Drnek








I am having a problem setting up a data source in
tomcat. I seem to remember having
this problem last time I played with it several moths ago but I dont
remember what I did to fix it.



I am running Tomcat 5.0.16 with JVM version 1.4.2_03-b02 on windows
2000.



I am trying to connect to an Oracle 8.1.7.1.0 database.



I have placed the ojdbc14.jar file in common\lib



The error I am getting is



javax.servlet.ServletException: Cannot create JDBC driver of class '' for connect URL 'null', cause: No suitable driver



I am using oracle.jdbc.driver.OracleDriver
because thats what the docs said, but I seem to recall that was not
correct. I just cant find
anything that tells me what other driver I should be using.





My server.xml file has



.

.

.

Resource name=jdbc/ordt
type=javax.sql.DataSource/

.

.

.

/ResourceParams

 ResourceParams name=jdbc/ordt

 parameter

 namevalidationQuery/name

 valueselect * from dual/value


/parameter

 parameter

 nameurl/name


valuejdbc:oracle:thin:@holl302h:1521:ORDT/value


/parameter

 parameter

 namepassword/name

 valuepassword/value


/parameter

 parameter

 namemaxActive/name

 value4/value


/parameter

 parameter

 namemaxWait/name

 value5000/value


/parameter

 parameter

 namedriverClassName/name


valueoracle.jdbc.driver.OracleDriver/value


/parameter

 parameter

 nameusername/name

 valueusername/value


/parameter

 parameter

 namemaxIdle/name

 value2/value


/parameter

/ResourceParams

.

.

.



web.xml looks like



?xml
version=1.0 encoding=ISO-8859-1?



!DOCTYPE web-app


PUBLIC -//Sun Microsystems, Inc.//DTD Web Application
2.3//EN


http://java.sun.com/dtd/web-app_2_3.dtd



web-app


display-nameMetrology Lab/display-name

 description


First Source Metrology Lab


/description



resource-ref

descriptionOracle Datasource
example/description

res-ref-namejdbc/ordt/res-ref-name

res-typejavax.sql.DataSource/res-type

res-authContainer/res-auth

/resource-ref 



/web-app



my code looks like



 Context
initContext = new InitialContext();

 Context
envContext = (Context)initContext.lookup(java:/comp/env);

 DataSource ds = (DataSource)envContext.lookup(jdbc/ordt);

 Connection
conn = ds.getConnection();



Thanks for any help,



Jon Drnek








-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

RE: Tomcat 5 and oracle

2003-12-10 Thread Knight, Digby
You may need the following in your server.xml ResourceParams:
 
parameter
  namefactory/name
  valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
/parameter

It's described in more detail in:
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-how
to.html
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-ho
wto.html 
-Original Message-
From: Jonathan Drnek [mailto:[EMAIL PROTECTED]
Sent: 10 December 2003 14:37
To: [EMAIL PROTECTED]
Subject: Tomcat 5 and oracle


I am having a problem setting up a data source in tomcat.  I seem to
remember having this problem last time I played with it several moths ago
but I don't remember what I did to fix it.
 
I am running Tomcat 5.0.16 with JVM version 1.4.2_03-b02 on windows 2000.
 
I am trying to connect to an Oracle 8.1.7.1.0 database.
 
I have placed the ojdbc14.jar file in common\lib
 
The error I am getting is
 
javax.servlet.ServletException: Cannot create JDBC driver of class '' for
connect URL 'null', cause: No suitable driver
 
I am using oracle.jdbc.driver.OracleDriver because that's what the docs
said, but I seem to recall that was not correct.  I just can't find anything
that tells me what other driver I should be using.
 
 
My server.xml file has
 
.
.
.
Resource name=jdbc/ordt type=javax.sql.DataSource/
.
.
.
/ResourceParams
  ResourceParams name=jdbc/ordt
  parameter
namevalidationQuery/name
valueselect * from dual/value
  /parameter
  parameter
nameurl/name
valuejdbc:oracle:thin:@holl302h:1521:ORDT/value
  /parameter
  parameter
namepassword/name
valuepassword/value
  /parameter
  parameter
namemaxActive/name
value4/value
  /parameter
  parameter
namemaxWait/name
value5000/value
  /parameter
  parameter
namedriverClassName/name
valueoracle.jdbc.driver.OracleDriver/value
  /parameter
  parameter
nameusername/name
valueusername/value
  /parameter
  parameter
namemaxIdle/name
value2/value
  /parameter
/ResourceParams
.
.
.
 
web.xml looks like
 
?xml version=1.0 encoding=ISO-8859-1?
 
!DOCTYPE web-app
PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
http://java.sun.com/dtd/web-app_2_3.dtd;
 
web-app
  display-nameMetrology Lab/display-name
  description
 First Source Metrology Lab
  /description
 
 resource-ref
 descriptionOracle Datasource example/description
 res-ref-namejdbc/ordt/res-ref-name
 res-typejavax.sql.DataSource/res-type
 res-authContainer/res-auth
/resource-ref 
 
/web-app
 
my code looks like
 
Context initContext = new InitialContext();
Context envContext  =
(Context)initContext.lookup(java:/comp/env);
DataSource ds = (DataSource)envContext.lookup(jdbc/ordt);
Connection conn = ds.getConnection();
 
Thanks for any help,
 
Jon Drnek
 


*
The information in this email and in any attachments is 
confidential and intended solely for the attention and use 
of the named addressee(s). This information may be 
subject to legal professional or other privilege or may 
otherwise be protected by work product immunity or other 
legal rules.  It must not be disclosed to any person without 
our authority.

If you are not the intended recipient, or a person 
responsible for delivering it to the intended recipient, you 
are not authorised to and must not disclose, copy, 
distribute, or retain this message or any part of it.
*



RE: Tomcat 5 and oracle

2003-12-10 Thread Jonathan Drnek
I'm not sure how that got removed, but I put it back in and it did not
help.  

I can do the following:

DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
Connection conn =
DriverManager.getConnection(jdbc:oracle:thin:@holl302h:1521:ORDT,ordl
ine,junk);

So I assume that I have the right oracle drivers etc, I just don't have
JNDI or dbcp setup right.


Thanks for the suggestion

-Original Message-
From: Knight, Digby [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 10, 2003 10:10 AM
To: [EMAIL PROTECTED]
Subject: RE: Tomcat 5 and oracle

You may need the following in your server.xml ResourceParams:
 
parameter
  namefactory/name
  valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
/parameter

It's described in more detail in:
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples
-how
to.html
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-example
s-ho
wto.html 
-Original Message-
From: Jonathan Drnek [mailto:[EMAIL PROTECTED]
Sent: 10 December 2003 14:37
To: [EMAIL PROTECTED]
Subject: Tomcat 5 and oracle


I am having a problem setting up a data source in tomcat.  I seem to
remember having this problem last time I played with it several moths
ago
but I don't remember what I did to fix it.
 
I am running Tomcat 5.0.16 with JVM version 1.4.2_03-b02 on windows
2000.
 
I am trying to connect to an Oracle 8.1.7.1.0 database.
 
I have placed the ojdbc14.jar file in common\lib
 
The error I am getting is
 
javax.servlet.ServletException: Cannot create JDBC driver of class ''
for
connect URL 'null', cause: No suitable driver
 
I am using oracle.jdbc.driver.OracleDriver because that's what the docs
said, but I seem to recall that was not correct.  I just can't find
anything
that tells me what other driver I should be using.
 
 
My server.xml file has
 
.
.
.
Resource name=jdbc/ordt type=javax.sql.DataSource/
.
.
.
/ResourceParams
  ResourceParams name=jdbc/ordt
  parameter
namevalidationQuery/name
valueselect * from dual/value
  /parameter
  parameter
nameurl/name
valuejdbc:oracle:thin:@holl302h:1521:ORDT/value
  /parameter
  parameter
namepassword/name
valuepassword/value
  /parameter
  parameter
namemaxActive/name
value4/value
  /parameter
  parameter
namemaxWait/name
value5000/value
  /parameter
  parameter
namedriverClassName/name
valueoracle.jdbc.driver.OracleDriver/value
  /parameter
  parameter
nameusername/name
valueusername/value
  /parameter
  parameter
namemaxIdle/name
value2/value
  /parameter
/ResourceParams
.
.
.
 
web.xml looks like
 
?xml version=1.0 encoding=ISO-8859-1?
 
!DOCTYPE web-app
PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
http://java.sun.com/dtd/web-app_2_3.dtd;
 
web-app
  display-nameMetrology Lab/display-name
  description
 First Source Metrology Lab
  /description
 
 resource-ref
 descriptionOracle Datasource example/description
 res-ref-namejdbc/ordt/res-ref-name
 res-typejavax.sql.DataSource/res-type
 res-authContainer/res-auth
/resource-ref 
 
/web-app
 
my code looks like
 
Context initContext = new InitialContext();
Context envContext  =
(Context)initContext.lookup(java:/comp/env);
DataSource ds = (DataSource)envContext.lookup(jdbc/ordt);
Connection conn = ds.getConnection();
 
Thanks for any help,
 
Jon Drnek
 


*
The information in this email and in any attachments is 
confidential and intended solely for the attention and use 
of the named addressee(s). This information may be 
subject to legal professional or other privilege or may 
otherwise be protected by work product immunity or other 
legal rules.  It must not be disclosed to any person without 
our authority.

If you are not the intended recipient, or a person 
responsible for delivering it to the intended recipient, you 
are not authorised to and must not disclose, copy, 
distribute, or retain this message or any part of it.
*


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



AW: Tomcat 5 and oracle

2003-12-10 Thread Ullrich, Ralf
have you tried with classes111.jar instead?

cheers,

ralf

-Ursprüngliche Nachricht-
Von: Jonathan Drnek [mailto:[EMAIL PROTECTED]
Gesendet: Mittwoch, 10. Dezember 2003 16:59
An: Tomcat Users List
Betreff: RE: Tomcat 5 and oracle


I'm not sure how that got removed, but I put it back in and it did not
help.  

I can do the following:

DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
Connection conn =
DriverManager.getConnection(jdbc:oracle:thin:@holl302h:1521:ORDT,ordl
ine,junk);

So I assume that I have the right oracle drivers etc, I just don't have
JNDI or dbcp setup right.


Thanks for the suggestion

-Original Message-
From: Knight, Digby [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 10, 2003 10:10 AM
To: [EMAIL PROTECTED]
Subject: RE: Tomcat 5 and oracle

You may need the following in your server.xml ResourceParams:
 
parameter
  namefactory/name
  valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
/parameter

It's described in more detail in:
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples
-how
to.html
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-example
s-ho
wto.html 
-Original Message-
From: Jonathan Drnek [mailto:[EMAIL PROTECTED]
Sent: 10 December 2003 14:37
To: [EMAIL PROTECTED]
Subject: Tomcat 5 and oracle


I am having a problem setting up a data source in tomcat.  I seem to
remember having this problem last time I played with it several moths
ago
but I don't remember what I did to fix it.
 
I am running Tomcat 5.0.16 with JVM version 1.4.2_03-b02 on windows
2000.
 
I am trying to connect to an Oracle 8.1.7.1.0 database.
 
I have placed the ojdbc14.jar file in common\lib
 
The error I am getting is
 
javax.servlet.ServletException: Cannot create JDBC driver of class ''
for
connect URL 'null', cause: No suitable driver
 
I am using oracle.jdbc.driver.OracleDriver because that's what the docs
said, but I seem to recall that was not correct.  I just can't find
anything
that tells me what other driver I should be using.
 
 
My server.xml file has
 
.
.
.
Resource name=jdbc/ordt type=javax.sql.DataSource/
.
.
.
/ResourceParams
  ResourceParams name=jdbc/ordt
  parameter
namevalidationQuery/name
valueselect * from dual/value
  /parameter
  parameter
nameurl/name
valuejdbc:oracle:thin:@holl302h:1521:ORDT/value
  /parameter
  parameter
namepassword/name
valuepassword/value
  /parameter
  parameter
namemaxActive/name
value4/value
  /parameter
  parameter
namemaxWait/name
value5000/value
  /parameter
  parameter
namedriverClassName/name
valueoracle.jdbc.driver.OracleDriver/value
  /parameter
  parameter
nameusername/name
valueusername/value
  /parameter
  parameter
namemaxIdle/name
value2/value
  /parameter
/ResourceParams
.
.
.
 
web.xml looks like
 
?xml version=1.0 encoding=ISO-8859-1?
 
!DOCTYPE web-app
PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
http://java.sun.com/dtd/web-app_2_3.dtd;
 
web-app
  display-nameMetrology Lab/display-name
  description
 First Source Metrology Lab
  /description
 
 resource-ref
 descriptionOracle Datasource example/description
 res-ref-namejdbc/ordt/res-ref-name
 res-typejavax.sql.DataSource/res-type
 res-authContainer/res-auth
/resource-ref 
 
/web-app
 
my code looks like
 
Context initContext = new InitialContext();
Context envContext  =
(Context)initContext.lookup(java:/comp/env);
DataSource ds = (DataSource)envContext.lookup(jdbc/ordt);
Connection conn = ds.getConnection();
 
Thanks for any help,
 
Jon Drnek
 


*
The information in this email and in any attachments is 
confidential and intended solely for the attention and use 
of the named addressee(s). This information may be 
subject to legal professional or other privilege or may 
otherwise be protected by work product immunity or other 
legal rules.  It must not be disclosed to any person without 
our authority.

If you are not the intended recipient, or a person 
responsible for delivering it to the intended recipient, you 
are not authorised to and must not disclose, copy, 
distribute, or retain this message or any part of it.
*


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Tomcat 5 and oracle

2003-12-10 Thread John Sidney-Woollett
Try using the thin driver - it's jar file is classes12.jar

Place it in [TOMCAT_HOME]/common/lib

John Sidney-Woollett

Jonathan Drnek said:
 I am having a problem setting up a data source in tomcat.  I seem to
 remember having this problem last time I played with it several moths
 ago but I don't remember what I did to fix it.

 I am running Tomcat 5.0.16 with JVM version 1.4.2_03-b02 on windows
 2000.

 I am trying to connect to an Oracle 8.1.7.1.0 database.

 I have placed the ojdbc14.jar file in common\lib

 The error I am getting is

 javax.servlet.ServletException: Cannot create JDBC driver of class ''
 for connect URL 'null', cause: No suitable driver

 I am using oracle.jdbc.driver.OracleDriver because that's what the docs
 said, but I seem to recall that was not correct.  I just can't find
 anything that tells me what other driver I should be using.


 My server.xml file has

 .
 .
 .
 Resource name=jdbc/ordt type=javax.sql.DataSource/
 .
 .
 .
 /ResourceParams
   ResourceParams name=jdbc/ordt
   parameter
 namevalidationQuery/name
 valueselect * from dual/value
   /parameter
   parameter
 nameurl/name
 valuejdbc:oracle:thin:@holl302h:1521:ORDT/value
   /parameter
   parameter
 namepassword/name
 valuepassword/value
   /parameter
   parameter
 namemaxActive/name
 value4/value
   /parameter
   parameter
 namemaxWait/name
 value5000/value
   /parameter
   parameter
 namedriverClassName/name
 valueoracle.jdbc.driver.OracleDriver/value
   /parameter
   parameter
 nameusername/name
 valueusername/value
   /parameter
   parameter
 namemaxIdle/name
 value2/value
   /parameter
 /ResourceParams
 .
 .
 .

 web.xml looks like

 ?xml version=1.0 encoding=ISO-8859-1?

 !DOCTYPE web-app
 PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
 http://java.sun.com/dtd/web-app_2_3.dtd;

 web-app
   display-nameMetrology Lab/display-name
   description
  First Source Metrology Lab
   /description

  resource-ref
  descriptionOracle Datasource example/description
  res-ref-namejdbc/ordt/res-ref-name
  res-typejavax.sql.DataSource/res-type
  res-authContainer/res-auth
 /resource-ref

 /web-app

 my code looks like

 Context initContext = new InitialContext();
 Context envContext
 (Context)initContext.lookup(java:/comp/env);
 DataSource ds = (DataSource)envContext.lookup(jdbc/ordt);
 Connection conn = ds.getConnection();

 Thanks for any help,

 Jon Drnek




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat 5 and oracle

2003-12-10 Thread Asif Chowdhary
Deploy these two files in share/common/lib directory

oracle-8.1.7nls_charset12.jar
oracle-8.1.7classes12.jar

-Original Message-
From: John Sidney-Woollett [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 10, 2003 12:25 PM
To: Jonathan Drnek
Cc: [EMAIL PROTECTED]
Subject: Re: Tomcat 5 and oracle


Try using the thin driver - it's jar file is classes12.jar

Place it in [TOMCAT_HOME]/common/lib

John Sidney-Woollett

Jonathan Drnek said:
 I am having a problem setting up a data source in tomcat.  I seem to
 remember having this problem last time I played with it several moths
 ago but I don't remember what I did to fix it.

 I am running Tomcat 5.0.16 with JVM version 1.4.2_03-b02 on windows
 2000.

 I am trying to connect to an Oracle 8.1.7.1.0 database.

 I have placed the ojdbc14.jar file in common\lib

 The error I am getting is

 javax.servlet.ServletException: Cannot create JDBC driver of class ''
 for connect URL 'null', cause: No suitable driver

 I am using oracle.jdbc.driver.OracleDriver because that's what the docs
 said, but I seem to recall that was not correct.  I just can't find
 anything that tells me what other driver I should be using.


 My server.xml file has

 .
 .
 .
 Resource name=jdbc/ordt type=javax.sql.DataSource/
 .
 .
 .
 /ResourceParams
   ResourceParams name=jdbc/ordt
   parameter
 namevalidationQuery/name
 valueselect * from dual/value
   /parameter
   parameter
 nameurl/name
 valuejdbc:oracle:thin:@holl302h:1521:ORDT/value
   /parameter
   parameter
 namepassword/name
 valuepassword/value
   /parameter
   parameter
 namemaxActive/name
 value4/value
   /parameter
   parameter
 namemaxWait/name
 value5000/value
   /parameter
   parameter
 namedriverClassName/name
 valueoracle.jdbc.driver.OracleDriver/value
   /parameter
   parameter
 nameusername/name
 valueusername/value
   /parameter
   parameter
 namemaxIdle/name
 value2/value
   /parameter
 /ResourceParams
 .
 .
 .

 web.xml looks like

 ?xml version=1.0 encoding=ISO-8859-1?

 !DOCTYPE web-app
 PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
 http://java.sun.com/dtd/web-app_2_3.dtd;

 web-app
   display-nameMetrology Lab/display-name
   description
  First Source Metrology Lab
   /description

  resource-ref
  descriptionOracle Datasource example/description
  res-ref-namejdbc/ordt/res-ref-name
  res-typejavax.sql.DataSource/res-type
  res-authContainer/res-auth
 /resource-ref

 /web-app

 my code looks like

 Context initContext = new InitialContext();
 Context envContext
 (Context)initContext.lookup(java:/comp/env);
 DataSource ds = (DataSource)envContext.lookup(jdbc/ordt);
 Connection conn = ds.getConnection();

 Thanks for any help,

 Jon Drnek




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat 5 and oracle

2003-12-10 Thread Koes, Derrick

I'm not 100% certain, but does Oracle even offer an 8.1.7/JDK 1.4
ojdbc14.jar file?  I think it is only offered for 9.2.  You are stuck with
classes12.zip.  I would try that.  The common/lib directory is the correct
place.

http://otn.oracle.com/software/tech/java/sqlj_jdbc/htdocs/jdbc817.html



-Original Message-
From: John Sidney-Woollett [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 10, 2003 12:25 PM
To: Jonathan Drnek
Cc: [EMAIL PROTECTED]
Subject: Re: Tomcat 5 and oracle

Try using the thin driver - it's jar file is classes12.jar

Place it in [TOMCAT_HOME]/common/lib

John Sidney-Woollett

Jonathan Drnek said:
 I am having a problem setting up a data source in tomcat.  I seem to
 remember having this problem last time I played with it several moths
 ago but I don't remember what I did to fix it.

 I am running Tomcat 5.0.16 with JVM version 1.4.2_03-b02 on windows
 2000.

 I am trying to connect to an Oracle 8.1.7.1.0 database.

 I have placed the ojdbc14.jar file in common\lib

 The error I am getting is

 javax.servlet.ServletException: Cannot create JDBC driver of class ''
 for connect URL 'null', cause: No suitable driver

 I am using oracle.jdbc.driver.OracleDriver because that's what the docs
 said, but I seem to recall that was not correct.  I just can't find
 anything that tells me what other driver I should be using.


 My server.xml file has

 .
 .
 .
 Resource name=jdbc/ordt type=javax.sql.DataSource/
 .
 .
 .
 /ResourceParams
   ResourceParams name=jdbc/ordt
   parameter
 namevalidationQuery/name
 valueselect * from dual/value
   /parameter
   parameter
 nameurl/name
 valuejdbc:oracle:thin:@holl302h:1521:ORDT/value
   /parameter
   parameter
 namepassword/name
 valuepassword/value
   /parameter
   parameter
 namemaxActive/name
 value4/value
   /parameter
   parameter
 namemaxWait/name
 value5000/value
   /parameter
   parameter
 namedriverClassName/name
 valueoracle.jdbc.driver.OracleDriver/value
   /parameter
   parameter
 nameusername/name
 valueusername/value
   /parameter
   parameter
 namemaxIdle/name
 value2/value
   /parameter
 /ResourceParams
 .
 .
 .

 web.xml looks like

 ?xml version=1.0 encoding=ISO-8859-1?

 !DOCTYPE web-app
 PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
 http://java.sun.com/dtd/web-app_2_3.dtd;

 web-app
   display-nameMetrology Lab/display-name
   description
  First Source Metrology Lab
   /description

  resource-ref
  descriptionOracle Datasource example/description
  res-ref-namejdbc/ordt/res-ref-name
  res-typejavax.sql.DataSource/res-type
  res-authContainer/res-auth
 /resource-ref

 /web-app

 my code looks like

 Context initContext = new InitialContext();
 Context envContext
 (Context)initContext.lookup(java:/comp/env);
 DataSource ds = (DataSource)envContext.lookup(jdbc/ordt);
 Connection conn = ds.getConnection();

 Thanks for any help,

 Jon Drnek




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
This electronic transmission is strictly confidential to Smith  Nephew and
intended solely for the addressee.  It may contain information which is
covered by legal, professional or other privilege.  If you are not the
intended addressee, or someone authorized by the intended addressee to
receive transmissions on behalf of the addressee, you must not retain,
disclose in any form, copy or take any action in reliance on this
transmission.  If you have received this transmission in error, please
notify the sender as soon as possible and destroy this message.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat 5 and oracle

2003-12-10 Thread Jonathan Drnek
Classes12.zip didn't work either, even after I renamed it to
classes12.jar 

Actually, 

DataSource ds = (DataSource)envContext.lookup(jdbc/ordt);
Connection conn = ds.getConnection();

Still didn't work and 

DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
Connection conn =
DriverManager.getConnection(jdbc:oracle:thin:@holl302h:1521:ORDT,ordl
ine,junk);

still did work.


I am going to try and download a copy of the 1.2 jdk since that is what
classes12 said it needed and try that.  

Any other suggestions?

Jon
-Original Message-
From: Koes, Derrick [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 10, 2003 12:45 PM
To: 'Tomcat Users List'
Subject: RE: Tomcat 5 and oracle


I'm not 100% certain, but does Oracle even offer an 8.1.7/JDK 1.4
ojdbc14.jar file?  I think it is only offered for 9.2.  You are stuck
with
classes12.zip.  I would try that.  The common/lib directory is the
correct
place.

http://otn.oracle.com/software/tech/java/sqlj_jdbc/htdocs/jdbc817.html




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat 5 and oracle

2003-12-10 Thread Ryan Golhar
You shouldn't have to rename it.  There is a classes12.jar file in
\oracle\ora92\jdbc\lib

Make sure you have a resource link and environment entry set up
correctly...that's where I had the most trouble...

Ryan

-Original Message-
From: Jonathan Drnek [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 10, 2003 1:11 PM
To: Tomcat Users List
Subject: RE: Tomcat 5 and oracle


Classes12.zip didn't work either, even after I renamed it to
classes12.jar 

Actually, 

DataSource ds = (DataSource)envContext.lookup(jdbc/ordt);
Connection conn = ds.getConnection();

Still didn't work and 

DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
Connection conn =
DriverManager.getConnection(jdbc:oracle:thin:@holl302h:1521:ORDT,ordl
ine,junk);

still did work.


I am going to try and download a copy of the 1.2 jdk since that is what
classes12 said it needed and try that.  

Any other suggestions?

Jon
-Original Message-
From: Koes, Derrick [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 10, 2003 12:45 PM
To: 'Tomcat Users List'
Subject: RE: Tomcat 5 and oracle


I'm not 100% certain, but does Oracle even offer an 8.1.7/JDK 1.4
ojdbc14.jar file?  I think it is only offered for 9.2.  You are stuck
with classes12.zip.  I would try that.  The common/lib directory is the
correct place.

http://otn.oracle.com/software/tech/java/sqlj_jdbc/htdocs/jdbc817.html




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat 5 and oracle

2003-12-10 Thread Koes, Derrick

I assume you've checked the state of the ds object.  Is it valid after
you've gotten it from the lookup?

In other words cast down to an Object and perform getClass, etc. to
determine it is a valid object.  If it's not chances are your XML
configuration is not good (server.xml or web.xml).

Upon further review, you need an auth attribute on your Resource since you
are using resource-ref.  See
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/context.html#Resource
%20Parameters

DBCP provides support for JDBC 2.0. On systems using a 1.4 JVM DBCP will
support JDBC 3.0. Please let us know if you have used DBCP and its JDBC 3.0
features with a 1.4 JVM.  --from Tomcat docs, sounds like 1.4 support may
be a little shaky.

You may want to try upgrading DBCP, collections, and pool jars in
common/lib.  The example mention in the docs for Oracle 8i also includes the
factory as a parameter.  See
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-examples-how
to.html#Database%20Connection%20Pool%20(DBCP)%20Configurations


The classes12.jar only comes with Oracle 9 versions.  The classes12.zip
comes with Oracle 8.1.7 and earlier.  You were correct to rename it, or
extract and re-jar.


-Original Message-
From: Jonathan Drnek [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 10, 2003 1:11 PM
To: Tomcat Users List
Subject: RE: Tomcat 5 and oracle

Classes12.zip didn't work either, even after I renamed it to
classes12.jar 

Actually, 

DataSource ds = (DataSource)envContext.lookup(jdbc/ordt);
Connection conn = ds.getConnection();

Still didn't work and 

DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
Connection conn =
DriverManager.getConnection(jdbc:oracle:thin:@holl302h:1521:ORDT,ordl
ine,junk);

still did work.


I am going to try and download a copy of the 1.2 jdk since that is what
classes12 said it needed and try that.  

Any other suggestions?

Jon
-Original Message-
From: Koes, Derrick [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 10, 2003 12:45 PM
To: 'Tomcat Users List'
Subject: RE: Tomcat 5 and oracle


I'm not 100% certain, but does Oracle even offer an 8.1.7/JDK 1.4
ojdbc14.jar file?  I think it is only offered for 9.2.  You are stuck
with
classes12.zip.  I would try that.  The common/lib directory is the
correct
place.

http://otn.oracle.com/software/tech/java/sqlj_jdbc/htdocs/jdbc817.html




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
This electronic transmission is strictly confidential to Smith  Nephew and
intended solely for the addressee.  It may contain information which is
covered by legal, professional or other privilege.  If you are not the
intended addressee, or someone authorized by the intended addressee to
receive transmissions on behalf of the addressee, you must not retain,
disclose in any form, copy or take any action in reliance on this
transmission.  If you have received this transmission in error, please
notify the sender as soon as possible and destroy this message.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat 5 and oracle

2003-12-10 Thread Paul
i have tomcat4 running with Oracle8i with jdk1.4.   Because it is jdk 1.4,
need to use the oracle9i drivers to access the oracle8i db.  I use the
following two drivers, obtained from Oracle, which work fine:

ojdbc14.jar
ocrs12.jar

i think your problem is more likely to do with server.xml, placement and/or
content:

do you define your contexts explicitly in your server.xml file?

-paul.

- Original Message - 
From: John Sidney-Woollett [EMAIL PROTECTED]
To: Jonathan Drnek [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Wednesday, December 10, 2003 12:25 PM
Subject: Re: Tomcat 5 and oracle


 Try using the thin driver - it's jar file is classes12.jar

 Place it in [TOMCAT_HOME]/common/lib

 John Sidney-Woollett

 Jonathan Drnek said:
  I am having a problem setting up a data source in tomcat.  I seem to
  remember having this problem last time I played with it several moths
  ago but I don't remember what I did to fix it.
 
  I am running Tomcat 5.0.16 with JVM version 1.4.2_03-b02 on windows
  2000.
 
  I am trying to connect to an Oracle 8.1.7.1.0 database.
 
  I have placed the ojdbc14.jar file in common\lib
 
  The error I am getting is
 
  javax.servlet.ServletException: Cannot create JDBC driver of class ''
  for connect URL 'null', cause: No suitable driver
 
  I am using oracle.jdbc.driver.OracleDriver because that's what the docs
  said, but I seem to recall that was not correct.  I just can't find
  anything that tells me what other driver I should be using.
 
 
  My server.xml file has
 
  .
  .
  .
  Resource name=jdbc/ordt type=javax.sql.DataSource/
  .
  .
  .
  /ResourceParams
ResourceParams name=jdbc/ordt
parameter
  namevalidationQuery/name
  valueselect * from dual/value
/parameter
parameter
  nameurl/name
  valuejdbc:oracle:thin:@holl302h:1521:ORDT/value
/parameter
parameter
  namepassword/name
  valuepassword/value
/parameter
parameter
  namemaxActive/name
  value4/value
/parameter
parameter
  namemaxWait/name
  value5000/value
/parameter
parameter
  namedriverClassName/name
  valueoracle.jdbc.driver.OracleDriver/value
/parameter
parameter
  nameusername/name
  valueusername/value
/parameter
parameter
  namemaxIdle/name
  value2/value
/parameter
  /ResourceParams
  .
  .
  .
 
  web.xml looks like
 
  ?xml version=1.0 encoding=ISO-8859-1?
 
  !DOCTYPE web-app
  PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
  http://java.sun.com/dtd/web-app_2_3.dtd;
 
  web-app
display-nameMetrology Lab/display-name
description
   First Source Metrology Lab
/description
 
   resource-ref
   descriptionOracle Datasource example/description
   res-ref-namejdbc/ordt/res-ref-name
   res-typejavax.sql.DataSource/res-type
   res-authContainer/res-auth
  /resource-ref
 
  /web-app
 
  my code looks like
 
  Context initContext = new InitialContext();
  Context envContext
  (Context)initContext.lookup(java:/comp/env);
  DataSource ds = (DataSource)envContext.lookup(jdbc/ordt);
  Connection conn = ds.getConnection();
 
  Thanks for any help,
 
  Jon Drnek
 
 


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]