RE: Tomcat 4.1, DBCP and Oracle

2002-12-10 Thread Sundar Chakravarthy
I got it working, just put the ResourceParam entry inside
The right context ( example in my case )in server.xml and not as the doc says i.e 
Between /context and /host


-Original Message-
From: Thomas Achleitner [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, December 10, 2002 2:11 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1, DBCP and Oracle

Good Morning!

Yes, i just renamed classes12.zip to classes12.jar. Tomcat should recognize it when 
rebooting the server!
No further repackaging necessary!

How do you know that tomcat didn't recognize classes12.jar?

thomas

-Original Message-
From: Campano, Troy [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 5:57 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1, DBCP and Oracle


Damn, I'm still getting the same error after I re-did my configuration like yours.
java.sql.SQLException: Cannot load JDBC driver class 'null'

When you put your JAR into /common/lib/ did Tomcat automatically recognize it when you 
rebooted the server?
Mine didn't, though it did in Tomcat 4.0.x.
I wonder if that had something to do with it.

Did all you do was rename classes12.zip to classes12.jar?
Did you have to do any repackaging?

thank you!

~ t r o y ~

-Original Message-
From: Thomas Achleitner [ mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 11:38 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1, DBCP and Oracle


Here are the relevant snapshots of the code (classes12.jar in common/lib):
server.xml:
Resource name=jdbc/OracleDS auth=Container 
type=oracle.jdbc.pool.OracleConnectionCacheImpl/
ResourceParams name=jdbc/OracleDS 
parameternamefactory/namevalueoracle.jdbc.pool.OracleDataSourceFactory/value/parameter
parameternameuserName/namevaluescott/value/parameter
parameternamepassword/namevaluetiger/value/parameter
parameternamedriverClassName/namevalueoracle.jdbc.OracleDriver/value/parameter
parameternameurl/namevaluejdbc:oracle:thin:@testdb:1525:ORA5/value/parameter
/ResourceParams

web.xml:
resource-ref
  descriptionResource reference to a factory for java.sql.Connection
  instances that may be used for talking to a particular
  database that is configured in the server.xml file./description
  res-ref-namejdbc/OracleDS/res-ref-name
  res-typejavax.sql.DataSource/res-type
  res-authContainer/res-auth
/resource-ref

Source code that obtains connection:
initCtx = new InitialContext();
envCtx = (Context) initCtx.lookup(java:comp/env);
dataSource = (DataSource) envCtx.lookup(jdbc/OracleDS);
con = dataSource.getConnection();

hope that helps !
thomas

-Original Message-
From: Campano, Troy [ mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 5:26 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1, DBCP and Oracle


Woa...

Could you send me a copy of your server.xml, web.xml, and how you create the 
connection in your Servlet/JSP?

That would be greatly appreciated.


thank you very much!

~ t r o y ~

-Original Message-
From: Thomas Achleitner [ mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 11:24 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1, DBCP and Oracle


hi!
tomcat 4.1.12
classes12.jar

thomas

-Original Message-
From: Campano, Troy [ mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 5:22 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1, DBCP and Oracle


Hi Thomas...

What version of Tomcat are you using?
Are you using classes12.jar (zip)?

thanks!

~ t r o y ~


-Original Message-
From: Thomas Achleitner [ mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 11:15 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1, DBCP and Oracle


hi troy!

You can take oracle.jdbc.OracleDriver as well (the oracle forum told me that 
oracle.jdbc.driver.OracleDriver is only kept for backwards compatibility). If I remove 
following parameters then it works fine with my application:
parameter
  namemaxLimit/name
  value10/value
/parameter
parameter
  nameminLimit/name
  value5/value
/parameter
parameter
  namecacheScheme/name
  value1/value
/parameter

I think you should have a look at the docu for those parameters. I just have no idea 
why they don't work. The parameter user should be changed to userName as well 
(casesensitive).

thomas

-Original Message-
From: Campano, Troy [ mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 4:53 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1, DBCP and Oracle


Hello Thomas,
I take it you mean oracle.jdbc.driver.OracleDriver.
I added it, bounced the server, and still the same dreadful error:

java.sql.SQLException: Cannot load JDBC driver class 'null'


thank you for your help though!

~ t r o y ~


-Original Message-
From: Thomas Achleitner [ mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09

RE: Tomcat 4.1, DBCP and Oracle

2002-12-09 Thread Campano, Troy
Well I figured tomcat wasn't finding my driver when I didn't hard code it in 
setclasspath.sh because I didn't see it here:
Key is java.class.path -- 
/usr/local/java/lib/tools.jar:/usr/local/jakarta-tomcat-4.1.16/common/lib/commons-dbcp.jar:/usr/local/jakarta-tomcat-4.1.16/common/lib/commons-collections.jar:/usr/local/jakarta-tomcat-4.1.16/common/lib/commons-lang.jar:/usr/local/jakarta-tomcat-4.1.16/common/lib/commons-logging-api.jar:/usr/local/jakarta-tomcat-4.1.16/common/lib/commons-pool.jar:/usr/local/jakarta-tomcat-4.1.16/common/lib/classes12.jar:/usr/local/jakarta-tomcat-4.1.16/bin/bootstrap.jar

...when I printed out java.class.path and it showed up after I hardcoded the value.
Also, my other pages which don't use connection pooling weren't finding the driver 
until I hardcoded the value.
 
 
I took your example and put in my variables for server.xml:

Context path=/inventoryServer docBase=inventoryServer debug=5 
reloadable=false crossContext=false
 

Resource name=jdbc/inventoryPool auth=Container 
type=javax.sql.DataSource/
ResourceParams name=jdbc/inventoryPool
parameter
nameusername/name
valuemyUsername/value
/parameter
parameter
namepassword/name
valuemyPassword/value
/parameter
parameter
namedriverClassName/name
valueoracle.jdbc.driver.OracleDriver/value
/parameter
parameter
nameurl/name
value mailto:jdbc:oracle:thin:[EMAIL PROTECTED]:1521: 
jdbc:oracle:thin:myschema@myNode:1521:myInstance/value
/parameter
parameter
namefactory/name
valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
/parameter
parameter
namemaxActive/name
value100/value
/parameter
parameter
namemaxIdle/name
value100/value
/parameter
parameter
namemaxWait/name
value100/value
/parameter
parameter
namevalidationQuery/name
valueSELECT 1 FROM dual/value
/parameter
/ResourceParams
/Context
 

 
My web.xml looks like this:
?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/j2ee/dtds/web-app_2_3.dtd 
http://java.sun.com/j2ee/dtds/web-app_2_3.dtd;
 
web-app
taglib
taglib-uri http://java.sun.com/jstl/core 
http://java.sun.com/jstl/core/taglib-uri
taglib-location/WEB-INF/c.tld/taglib-location
 /taglib
 taglib
taglib-uri http://java.sun.com/jstl/xml 
http://java.sun.com/jstl/xml/taglib-uri
taglib-location/WEB-INF/x.tld/taglib-location
 /taglib
 taglib
taglib-uri http://java.sun.com/jstl/fmt 
http://java.sun.com/jstl/fmt/taglib-uri
taglib-location/WEB-INF/fmt.tld/taglib-location
 /taglib
 taglib
taglib-uri http://java.sun.com/jstl/sql 
http://java.sun.com/jstl/sql/taglib-uri
taglib-location/WEB-INF/sql.tld/taglib-location
 /taglib
 
resource-ref
 descriptionOracle Datasource example/description
 res-ref-namejdbc/inventoryPool/res-ref-name
 res-typejavax.sql.DataSource/res-type
 res-authContainer/res-auth
/resource-ref
 
/web-app

 
 
And I call my connection like this:
  Connection conn = null;
  Context initContext = new InitialContext();
  Context envContext  = (Context) initContext.lookup(java:/comp/env);
  DataSource ds = (DataSource) envContext.lookup(jdbc/inventoryPool);
  conn = ds.getConnection();
 
 
Am I do anything wrong with these?
 
 
 
thanks!


Troy Campano 
Database Management / Programmer 
Liberty Mutual 
(603) 245 4092 

-Original Message-
From: Jacob Kjome [mailto:[EMAIL PROTECTED]] 
Sent: Sunday, December 08, 2002 3:27 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1, DBCP and Oracle



Yes, I have been able to do that.

When you say that Tomcat doesn't automatically recognize the file in its
classpath, how do you know that?  And when you hard code it in /bin/setclasspath.sh 
and it sees it, does your DataSource config now work?

If not, then there is a config problem.  You'll have to post your configuration in 
order to flesh that issue out.

One hint, make sure to use username and not user for DBCP configuration.  Attached 
is the DBCP config I use for your reference.

Jake

At 10:38 PM 12/7/2002 -0500, you wrote:



Hi, 
I've done this.
I renamed zip to jar. put it in /common/lib.
When I bounce tomcat...it doesn't automatically recognize the file in its
classpath, so I hard code it in /bin/setclasspath.sh, then it sees it.

I've set this up before. I have no problems setting this up with tomcat
4.0.X. It works like a charm. I've had the problem with 4.1.12 and not
4.1.16-beta.

I was working with someone on the Apache Bug database (is that the
tomcat-dev mailing list?). We didn't get anywhere.

So that's why I was wondering if there has

RE: Tomcat 4.1, DBCP and Oracle

2002-12-09 Thread Campano, Troy
I originally did it through the admin panel, but I made sure that I drilled down to 
the context of my webapp before I defined the data source.

The resource tags in my server.xml are within my webapps context.


thanks!

~ Troy Campano ~

-Original Message-
From: Dan Tran [mailto:[EMAIL PROTECTED]] 
Sent: Saturday, December 07, 2002 11:56 PM
To: Tomcat Users List
Subject: Re: Tomcat 4.1, DBCP and Oracle


Did you configure Oracle DataSource thru the web interface of Admin app in Tomcat 4.1? 
If you did, you will need to link the Global datasource to your webapp in server.xml. 
Please look up ResourceLink tag

-D
- Original Message -
From: Campano, Troy [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, December 07, 2002 7:43 PM
Subject: RE: Tomcat 4.1, DBCP and Oracle


Oh sorry, i meant i have the problem with 4.1.16-beta as well.

thank you!

-Original Message-
From: Campano, Troy
To: Jacob Kjome; [EMAIL PROTECTED]
Sent: 12/7/02 10:38 PM
Subject: RE: Tomcat 4.1, DBCP and Oracle


Hi,
I've done this.
I renamed zip to jar. put it in /common/lib.
When I bounce tomcat...it doesn't automatically recognize the file in its classpath, 
so I hard code it in /bin/setclasspath.sh, then it sees it.

I've set this up before. I have no problems setting this up with tomcat 4.0.X. It 
works like a charm. I've had the problem with 4.1.12 and not 4.1.16-beta.

I was working with someone on the Apache Bug database (is that the tomcat-dev mailing 
list?). We didn't get anywhere.

So that's why I was wondering if there has been anyone who has successfully able to 
hook up tomcat 4.1.12, DBCP and Oracle. Were you able to do it?

thank you for your help...it's greatly appreciated.

~ Troy Campano ~

-Original Message-
From: Jacob Kjome
To: Tomcat Users List
Sent: 12/7/02 2:57 PM
Subject: RE: Tomcat 4.1, DBCP and Oracle


1.  Rename classes12.zip to classes12.jar.  You don't have to repackage the classes, 
simply rename the file. 2.  Put classes12.jar in CATALINA_HOME/common/lib.  That is 
the *only* place it can go because both the server and the application require access 
to it.  Libraries under the common (jars in /lib or /endorsed and class files in 
/classes) directory are seen by both the appserver and webapps unlike stuff under 
/shared or stuff under /server.

Then follow the docs for configuration: 
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples
-howto.html

Jake

At 12:45 PM 12/7/2002 -0500, you wrote:
Oh yeah...the error I get is:
java.sql.SQLException: Cannot load JDBC driver class 'null'


~ t r o y ~


   -Original Message-
  From: Campano, Troy
  Sent: Saturday, December 07, 2002 12:44 PM
  To:   '[EMAIL PROTECTED]'
  Subject:  Tomcat 4.1, DBCP and Oracle
 
  Has anyone been able to get Tomcat 4.1.12 or Tomcat 4.1.16 working
with
 DBCP and Oracle (classes12.zip)?
  I've tried a billion combinations of configurations and nothing
works.
 
  I've see other people on the web have also had this problem. I've 
  tried for months to figure this out and I've opened bug cases,
but
 nothing seems to work.
 
  Anyone able to do it?
 
  thank you!
 
  ~ Troy Campano ~

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


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

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

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




RE: Tomcat 4.1, DBCP and Oracle

2002-12-09 Thread Campano, Troy
Nope...no luck.
Same error:
java.sql.SQLException: Cannot load JDBC driver class 'null'

My server.xml looks like this now:

Context path=/inventoryServer docBase=inventoryServer debug=5 
reloadable=false crossContext=false
  Resource name=jdbc/inventoryPool 
type=oracle.jdbc.pool.OracleConnectionCacheImpl/
  ResourceParams name=jdbc/inventoryPool
parameter
  namefactory/name
  valueoracle.jdbc.pool.OracleDataSourceFactory/value
/parameter
parameter
  nameurl/name
  valuejdbc:oracle:thin:@myNode:1521:myIstance/value
/parameter
parameter
  nameuser/name
  valuemyUser/value
/parameter
parameter
  namepassword/name
  valuemyPass/value
/parameter
parameter
  namemaxLimit/name
  value10/value
/parameter
parameter
  nameminLimit/name
  value5/value
/parameter
parameter
  namecacheScheme/name
  value1/value
/parameter
  /ResourceParams
/Context



Any ideas?

~ t r o y ~

-Original Message-
From: Balzarotti Paolo [mailto:[EMAIL PROTECTED]] 
Sent: Monday, December 09, 2002 10:11 AM
To: Campano, Troy
Subject: R: Tomcat 4.1, DBCP and Oracle


No,
they suggest to use an oracle.jdbc.pool.OracleConnectionCacheImpl
and an oracle.jdbc.pool.OracleDataSourceFactory
look in chapter 5 
It's an old post, I don't know its validity 8-?

-


 Oracle JDBC DataSource Example
This example shows how to configure Tomcat to use Oracle's JDBC connection cache data 
source.

First ensure the Oracle JDBC driver is installed correctly. The Oracle drivers can 
typically be located in the $ORACLE_HOME/jdbc/lib directory:

The Oracle JDBC driver must be added to the $CATALINA_HOME/common/lib directory, so 
that it can be loaded as a JNDI Resource. 
Ensure the driver file(s) has a .jar extension, so that it can be automatically loaded 
by Tomcat's class loader. 
Add a Tomcat Resource and ResourceParams element to the web application's Context in 
the $CATALINA_HOME/conf/server.xml file:

Context ... ... Resource name=jdbc/EmployeeDB 
type=oracle.jdbc.pool.OracleConnectionCacheImpl/ ResourceParams 
name=jdbc/EmployeeDB parameter namefactory/name 
valueoracle.jdbc.pool.OracleDataSourceFactory/value /parameter parameter 
nameurl/name valuejdbc:oracle:thin:@localhost:1521:EmployeeDB/value 
/parameter parameter nameuser/name valuedbusername/value /parameter 
parameter namepassword/name valuedbpassword/value /parameter parameter 
namemaxLimit/name value10/value /parameter parameter nameminLimit/name 
value5/value /parameter parameter namecacheScheme/name value1/value 
/parameter /ResourceParams ... /Context 
The configuration properties for Oracle's connection cache data source resource 
factory (oracle.jdbc.pool.OracleDataSourceFactory) are as follows:

cacheScheme - The connection caching scheme: 1 - Dynamic Scheme; creates connections 
as required beyond maxLimit, but will close additional connections beyond maxLimit 
when they become available. 2 - Fixed Return Null Scheme; returns null when no spare 
connections are available. 3 - Fixed Wait Scheme; blocks waiting until a spare 
connection becomes available. database login password. The default value is Dynamic 
Scheme. 
maxLimit - The maximum number of connections in the pool. The default value is 10. 
minLimit - The minimum number of connections in the pool. The default value is 0. 
password - The database login password. 
url - The JDBC connection URL. 
user - The database login username. 
Add a corresponding resource-env-ref element in the web application's web.xml file:

resource-env-ref resource-env-ref-name jdbc/EmployerDB /resource-env-ref-name 
resource-env-ref-type oracle.jdbc.pool.OracleConnectionCacheImpl 
/resource-env-ref-type resource-env-ref 
Note the OracleConnectionCacheImpl class implements the javax.sql.DataSource 
interface, and should be used like a regular data source.

 -Messaggio originale-
 Da: Campano, Troy [mailto:[EMAIL PROTECTED]]
 Inviato: lunedì 9 dicembre 2002 16.08
 A: Balzarotti Paolo
 Oggetto: RE: Tomcat 4.1, DBCP and Oracle
 
 
 Is that the same thing as this?
 
 http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasourc
 e-examples-howto.html
 
 
 -Original Message-
 From: Balzarotti Paolo [mailto:[EMAIL PROTECTED]]
 Sent: Monday, December 09, 2002 10:02 AM
 To: Campano, Troy
 Subject: R: Tomcat 4.1, DBCP and Oracle
 
 
 Hello Troy,
 look at this
 http://www.mail-archive.com/tomcat-dev@jakarta.apache.org/msg2
 7217.html
 
  -Messaggio originale-
  Da: Campano, Troy [mailto:[EMAIL PROTECTED]]
  Inviato: lunedì 9 dicembre 2002 15.30
  A: Balzarotti Paolo
  Oggetto: RE: Tomcat 4.1, DBCP and Oracle
  
  
  Hi Paolo,
  No, nothing has worked yet...unfortunately.
  
  ~ T r o y ~
  
  -Original Message-
  From: Balzarotti Paolo [mailto:[EMAIL PROTECTED]]
  Sent: Monday, December 09, 2002 5:56 AM
  To: Campano, Troy
  Subject: Tomcat 4.1, DBCP and Oracle

RE: Tomcat 4.1, DBCP and Oracle

2002-12-09 Thread Thomas Achleitner
Hi!
I think paraemter driverClassName is missing. Try:
parameternamedriverClassName/namevalueoracle.jdbc.OracleDriver/value/parameter

hope this helps!

thomas

-Original Message-
From: Campano, Troy [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 4:36 PM
To: Balzarotti Paolo; Tomcat Users List
Subject: RE: Tomcat 4.1, DBCP and Oracle


Nope...no luck.
Same error:
java.sql.SQLException: Cannot load JDBC driver class 'null'

My server.xml looks like this now:

Context path=/inventoryServer docBase=inventoryServer debug=5 
reloadable=false crossContext=false
  Resource name=jdbc/inventoryPool 
type=oracle.jdbc.pool.OracleConnectionCacheImpl/
  ResourceParams name=jdbc/inventoryPool
parameter
  namefactory/name
  valueoracle.jdbc.pool.OracleDataSourceFactory/value
/parameter
parameter
  nameurl/name
  valuejdbc:oracle:thin:@myNode:1521:myIstance/value
/parameter
parameter
  nameuser/name
  valuemyUser/value
/parameter
parameter
  namepassword/name
  valuemyPass/value
/parameter
parameter
  namemaxLimit/name
  value10/value
/parameter
parameter
  nameminLimit/name
  value5/value
/parameter
parameter
  namecacheScheme/name
  value1/value
/parameter
  /ResourceParams
/Context



Any ideas?

~ t r o y ~

-Original Message-
From: Balzarotti Paolo [mailto:[EMAIL PROTECTED]] 
Sent: Monday, December 09, 2002 10:11 AM
To: Campano, Troy
Subject: R: Tomcat 4.1, DBCP and Oracle


No,
they suggest to use an oracle.jdbc.pool.OracleConnectionCacheImpl
and an oracle.jdbc.pool.OracleDataSourceFactory
look in chapter 5 
It's an old post, I don't know its validity 8-?

-


 Oracle JDBC DataSource Example
This example shows how to configure Tomcat to use Oracle's JDBC connection cache data 
source.

First ensure the Oracle JDBC driver is installed correctly. The Oracle drivers can 
typically be located in the $ORACLE_HOME/jdbc/lib directory:

The Oracle JDBC driver must be added to the $CATALINA_HOME/common/lib directory, so 
that it can be loaded as a JNDI Resource. 
Ensure the driver file(s) has a .jar extension, so that it can be automatically loaded 
by Tomcat's class loader. 
Add a Tomcat Resource and ResourceParams element to the web application's Context in 
the $CATALINA_HOME/conf/server.xml file:

Context ... ... Resource name=jdbc/EmployeeDB 
type=oracle.jdbc.pool.OracleConnectionCacheImpl/ ResourceParams 
name=jdbc/EmployeeDB parameter namefactory/name 
valueoracle.jdbc.pool.OracleDataSourceFactory/value /parameter parameter 
nameurl/name valuejdbc:oracle:thin:@localhost:1521:EmployeeDB/value 
/parameter parameter nameuser/name valuedbusername/value /parameter 
parameter namepassword/name valuedbpassword/value /parameter parameter 
namemaxLimit/name value10/value /parameter parameter nameminLimit/name 
value5/value /parameter parameter namecacheScheme/name value1/value 
/parameter /ResourceParams ... /Context 
The configuration properties for Oracle's connection cache data source resource 
factory (oracle.jdbc.pool.OracleDataSourceFactory) are as follows:

cacheScheme - The connection caching scheme: 1 - Dynamic Scheme; creates connections 
as required beyond maxLimit, but will close additional connections beyond maxLimit 
when they become available. 2 - Fixed Return Null Scheme; returns null when no spare 
connections are available. 3 - Fixed Wait Scheme; blocks waiting until a spare 
connection becomes available. database login password. The default value is Dynamic 
Scheme. 
maxLimit - The maximum number of connections in the pool. The default value is 10. 
minLimit - The minimum number of connections in the pool. The default value is 0. 
password - The database login password. 
url - The JDBC connection URL. 
user - The database login username. 
Add a corresponding resource-env-ref element in the web application's web.xml file:

resource-env-ref resource-env-ref-name jdbc/EmployerDB /resource-env-ref-name 
resource-env-ref-type oracle.jdbc.pool.OracleConnectionCacheImpl 
/resource-env-ref-type resource-env-ref 
Note the OracleConnectionCacheImpl class implements the javax.sql.DataSource 
interface, and should be used like a regular data source.

 -Messaggio originale-
 Da: Campano, Troy [mailto:[EMAIL PROTECTED]]
 Inviato: lunedì 9 dicembre 2002 16.08
 A: Balzarotti Paolo
 Oggetto: RE: Tomcat 4.1, DBCP and Oracle
 
 
 Is that the same thing as this?
 
 http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasourc
 e-examples-howto.html
 
 
 -Original Message-
 From: Balzarotti Paolo [mailto:[EMAIL PROTECTED]]
 Sent: Monday, December 09, 2002 10:02 AM
 To: Campano, Troy
 Subject: R: Tomcat 4.1, DBCP and Oracle
 
 
 Hello Troy,
 look at this
 http://www.mail-archive.com/tomcat-dev@jakarta.apache.org/msg2
 7217.html
 
  -Messaggio originale-
  Da: Campano, Troy [mailto:[EMAIL PROTECTED]]
  Inviato: lunedì 9

RE: Tomcat 4.1, DBCP and Oracle

2002-12-09 Thread Campano, Troy
Hello Thomas, 
I take it you mean oracle.jdbc.driver.OracleDriver.
I added it, bounced the server, and still the same dreadful error:

java.sql.SQLException: Cannot load JDBC driver class 'null'


thank you for your help though!

~ t r o y ~


-Original Message-
From: Thomas Achleitner [mailto:[EMAIL PROTECTED]] 
Sent: Monday, December 09, 2002 10:44 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1, DBCP and Oracle


Hi!
I think paraemter driverClassName is missing. Try: 
parameternamedriverClassName/namevalueoracle.jdbc.OracleDriver/value/parameter

hope this helps!

thomas

-Original Message-
From: Campano, Troy [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 4:36 PM
To: Balzarotti Paolo; Tomcat Users List
Subject: RE: Tomcat 4.1, DBCP and Oracle


Nope...no luck.
Same error:
java.sql.SQLException: Cannot load JDBC driver class 'null'

My server.xml looks like this now:

Context path=/inventoryServer docBase=inventoryServer debug=5 
reloadable=false crossContext=false
  Resource name=jdbc/inventoryPool 
type=oracle.jdbc.pool.OracleConnectionCacheImpl/
  ResourceParams name=jdbc/inventoryPool
parameter
  namefactory/name
  valueoracle.jdbc.pool.OracleDataSourceFactory/value
/parameter
parameter
  nameurl/name
  valuejdbc:oracle:thin:@myNode:1521:myIstance/value
/parameter
parameter
  nameuser/name
  valuemyUser/value
/parameter
parameter
  namepassword/name
  valuemyPass/value
/parameter
parameter
  namemaxLimit/name
  value10/value
/parameter
parameter
  nameminLimit/name
  value5/value
/parameter
parameter
  namecacheScheme/name
  value1/value
/parameter
  /ResourceParams
/Context



Any ideas?

~ t r o y ~

-Original Message-
From: Balzarotti Paolo [mailto:[EMAIL PROTECTED]] 
Sent: Monday, December 09, 2002 10:11 AM
To: Campano, Troy
Subject: R: Tomcat 4.1, DBCP and Oracle


No,
they suggest to use an oracle.jdbc.pool.OracleConnectionCacheImpl
and an oracle.jdbc.pool.OracleDataSourceFactory
look in chapter 5 
It's an old post, I don't know its validity 8-?

-


 Oracle JDBC DataSource Example
This example shows how to configure Tomcat to use Oracle's JDBC connection cache data 
source.

First ensure the Oracle JDBC driver is installed correctly. The Oracle drivers can 
typically be located in the $ORACLE_HOME/jdbc/lib directory:

The Oracle JDBC driver must be added to the $CATALINA_HOME/common/lib directory, so 
that it can be loaded as a JNDI Resource. 
Ensure the driver file(s) has a .jar extension, so that it can be automatically loaded 
by Tomcat's class loader. 
Add a Tomcat Resource and ResourceParams element to the web application's Context in 
the $CATALINA_HOME/conf/server.xml file:

Context ... ... Resource name=jdbc/EmployeeDB 
type=oracle.jdbc.pool.OracleConnectionCacheImpl/ ResourceParams 
name=jdbc/EmployeeDB parameter namefactory/name 
valueoracle.jdbc.pool.OracleDataSourceFactory/value /parameter parameter 
nameurl/name valuejdbc:oracle:thin:@localhost:1521:EmployeeDB/value 
/parameter parameter nameuser/name valuedbusername/value /parameter 
parameter namepassword/name valuedbpassword/value /parameter parameter 
namemaxLimit/name value10/value /parameter parameter nameminLimit/name 
value5/value /parameter parameter namecacheScheme/name value1/value 
/parameter /ResourceParams ... /Context 
The configuration properties for Oracle's connection cache data source resource 
factory (oracle.jdbc.pool.OracleDataSourceFactory) are as follows:

cacheScheme - The connection caching scheme: 1 - Dynamic Scheme; creates connections 
as required beyond maxLimit, but will close additional connections beyond maxLimit 
when they become available. 2 - Fixed Return Null Scheme; returns null when no spare 
connections are available. 3 - Fixed Wait Scheme; blocks waiting until a spare 
connection becomes available. database login password. The default value is Dynamic 
Scheme. 
maxLimit - The maximum number of connections in the pool. The default value is 10. 
minLimit - The minimum number of connections in the pool. The default value is 0. 
password - The database login password. 
url - The JDBC connection URL. 
user - The database login username. 
Add a corresponding resource-env-ref element in the web application's web.xml file:

resource-env-ref resource-env-ref-name jdbc/EmployerDB /resource-env-ref-name 
resource-env-ref-type oracle.jdbc.pool.OracleConnectionCacheImpl 
/resource-env-ref-type resource-env-ref 
Note the OracleConnectionCacheImpl class implements the javax.sql.DataSource 
interface, and should be used like a regular data source.

 -Messaggio originale-
 Da: Campano, Troy [mailto:[EMAIL PROTECTED]]
 Inviato: lunedì 9 dicembre 2002 16.08
 A: Balzarotti Paolo
 Oggetto: RE: Tomcat 4.1, DBCP and Oracle
 
 
 Is that the same thing as this?
 
 http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi

RE: Tomcat 4.1, DBCP and Oracle

2002-12-09 Thread Thomas Achleitner
hi troy!

You can take oracle.jdbc.OracleDriver as well (the oracle forum told me that 
oracle.jdbc.driver.OracleDriver is only kept for backwards compatibility).
If I remove following parameters then it works fine with my application:
parameter
  namemaxLimit/name
  value10/value
/parameter
parameter
  nameminLimit/name
  value5/value
/parameter
parameter
  namecacheScheme/name
  value1/value
/parameter

I think you should have a look at the docu for those parameters. I just have no idea 
why they don't work.
The parameter user should be changed to userName as well (casesensitive).

thomas

-Original Message-
From: Campano, Troy [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 4:53 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1, DBCP and Oracle


Hello Thomas, 
I take it you mean oracle.jdbc.driver.OracleDriver.
I added it, bounced the server, and still the same dreadful error:

java.sql.SQLException: Cannot load JDBC driver class 'null'


thank you for your help though!

~ t r o y ~


-Original Message-
From: Thomas Achleitner [mailto:[EMAIL PROTECTED]] 
Sent: Monday, December 09, 2002 10:44 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1, DBCP and Oracle


Hi!
I think paraemter driverClassName is missing. Try: 
parameternamedriverClassName/namevalueoracle.jdbc.OracleDriver/value/parameter

hope this helps!

thomas

-Original Message-
From: Campano, Troy [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 4:36 PM
To: Balzarotti Paolo; Tomcat Users List
Subject: RE: Tomcat 4.1, DBCP and Oracle


Nope...no luck.
Same error:
java.sql.SQLException: Cannot load JDBC driver class 'null'

My server.xml looks like this now:

Context path=/inventoryServer docBase=inventoryServer debug=5 
reloadable=false crossContext=false
  Resource name=jdbc/inventoryPool 
type=oracle.jdbc.pool.OracleConnectionCacheImpl/
  ResourceParams name=jdbc/inventoryPool
parameter
  namefactory/name
  valueoracle.jdbc.pool.OracleDataSourceFactory/value
/parameter
parameter
  nameurl/name
  valuejdbc:oracle:thin:@myNode:1521:myIstance/value
/parameter
parameter
  nameuser/name
  valuemyUser/value
/parameter
parameter
  namepassword/name
  valuemyPass/value
/parameter
parameter
  namemaxLimit/name
  value10/value
/parameter
parameter
  nameminLimit/name
  value5/value
/parameter
parameter
  namecacheScheme/name
  value1/value
/parameter
  /ResourceParams
/Context



Any ideas?

~ t r o y ~

-Original Message-
From: Balzarotti Paolo [mailto:[EMAIL PROTECTED]] 
Sent: Monday, December 09, 2002 10:11 AM
To: Campano, Troy
Subject: R: Tomcat 4.1, DBCP and Oracle


No,
they suggest to use an oracle.jdbc.pool.OracleConnectionCacheImpl
and an oracle.jdbc.pool.OracleDataSourceFactory
look in chapter 5 
It's an old post, I don't know its validity 8-?

-


 Oracle JDBC DataSource Example
This example shows how to configure Tomcat to use Oracle's JDBC connection cache data 
source.

First ensure the Oracle JDBC driver is installed correctly. The Oracle drivers can 
typically be located in the $ORACLE_HOME/jdbc/lib directory:

The Oracle JDBC driver must be added to the $CATALINA_HOME/common/lib directory, so 
that it can be loaded as a JNDI Resource. 
Ensure the driver file(s) has a .jar extension, so that it can be automatically loaded 
by Tomcat's class loader. 
Add a Tomcat Resource and ResourceParams element to the web application's Context in 
the $CATALINA_HOME/conf/server.xml file:

Context ... ... Resource name=jdbc/EmployeeDB 
type=oracle.jdbc.pool.OracleConnectionCacheImpl/ ResourceParams 
name=jdbc/EmployeeDB parameter namefactory/name 
valueoracle.jdbc.pool.OracleDataSourceFactory/value /parameter parameter 
nameurl/name valuejdbc:oracle:thin:@localhost:1521:EmployeeDB/value 
/parameter parameter nameuser/name valuedbusername/value /parameter 
parameter namepassword/name valuedbpassword/value /parameter parameter 
namemaxLimit/name value10/value /parameter parameter nameminLimit/name 
value5/value /parameter parameter namecacheScheme/name value1/value 
/parameter /ResourceParams ... /Context 
The configuration properties for Oracle's connection cache data source resource 
factory (oracle.jdbc.pool.OracleDataSourceFactory) are as follows:

cacheScheme - The connection caching scheme: 1 - Dynamic Scheme; creates connections 
as required beyond maxLimit, but will close additional connections beyond maxLimit 
when they become available. 2 - Fixed Return Null Scheme; returns null when no spare 
connections are available. 3 - Fixed Wait Scheme; blocks waiting until a spare 
connection becomes available. database login password. The default value is Dynamic 
Scheme. 
maxLimit - The maximum number of connections in the pool. The default value is 10. 
minLimit - The minimum number of connections

RE: Tomcat 4.1, DBCP and Oracle

2002-12-09 Thread Campano, Troy
Hi Thomas...

What version of Tomcat are you using?
Are you using classes12.jar (zip)?

thanks!

~ t r o y ~


-Original Message-
From: Thomas Achleitner [mailto:[EMAIL PROTECTED]] 
Sent: Monday, December 09, 2002 11:15 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1, DBCP and Oracle


hi troy!

You can take oracle.jdbc.OracleDriver as well (the oracle forum told me that 
oracle.jdbc.driver.OracleDriver is only kept for backwards compatibility). If I remove 
following parameters then it works fine with my application:
parameter
  namemaxLimit/name
  value10/value
/parameter
parameter
  nameminLimit/name
  value5/value
/parameter
parameter
  namecacheScheme/name
  value1/value
/parameter

I think you should have a look at the docu for those parameters. I just have no idea 
why they don't work. The parameter user should be changed to userName as well 
(casesensitive).

thomas

-Original Message-
From: Campano, Troy [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 4:53 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1, DBCP and Oracle


Hello Thomas, 
I take it you mean oracle.jdbc.driver.OracleDriver.
I added it, bounced the server, and still the same dreadful error:

java.sql.SQLException: Cannot load JDBC driver class 'null'


thank you for your help though!

~ t r o y ~


-Original Message-
From: Thomas Achleitner [mailto:[EMAIL PROTECTED]] 
Sent: Monday, December 09, 2002 10:44 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1, DBCP and Oracle


Hi!
I think paraemter driverClassName is missing. Try: 
parameternamedriverClassName/namevalueoracle.jdbc.OracleDriver/value/parameter

hope this helps!

thomas

-Original Message-
From: Campano, Troy [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 4:36 PM
To: Balzarotti Paolo; Tomcat Users List
Subject: RE: Tomcat 4.1, DBCP and Oracle


Nope...no luck.
Same error:
java.sql.SQLException: Cannot load JDBC driver class 'null'

My server.xml looks like this now:

Context path=/inventoryServer docBase=inventoryServer debug=5 
reloadable=false crossContext=false
  Resource name=jdbc/inventoryPool 
type=oracle.jdbc.pool.OracleConnectionCacheImpl/
  ResourceParams name=jdbc/inventoryPool
parameter
  namefactory/name
  valueoracle.jdbc.pool.OracleDataSourceFactory/value
/parameter
parameter
  nameurl/name
  valuejdbc:oracle:thin:@myNode:1521:myIstance/value
/parameter
parameter
  nameuser/name
  valuemyUser/value
/parameter
parameter
  namepassword/name
  valuemyPass/value
/parameter
parameter
  namemaxLimit/name
  value10/value
/parameter
parameter
  nameminLimit/name
  value5/value
/parameter
parameter
  namecacheScheme/name
  value1/value
/parameter
  /ResourceParams
/Context



Any ideas?

~ t r o y ~

-Original Message-
From: Balzarotti Paolo [mailto:[EMAIL PROTECTED]] 
Sent: Monday, December 09, 2002 10:11 AM
To: Campano, Troy
Subject: R: Tomcat 4.1, DBCP and Oracle


No,
they suggest to use an oracle.jdbc.pool.OracleConnectionCacheImpl
and an oracle.jdbc.pool.OracleDataSourceFactory
look in chapter 5 
It's an old post, I don't know its validity 8-?

-


 Oracle JDBC DataSource Example
This example shows how to configure Tomcat to use Oracle's JDBC connection cache data 
source.

First ensure the Oracle JDBC driver is installed correctly. The Oracle drivers can 
typically be located in the $ORACLE_HOME/jdbc/lib directory:

The Oracle JDBC driver must be added to the $CATALINA_HOME/common/lib directory, so 
that it can be loaded as a JNDI Resource. 
Ensure the driver file(s) has a .jar extension, so that it can be automatically loaded 
by Tomcat's class loader. 
Add a Tomcat Resource and ResourceParams element to the web application's Context in 
the $CATALINA_HOME/conf/server.xml file:

Context ... ... Resource name=jdbc/EmployeeDB 
type=oracle.jdbc.pool.OracleConnectionCacheImpl/ ResourceParams 
name=jdbc/EmployeeDB parameter namefactory/name 
valueoracle.jdbc.pool.OracleDataSourceFactory/value /parameter parameter 
nameurl/name valuejdbc:oracle:thin:@localhost:1521:EmployeeDB/value 
/parameter parameter nameuser/name valuedbusername/value /parameter 
parameter namepassword/name valuedbpassword/value /parameter parameter 
namemaxLimit/name value10/value /parameter parameter nameminLimit/name 
value5/value /parameter parameter namecacheScheme/name value1/value 
/parameter /ResourceParams ... /Context 
The configuration properties for Oracle's connection cache data source resource 
factory (oracle.jdbc.pool.OracleDataSourceFactory) are as follows:

cacheScheme - The connection caching scheme: 1 - Dynamic Scheme; creates connections 
as required beyond maxLimit, but will close additional connections beyond maxLimit 
when they become available. 2 - Fixed Return Null Scheme; returns null when no spare

RE: Tomcat 4.1, DBCP and Oracle

2002-12-09 Thread Thomas Achleitner
hi!
tomcat 4.1.12
classes12.jar

thomas

-Original Message-
From: Campano, Troy [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 5:22 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1, DBCP and Oracle


Hi Thomas...

What version of Tomcat are you using?
Are you using classes12.jar (zip)?

thanks!

~ t r o y ~


-Original Message-
From: Thomas Achleitner [mailto:[EMAIL PROTECTED]] 
Sent: Monday, December 09, 2002 11:15 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1, DBCP and Oracle


hi troy!

You can take oracle.jdbc.OracleDriver as well (the oracle forum told me that 
oracle.jdbc.driver.OracleDriver is only kept for backwards compatibility). If I remove 
following parameters then it works fine with my application:
parameter
  namemaxLimit/name
  value10/value
/parameter
parameter
  nameminLimit/name
  value5/value
/parameter
parameter
  namecacheScheme/name
  value1/value
/parameter

I think you should have a look at the docu for those parameters. I just have no idea 
why they don't work. The parameter user should be changed to userName as well 
(casesensitive).

thomas

-Original Message-
From: Campano, Troy [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 4:53 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1, DBCP and Oracle


Hello Thomas, 
I take it you mean oracle.jdbc.driver.OracleDriver.
I added it, bounced the server, and still the same dreadful error:

java.sql.SQLException: Cannot load JDBC driver class 'null'


thank you for your help though!

~ t r o y ~


-Original Message-
From: Thomas Achleitner [mailto:[EMAIL PROTECTED]] 
Sent: Monday, December 09, 2002 10:44 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1, DBCP and Oracle


Hi!
I think paraemter driverClassName is missing. Try: 
parameternamedriverClassName/namevalueoracle.jdbc.OracleDriver/value/parameter

hope this helps!

thomas

-Original Message-
From: Campano, Troy [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 4:36 PM
To: Balzarotti Paolo; Tomcat Users List
Subject: RE: Tomcat 4.1, DBCP and Oracle


Nope...no luck.
Same error:
java.sql.SQLException: Cannot load JDBC driver class 'null'

My server.xml looks like this now:

Context path=/inventoryServer docBase=inventoryServer debug=5 
reloadable=false crossContext=false
  Resource name=jdbc/inventoryPool 
type=oracle.jdbc.pool.OracleConnectionCacheImpl/
  ResourceParams name=jdbc/inventoryPool
parameter
  namefactory/name
  valueoracle.jdbc.pool.OracleDataSourceFactory/value
/parameter
parameter
  nameurl/name
  valuejdbc:oracle:thin:@myNode:1521:myIstance/value
/parameter
parameter
  nameuser/name
  valuemyUser/value
/parameter
parameter
  namepassword/name
  valuemyPass/value
/parameter
parameter
  namemaxLimit/name
  value10/value
/parameter
parameter
  nameminLimit/name
  value5/value
/parameter
parameter
  namecacheScheme/name
  value1/value
/parameter
  /ResourceParams
/Context



Any ideas?

~ t r o y ~

-Original Message-
From: Balzarotti Paolo [mailto:[EMAIL PROTECTED]] 
Sent: Monday, December 09, 2002 10:11 AM
To: Campano, Troy
Subject: R: Tomcat 4.1, DBCP and Oracle


No,
they suggest to use an oracle.jdbc.pool.OracleConnectionCacheImpl
and an oracle.jdbc.pool.OracleDataSourceFactory
look in chapter 5 
It's an old post, I don't know its validity 8-?

-


 Oracle JDBC DataSource Example
This example shows how to configure Tomcat to use Oracle's JDBC connection cache data 
source.

First ensure the Oracle JDBC driver is installed correctly. The Oracle drivers can 
typically be located in the $ORACLE_HOME/jdbc/lib directory:

The Oracle JDBC driver must be added to the $CATALINA_HOME/common/lib directory, so 
that it can be loaded as a JNDI Resource. 
Ensure the driver file(s) has a .jar extension, so that it can be automatically loaded 
by Tomcat's class loader. 
Add a Tomcat Resource and ResourceParams element to the web application's Context in 
the $CATALINA_HOME/conf/server.xml file:

Context ... ... Resource name=jdbc/EmployeeDB 
type=oracle.jdbc.pool.OracleConnectionCacheImpl/ ResourceParams 
name=jdbc/EmployeeDB parameter namefactory/name 
valueoracle.jdbc.pool.OracleDataSourceFactory/value /parameter parameter 
nameurl/name valuejdbc:oracle:thin:@localhost:1521:EmployeeDB/value 
/parameter parameter nameuser/name valuedbusername/value /parameter 
parameter namepassword/name valuedbpassword/value /parameter parameter 
namemaxLimit/name value10/value /parameter parameter nameminLimit/name 
value5/value /parameter parameter namecacheScheme/name value1/value 
/parameter /ResourceParams ... /Context 
The configuration properties for Oracle's connection cache data source resource 
factory (oracle.jdbc.pool.OracleDataSourceFactory) are as follows:

cacheScheme - The connection caching

RE: Tomcat 4.1, DBCP and Oracle

2002-12-09 Thread Manavendra Gupta
Oracle has changed the driver class for version 1.1x to 1.2. In 1.1x it was
oracle.jdbc.driver.OracleDriver while in 1.2 is oracle.jdbc.OracleDriver -
so use the driver depending upon the version you are using (you can
unjar/unzip and you'd find what class you really have).


Regards,
Manav.

-Original Message-
From: Campano, Troy [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 9:52 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1, DBCP and Oracle


Hi Thomas...

What version of Tomcat are you using?
Are you using classes12.jar (zip)?

thanks!

~ t r o y ~


-Original Message-
From: Thomas Achleitner [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 11:15 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1, DBCP and Oracle


hi troy!

You can take oracle.jdbc.OracleDriver as well (the oracle forum told me that
oracle.jdbc.driver.OracleDriver is only kept for backwards compatibility).
If I remove following parameters then it works fine with my application:
parameter
  namemaxLimit/name
  value10/value
/parameter
parameter
  nameminLimit/name
  value5/value
/parameter
parameter
  namecacheScheme/name
  value1/value
/parameter

I think you should have a look at the docu for those parameters. I just have
no idea why they don't work. The parameter user should be changed to
userName as well (casesensitive).

thomas

-Original Message-
From: Campano, Troy [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 4:53 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1, DBCP and Oracle


Hello Thomas,
I take it you mean oracle.jdbc.driver.OracleDriver.
I added it, bounced the server, and still the same dreadful error:

java.sql.SQLException: Cannot load JDBC driver class 'null'


thank you for your help though!

~ t r o y ~


-Original Message-
From: Thomas Achleitner [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 10:44 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1, DBCP and Oracle


Hi!
I think paraemter driverClassName is missing. Try:
parameternamedriverClassName/namevalueoracle.jdbc.OracleDriver/valu
e/parameter

hope this helps!

thomas

-Original Message-
From: Campano, Troy [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 4:36 PM
To: Balzarotti Paolo; Tomcat Users List
Subject: RE: Tomcat 4.1, DBCP and Oracle


Nope...no luck.
Same error:
java.sql.SQLException: Cannot load JDBC driver class 'null'

My server.xml looks like this now:

Context path=/inventoryServer docBase=inventoryServer debug=5
reloadable=false crossContext=false
  Resource name=jdbc/inventoryPool
type=oracle.jdbc.pool.OracleConnectionCacheImpl/
  ResourceParams name=jdbc/inventoryPool
parameter
  namefactory/name
  valueoracle.jdbc.pool.OracleDataSourceFactory/value
/parameter
parameter
  nameurl/name
  valuejdbc:oracle:thin:@myNode:1521:myIstance/value
/parameter
parameter
  nameuser/name
  valuemyUser/value
/parameter
parameter
  namepassword/name
  valuemyPass/value
/parameter
parameter
  namemaxLimit/name
  value10/value
/parameter
parameter
  nameminLimit/name
  value5/value
/parameter
parameter
  namecacheScheme/name
  value1/value
/parameter
  /ResourceParams
/Context



Any ideas?

~ t r o y ~

-Original Message-
From: Balzarotti Paolo [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 10:11 AM
To: Campano, Troy
Subject: R: Tomcat 4.1, DBCP and Oracle


No,
they suggest to use an oracle.jdbc.pool.OracleConnectionCacheImpl
and an oracle.jdbc.pool.OracleDataSourceFactory
look in chapter 5
It's an old post, I don't know its validity 8-?

-


 Oracle JDBC DataSource Example
This example shows how to configure Tomcat to use Oracle's JDBC connection
cache data source.

First ensure the Oracle JDBC driver is installed correctly. The Oracle
drivers can typically be located in the $ORACLE_HOME/jdbc/lib directory:

The Oracle JDBC driver must be added to the $CATALINA_HOME/common/lib
directory, so that it can be loaded as a JNDI Resource.
Ensure the driver file(s) has a .jar extension, so that it can be
automatically loaded by Tomcat's class loader.
Add a Tomcat Resource and ResourceParams element to the web application's
Context in the $CATALINA_HOME/conf/server.xml file:

Context ... ... Resource name=jdbc/EmployeeDB
type=oracle.jdbc.pool.OracleConnectionCacheImpl/ ResourceParams
name=jdbc/EmployeeDB parameter namefactory/name
valueoracle.jdbc.pool.OracleDataSourceFactory/value /parameter
parameter nameurl/name
valuejdbc:oracle:thin:@localhost:1521:EmployeeDB/value /parameter
parameter nameuser/name valuedbusername/value /parameter
parameter namepassword/name valuedbpassword/value /parameter
parameter namemaxLimit/name value10/value /parameter parameter
nameminLimit/name value5/value /parameter parameter
namecacheScheme/name value1/value

RE: Tomcat 4.1, DBCP and Oracle

2002-12-09 Thread Campano, Troy
Woa...

Could you send me a copy of your server.xml, web.xml, and how you create the 
connection in your Servlet/JSP?

That would be greatly appreciated.


thank you very much!

~ t r o y ~

-Original Message-
From: Thomas Achleitner [mailto:[EMAIL PROTECTED]] 
Sent: Monday, December 09, 2002 11:24 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1, DBCP and Oracle


hi!
tomcat 4.1.12
classes12.jar

thomas

-Original Message-
From: Campano, Troy [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 5:22 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1, DBCP and Oracle


Hi Thomas...

What version of Tomcat are you using?
Are you using classes12.jar (zip)?

thanks!

~ t r o y ~


-Original Message-
From: Thomas Achleitner [mailto:[EMAIL PROTECTED]] 
Sent: Monday, December 09, 2002 11:15 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1, DBCP and Oracle


hi troy!

You can take oracle.jdbc.OracleDriver as well (the oracle forum told me that 
oracle.jdbc.driver.OracleDriver is only kept for backwards compatibility). If I remove 
following parameters then it works fine with my application:
parameter
  namemaxLimit/name
  value10/value
/parameter
parameter
  nameminLimit/name
  value5/value
/parameter
parameter
  namecacheScheme/name
  value1/value
/parameter

I think you should have a look at the docu for those parameters. I just have no idea 
why they don't work. The parameter user should be changed to userName as well 
(casesensitive).

thomas

-Original Message-
From: Campano, Troy [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 4:53 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1, DBCP and Oracle


Hello Thomas, 
I take it you mean oracle.jdbc.driver.OracleDriver.
I added it, bounced the server, and still the same dreadful error:

java.sql.SQLException: Cannot load JDBC driver class 'null'


thank you for your help though!

~ t r o y ~


-Original Message-
From: Thomas Achleitner [mailto:[EMAIL PROTECTED]] 
Sent: Monday, December 09, 2002 10:44 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1, DBCP and Oracle


Hi!
I think paraemter driverClassName is missing. Try: 
parameternamedriverClassName/namevalueoracle.jdbc.OracleDriver/value/parameter

hope this helps!

thomas

-Original Message-
From: Campano, Troy [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 4:36 PM
To: Balzarotti Paolo; Tomcat Users List
Subject: RE: Tomcat 4.1, DBCP and Oracle


Nope...no luck.
Same error:
java.sql.SQLException: Cannot load JDBC driver class 'null'

My server.xml looks like this now:

Context path=/inventoryServer docBase=inventoryServer debug=5 
reloadable=false crossContext=false
  Resource name=jdbc/inventoryPool 
type=oracle.jdbc.pool.OracleConnectionCacheImpl/
  ResourceParams name=jdbc/inventoryPool
parameter
  namefactory/name
  valueoracle.jdbc.pool.OracleDataSourceFactory/value
/parameter
parameter
  nameurl/name
  valuejdbc:oracle:thin:@myNode:1521:myIstance/value
/parameter
parameter
  nameuser/name
  valuemyUser/value
/parameter
parameter
  namepassword/name
  valuemyPass/value
/parameter
parameter
  namemaxLimit/name
  value10/value
/parameter
parameter
  nameminLimit/name
  value5/value
/parameter
parameter
  namecacheScheme/name
  value1/value
/parameter
  /ResourceParams
/Context



Any ideas?

~ t r o y ~

-Original Message-
From: Balzarotti Paolo [mailto:[EMAIL PROTECTED]] 
Sent: Monday, December 09, 2002 10:11 AM
To: Campano, Troy
Subject: R: Tomcat 4.1, DBCP and Oracle


No,
they suggest to use an oracle.jdbc.pool.OracleConnectionCacheImpl
and an oracle.jdbc.pool.OracleDataSourceFactory
look in chapter 5 
It's an old post, I don't know its validity 8-?

-


 Oracle JDBC DataSource Example
This example shows how to configure Tomcat to use Oracle's JDBC connection cache data 
source.

First ensure the Oracle JDBC driver is installed correctly. The Oracle drivers can 
typically be located in the $ORACLE_HOME/jdbc/lib directory:

The Oracle JDBC driver must be added to the $CATALINA_HOME/common/lib directory, so 
that it can be loaded as a JNDI Resource. 
Ensure the driver file(s) has a .jar extension, so that it can be automatically loaded 
by Tomcat's class loader. 
Add a Tomcat Resource and ResourceParams element to the web application's Context in 
the $CATALINA_HOME/conf/server.xml file:

Context ... ... Resource name=jdbc/EmployeeDB 
type=oracle.jdbc.pool.OracleConnectionCacheImpl/ ResourceParams 
name=jdbc/EmployeeDB parameter namefactory/name 
valueoracle.jdbc.pool.OracleDataSourceFactory/value /parameter parameter 
nameurl/name valuejdbc:oracle:thin:@localhost:1521:EmployeeDB/value 
/parameter parameter nameuser/name valuedbusername/value /parameter 
parameter namepassword/name valuedbpassword/value /parameter

RE: Tomcat 4.1, DBCP and Oracle

2002-12-09 Thread Thomas Achleitner
Here are the relevant snapshots of the code (classes12.jar in common/lib):
server.xml:
Resource name=jdbc/OracleDS auth=Container 
type=oracle.jdbc.pool.OracleConnectionCacheImpl/
ResourceParams name=jdbc/OracleDS
parameternamefactory/namevalueoracle.jdbc.pool.OracleDataSourceFactory/value/parameter
parameternameuserName/namevaluescott/value/parameter
parameternamepassword/namevaluetiger/value/parameter
parameternamedriverClassName/namevalueoracle.jdbc.OracleDriver/value/parameter
parameternameurl/namevaluejdbc:oracle:thin:@testdb:1525:ORA5/value/parameter
/ResourceParams

web.xml:
resource-ref
  descriptionResource reference to a factory for java.sql.Connection
  instances that may be used for talking to a particular
  database that is configured in the server.xml file./description
  res-ref-namejdbc/OracleDS/res-ref-name
  res-typejavax.sql.DataSource/res-type
  res-authContainer/res-auth
/resource-ref

Source code that obtains connection:
initCtx = new InitialContext();
envCtx = (Context) initCtx.lookup(java:comp/env);
dataSource = (DataSource) envCtx.lookup(jdbc/OracleDS);
con = dataSource.getConnection();

hope that helps !
thomas

-Original Message-
From: Campano, Troy [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 5:26 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1, DBCP and Oracle


Woa...

Could you send me a copy of your server.xml, web.xml, and how you create the 
connection in your Servlet/JSP?

That would be greatly appreciated.


thank you very much!

~ t r o y ~

-Original Message-
From: Thomas Achleitner [mailto:[EMAIL PROTECTED]] 
Sent: Monday, December 09, 2002 11:24 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1, DBCP and Oracle


hi!
tomcat 4.1.12
classes12.jar

thomas

-Original Message-
From: Campano, Troy [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 5:22 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1, DBCP and Oracle


Hi Thomas...

What version of Tomcat are you using?
Are you using classes12.jar (zip)?

thanks!

~ t r o y ~


-Original Message-
From: Thomas Achleitner [mailto:[EMAIL PROTECTED]] 
Sent: Monday, December 09, 2002 11:15 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1, DBCP and Oracle


hi troy!

You can take oracle.jdbc.OracleDriver as well (the oracle forum told me that 
oracle.jdbc.driver.OracleDriver is only kept for backwards compatibility). If I remove 
following parameters then it works fine with my application:
parameter
  namemaxLimit/name
  value10/value
/parameter
parameter
  nameminLimit/name
  value5/value
/parameter
parameter
  namecacheScheme/name
  value1/value
/parameter

I think you should have a look at the docu for those parameters. I just have no idea 
why they don't work. The parameter user should be changed to userName as well 
(casesensitive).

thomas

-Original Message-
From: Campano, Troy [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 4:53 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1, DBCP and Oracle


Hello Thomas, 
I take it you mean oracle.jdbc.driver.OracleDriver.
I added it, bounced the server, and still the same dreadful error:

java.sql.SQLException: Cannot load JDBC driver class 'null'


thank you for your help though!

~ t r o y ~


-Original Message-
From: Thomas Achleitner [mailto:[EMAIL PROTECTED]] 
Sent: Monday, December 09, 2002 10:44 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1, DBCP and Oracle


Hi!
I think paraemter driverClassName is missing. Try: 
parameternamedriverClassName/namevalueoracle.jdbc.OracleDriver/value/parameter

hope this helps!

thomas

-Original Message-
From: Campano, Troy [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 4:36 PM
To: Balzarotti Paolo; Tomcat Users List
Subject: RE: Tomcat 4.1, DBCP and Oracle


Nope...no luck.
Same error:
java.sql.SQLException: Cannot load JDBC driver class 'null'

My server.xml looks like this now:

Context path=/inventoryServer docBase=inventoryServer debug=5 
reloadable=false crossContext=false
  Resource name=jdbc/inventoryPool 
type=oracle.jdbc.pool.OracleConnectionCacheImpl/
  ResourceParams name=jdbc/inventoryPool
parameter
  namefactory/name
  valueoracle.jdbc.pool.OracleDataSourceFactory/value
/parameter
parameter
  nameurl/name
  valuejdbc:oracle:thin:@myNode:1521:myIstance/value
/parameter
parameter
  nameuser/name
  valuemyUser/value
/parameter
parameter
  namepassword/name
  valuemyPass/value
/parameter
parameter
  namemaxLimit/name
  value10/value
/parameter
parameter
  nameminLimit/name
  value5/value
/parameter
parameter
  namecacheScheme/name
  value1/value
/parameter
  /ResourceParams
/Context



Any ideas?

~ t r o y ~

-Original Message-
From: Balzarotti Paolo [mailto:[EMAIL PROTECTED]] 
Sent: Monday, December 09, 2002 10:11 AM
To: Campano, Troy
Subject: R: Tomcat 4.1, DBCP

RE: Tomcat 4.1, DBCP and Oracle

2002-12-09 Thread Campano, Troy
Damn, I'm still getting the same error after I re-did my configuration like yours.
java.sql.SQLException: Cannot load JDBC driver class 'null'

When you put your JAR into /common/lib/ did Tomcat automatically recognize it when you 
rebooted the server?
Mine didn't, though it did in Tomcat 4.0.x.
I wonder if that had something to do with it.

Did all you do was rename classes12.zip to classes12.jar?
Did you have to do any repackaging?

thank you!

~ t r o y ~

-Original Message-
From: Thomas Achleitner [ mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 11:38 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1, DBCP and Oracle


Here are the relevant snapshots of the code (classes12.jar in common/lib):
server.xml:
Resource name=jdbc/OracleDS auth=Container 
type=oracle.jdbc.pool.OracleConnectionCacheImpl/
ResourceParams name=jdbc/OracleDS 
parameternamefactory/namevalueoracle.jdbc.pool.OracleDataSourceFactory/value/parameter
parameternameuserName/namevaluescott/value/parameter
parameternamepassword/namevaluetiger/value/parameter
parameternamedriverClassName/namevalueoracle.jdbc.OracleDriver/value/parameter
parameternameurl/namevaluejdbc:oracle:thin:@testdb:1525:ORA5/value/parameter
/ResourceParams

web.xml:
resource-ref
  descriptionResource reference to a factory for java.sql.Connection
  instances that may be used for talking to a particular
  database that is configured in the server.xml file./description
  res-ref-namejdbc/OracleDS/res-ref-name
  res-typejavax.sql.DataSource/res-type
  res-authContainer/res-auth
/resource-ref

Source code that obtains connection:
initCtx = new InitialContext();
envCtx = (Context) initCtx.lookup(java:comp/env);
dataSource = (DataSource) envCtx.lookup(jdbc/OracleDS);
con = dataSource.getConnection();

hope that helps !
thomas

-Original Message-
From: Campano, Troy [ mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 5:26 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1, DBCP and Oracle


Woa...

Could you send me a copy of your server.xml, web.xml, and how you create the 
connection in your Servlet/JSP?

That would be greatly appreciated.


thank you very much!

~ t r o y ~

-Original Message-
From: Thomas Achleitner [ mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 11:24 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1, DBCP and Oracle


hi!
tomcat 4.1.12
classes12.jar

thomas

-Original Message-
From: Campano, Troy [ mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 5:22 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1, DBCP and Oracle


Hi Thomas...

What version of Tomcat are you using?
Are you using classes12.jar (zip)?

thanks!

~ t r o y ~


-Original Message-
From: Thomas Achleitner [ mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 11:15 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1, DBCP and Oracle


hi troy!

You can take oracle.jdbc.OracleDriver as well (the oracle forum told me that 
oracle.jdbc.driver.OracleDriver is only kept for backwards compatibility). If I remove 
following parameters then it works fine with my application:
parameter
  namemaxLimit/name
  value10/value
/parameter
parameter
  nameminLimit/name
  value5/value
/parameter
parameter
  namecacheScheme/name
  value1/value
/parameter

I think you should have a look at the docu for those parameters. I just have no idea 
why they don't work. The parameter user should be changed to userName as well 
(casesensitive).

thomas

-Original Message-
From: Campano, Troy [ mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 4:53 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1, DBCP and Oracle


Hello Thomas,
I take it you mean oracle.jdbc.driver.OracleDriver.
I added it, bounced the server, and still the same dreadful error:

java.sql.SQLException: Cannot load JDBC driver class 'null'


thank you for your help though!

~ t r o y ~


-Original Message-
From: Thomas Achleitner [ mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 10:44 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1, DBCP and Oracle


Hi!
I think paraemter driverClassName is missing. Try: 
parameternamedriverClassName/namevalueoracle.jdbc.OracleDriver/value/parameter

hope this helps!

thomas

-Original Message-
From: Campano, Troy [ mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 4:36 PM
To: Balzarotti Paolo; Tomcat Users List
Subject: RE: Tomcat 4.1, DBCP and Oracle


Nope...no luck.
Same error:
java.sql.SQLException: Cannot load JDBC driver class 'null'

My server.xml looks like this now:

Context path=/inventoryServer docBase=inventoryServer debug=5 
reloadable=false crossContext=false
  Resource name=jdbc/inventoryPool 
type

RE: Tomcat 4.1, DBCP and Oracle

2002-12-09 Thread Campano, Troy
Ok...now the problem is stranger.

I am running this on RedHat Linux.

So I downloaded Tomcat 4.1.12 for Windows (the ZIP file).
I set up Tomcat and the environment variables, and I configured my web app and Data 
Source stuff the same way...and it works!

So I'm wondering why I get this error on Linux:
java.sql.SQLException: Cannot load JDBC driver class 'null'


Can I copy my tomcat instance on my Windows machine over to Linux?
Will it run? I'm thinking that might help out find the source of this problem.


thank you!


-Original Message-
From: Thomas Achleitner [mailto:[EMAIL PROTECTED]] 
Sent: Monday, December 09, 2002 11:38 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1, DBCP and Oracle


Here are the relevant snapshots of the code (classes12.jar in common/lib):
server.xml:
Resource name=jdbc/OracleDS auth=Container 
type=oracle.jdbc.pool.OracleConnectionCacheImpl/
ResourceParams name=jdbc/OracleDS 
parameternamefactory/namevalueoracle.jdbc.pool.OracleDataSourceFactory/value/parameter
parameternameuserName/namevaluescott/value/parameter
parameternamepassword/namevaluetiger/value/parameter
parameternamedriverClassName/namevalueoracle.jdbc.OracleDriver/value/parameter
parameternameurl/namevaluejdbc:oracle:thin:@testdb:1525:ORA5/value/parameter
/ResourceParams

web.xml:
resource-ref
  descriptionResource reference to a factory for java.sql.Connection
  instances that may be used for talking to a particular
  database that is configured in the server.xml file./description
  res-ref-namejdbc/OracleDS/res-ref-name
  res-typejavax.sql.DataSource/res-type
  res-authContainer/res-auth
/resource-ref

Source code that obtains connection:
initCtx = new InitialContext();
envCtx = (Context) initCtx.lookup(java:comp/env);
dataSource = (DataSource) envCtx.lookup(jdbc/OracleDS);
con = dataSource.getConnection();

hope that helps !
thomas

-Original Message-
From: Campano, Troy [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 5:26 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1, DBCP and Oracle


Woa...

Could you send me a copy of your server.xml, web.xml, and how you create the 
connection in your Servlet/JSP?

That would be greatly appreciated.


thank you very much!

~ t r o y ~

-Original Message-
From: Thomas Achleitner [mailto:[EMAIL PROTECTED]] 
Sent: Monday, December 09, 2002 11:24 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1, DBCP and Oracle


hi!
tomcat 4.1.12
classes12.jar

thomas

-Original Message-
From: Campano, Troy [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 5:22 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1, DBCP and Oracle


Hi Thomas...

What version of Tomcat are you using?
Are you using classes12.jar (zip)?

thanks!

~ t r o y ~


-Original Message-
From: Thomas Achleitner [mailto:[EMAIL PROTECTED]] 
Sent: Monday, December 09, 2002 11:15 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1, DBCP and Oracle


hi troy!

You can take oracle.jdbc.OracleDriver as well (the oracle forum told me that 
oracle.jdbc.driver.OracleDriver is only kept for backwards compatibility). If I remove 
following parameters then it works fine with my application:
parameter
  namemaxLimit/name
  value10/value
/parameter
parameter
  nameminLimit/name
  value5/value
/parameter
parameter
  namecacheScheme/name
  value1/value
/parameter

I think you should have a look at the docu for those parameters. I just have no idea 
why they don't work. The parameter user should be changed to userName as well 
(casesensitive).

thomas

-Original Message-
From: Campano, Troy [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 4:53 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1, DBCP and Oracle


Hello Thomas, 
I take it you mean oracle.jdbc.driver.OracleDriver.
I added it, bounced the server, and still the same dreadful error:

java.sql.SQLException: Cannot load JDBC driver class 'null'


thank you for your help though!

~ t r o y ~


-Original Message-
From: Thomas Achleitner [mailto:[EMAIL PROTECTED]] 
Sent: Monday, December 09, 2002 10:44 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1, DBCP and Oracle


Hi!
I think paraemter driverClassName is missing. Try: 
parameternamedriverClassName/namevalueoracle.jdbc.OracleDriver/value/parameter

hope this helps!

thomas

-Original Message-
From: Campano, Troy [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 4:36 PM
To: Balzarotti Paolo; Tomcat Users List
Subject: RE: Tomcat 4.1, DBCP and Oracle


Nope...no luck.
Same error:
java.sql.SQLException: Cannot load JDBC driver class 'null'

My server.xml looks like this now:

Context path=/inventoryServer docBase=inventoryServer debug=5 
reloadable=false crossContext=false
  Resource name=jdbc/inventoryPool 
type=oracle.jdbc.pool.OracleConnectionCacheImpl/
  ResourceParams name=jdbc/inventoryPool
parameter
  namefactory/name
  valueoracle.jdbc.pool.OracleDataSourceFactory

RE: Tomcat 4.1, DBCP and Oracle

2002-12-09 Thread Roberto Bouza

 No only rename the .zip to .jar

Quoting Campano, Troy [EMAIL PROTECTED]:

 Damn, I'm still getting the same error after I re-did my configuration like
 yours.
 java.sql.SQLException: Cannot load JDBC driver class 'null'
 
 When you put your JAR into /common/lib/ did Tomcat automatically recognize it
 when you rebooted the server?
 Mine didn't, though it did in Tomcat 4.0.x.
 I wonder if that had something to do with it.
 
 Did all you do was rename classes12.zip to classes12.jar?
 Did you have to do any repackaging?
 
 thank you!
 
 ~ t r o y ~
 
 -Original Message-
 From: Thomas Achleitner [ mailto:[EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED]]
 Sent: Monday, December 09, 2002 11:38 AM
 To: Tomcat Users List
 Subject: RE: Tomcat 4.1, DBCP and Oracle
 
 
 Here are the relevant snapshots of the code (classes12.jar in common/lib):
 server.xml:
 Resource name=jdbc/OracleDS auth=Container
 type=oracle.jdbc.pool.OracleConnectionCacheImpl/
 ResourceParams name=jdbc/OracleDS

parameternamefactory/namevalueoracle.jdbc.pool.OracleDataSourceFactory/value/parameter
 parameternameuserName/namevaluescott/value/parameter
 parameternamepassword/namevaluetiger/value/parameter

parameternamedriverClassName/namevalueoracle.jdbc.OracleDriver/value/parameter

parameternameurl/namevaluejdbc:oracle:thin:@testdb:1525:ORA5/value/parameter
 /ResourceParams
 
 web.xml:
 resource-ref
   descriptionResource reference to a factory for java.sql.Connection
   instances that may be used for talking to a particular
   database that is configured in the server.xml file./description
   res-ref-namejdbc/OracleDS/res-ref-name
   res-typejavax.sql.DataSource/res-type
   res-authContainer/res-auth
 /resource-ref
 
 Source code that obtains connection:
 initCtx = new InitialContext();
 envCtx = (Context) initCtx.lookup(java:comp/env);
 dataSource = (DataSource) envCtx.lookup(jdbc/OracleDS);
 con = dataSource.getConnection();
 
 hope that helps !
 thomas
 
 -Original Message-
 From: Campano, Troy [ mailto:[EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED]]
 Sent: Monday, December 09, 2002 5:26 PM
 To: Tomcat Users List
 Subject: RE: Tomcat 4.1, DBCP and Oracle
 
 
 Woa...
 
 Could you send me a copy of your server.xml, web.xml, and how you create the
 connection in your Servlet/JSP?
 
 That would be greatly appreciated.
 
 
 thank you very much!
 
 ~ t r o y ~
 
 -Original Message-
 From: Thomas Achleitner [ mailto:[EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED]]
 Sent: Monday, December 09, 2002 11:24 AM
 To: Tomcat Users List
 Subject: RE: Tomcat 4.1, DBCP and Oracle
 
 
 hi!
 tomcat 4.1.12
 classes12.jar
 
 thomas
 
 -Original Message-
 From: Campano, Troy [ mailto:[EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED]]
 Sent: Monday, December 09, 2002 5:22 PM
 To: Tomcat Users List
 Subject: RE: Tomcat 4.1, DBCP and Oracle
 
 
 Hi Thomas...
 
 What version of Tomcat are you using?
 Are you using classes12.jar (zip)?
 
 thanks!
 
 ~ t r o y ~
 
 
 -Original Message-
 From: Thomas Achleitner [ mailto:[EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED]]
 Sent: Monday, December 09, 2002 11:15 AM
 To: Tomcat Users List
 Subject: RE: Tomcat 4.1, DBCP and Oracle
 
 
 hi troy!
 
 You can take oracle.jdbc.OracleDriver as well (the oracle forum told me that
 oracle.jdbc.driver.OracleDriver is only kept for backwards compatibility). If
 I remove following parameters then it works fine with my application:
 parameter
   namemaxLimit/name
   value10/value
 /parameter
 parameter
   nameminLimit/name
   value5/value
 /parameter
 parameter
   namecacheScheme/name
   value1/value
 /parameter
 
 I think you should have a look at the docu for those parameters. I just have
 no idea why they don't work. The parameter user should be changed to userName
 as well (casesensitive).
 
 thomas
 
 -Original Message-
 From: Campano, Troy [ mailto:[EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED]]
 Sent: Monday, December 09, 2002 4:53 PM
 To: Tomcat Users List
 Subject: RE: Tomcat 4.1, DBCP and Oracle
 
 
 Hello Thomas,
 I take it you mean oracle.jdbc.driver.OracleDriver.
 I added it, bounced the server, and still the same dreadful error:
 
 java.sql.SQLException: Cannot load JDBC driver class 'null'
 
 
 thank you for your help though!
 
 ~ t r o y ~
 
 
 -Original Message-
 From: Thomas Achleitner [ mailto:[EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED]]
 Sent: Monday, December 09, 2002 10:44 AM
 To: Tomcat Users List
 Subject: RE: Tomcat 4.1, DBCP and Oracle
 
 
 Hi!
 I think paraemter driverClassName is missing. Try:

parameternamedriverClassName/namevalueoracle.jdbc.OracleDriver/value/parameter
 
 hope this helps!
 
 thomas
 
 -Original Message-
 From: Campano, Troy [ mailto:[EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED]]
 Sent: Monday, December 09, 2002 4:36 PM
 To: Balzarotti Paolo; Tomcat Users List
 Subject: RE: Tomcat 4.1, DBCP and Oracle
 
 
 Nope...no luck.
 Same error:
 java.sql.SQLException

RE: Tomcat 4.1, DBCP and Oracle; Datasource is Null

2002-12-09 Thread Eddie Liang
Hi,
  I have a problem with configuring the DBCP and Oracle. My server.xml is:

Server port=8005 shutdown=SHUTDOWN debug=0


  
  Service name=Tomcat-Standalone


Connector className=org.apache.catalina.connector.http.HttpConnector
   port=8080 minProcessors=5 maxProcessors=75
   enableLookups=true redirectPort=8443
   acceptCount=10 debug=0 connectionTimeout=-1/


!-- Define an SSL HTTP/1.1 Connector on port 8443 --
!--
Connector className=org.apache.catalina.connector.http.HttpConnector
   port=8443 minProcessors=5 maxProcessors=75
   enableLookups=true
   acceptCount=10 debug=0 scheme=https secure=true
  Factory className=org.apache.catalina.net.SSLServerSocketFactory
   clientAuth=false protocol=TLS/
/Connector
--

!-- Define an AJP 1.3 Connector on port 8009 --
Connector className=org.apache.ajp.tomcat4.Ajp13Connector
   port=8009 minProcessors=5 maxProcessors=75
   acceptCount=10 debug=0/

  
Engine name=Standalone defaultHost=localhost debug=0

  
  

  !-- Global logger unless overridden at lower levels --
  Logger className=org.apache.catalina.logger.FileLogger
  prefix=catalina_log. suffix=.txt
  timestamp=true/

  !-- Because this Realm is here, an instance will be shared globally
--

  Realm className=org.apache.catalina.realm.MemoryRealm /

  !-- Replace the above Realm with one of the following to get a Realm
   stored in a database and accessed via JDBC --

  

  !-- Define the default virtual host --
  Host name=localhost debug=0 appBase=webapps unpackWARs=true



Valve className=org.apache.catalina.valves.AccessLogValve
 directory=logs  prefix=localhost_access_log.
suffix=.txt
 pattern=common/


Logger className=org.apache.catalina.logger.FileLogger
 directory=logs  prefix=localhost_log. suffix=.txt
timestamp=true/



DefaultContext reloadable=true
Resource name=jdbc/ImedgeDB auth=CONTAINER 
 type=javax.sql.DataSource / 
!-- type=oracle.jdbc.pool.OracleConnectionCacheImpl/ --
ResourceParams name=jdbc/ImedgeDB

parameternamefactory/namevalueoracle.jdbc.pool.OracleDataSourceFacto
ry/value
/parameter
parameter nameuserName/name valuei11dbs/value
/parameter
parameternamepassword/namevaluei11db5/value
/parameter
parameter namedriverClassName/name
valueoracle.jdbc.driver.OracleDriver/value /parameter
parameternameurl/name

valuejdbc:oracle:thin:@sunlab2:1521:chcity/value/parameter
/ResourceParams 
/DefaultContext

!-- Tomcat Manager Context --
Context path=/manager docBase=manager 
 debug=0 privileged=true/

!-- Tomcat Examples Context --
Context path=/examples docBase=examples debug=0
 reloadable=true crossContext=true
  Logger className=org.apache.catalina.logger.FileLogger
 prefix=localhost_examples_log. suffix=.txt
  timestamp=true/
  Ejb   name=ejb/EmplRecord type=Entity
 home=com.wombat.empl.EmployeeRecordHome
   remote=com.wombat.empl.EmployeeRecord/
  
   
  Environment name=maxExemptions type=java.lang.Integer
  value=15/
  Parameter name=context.param.name value=context.param.value
 override=false/
  Resource name=mail/Session auth=Container
type=javax.mail.Session/
  ResourceParams name=mail/Session
parameter
  namemail.smtp.host/name
  valuelocalhost/value
/parameter
  /ResourceParams  
/Context

  



  /Host

/Engine

  /Service

  !-- Define an Apache-Connector Service --
  Service name=Tomcat-Apache

Connector className=org.apache.catalina.connector.warp.WarpConnector
 port=8008 minProcessors=5 maxProcessors=75
 enableLookups=true appBase=webapps
 acceptCount=10 debug=0/

!-- Replace localhost with what your Apache ServerName is set to
--
Engine className=org.apache.catalina.connector.warp.WarpEngine
 name=Apache debug=0

  !-- Global logger unless overridden at lower levels --
  Logger className=org.apache.catalina.logger.FileLogger
  prefix=apache_log. suffix=.txt
  timestamp=true/

  !-- Because this Realm is here, an instance will be shared globally
--
  Realm className=org.apache.catalina.realm.MemoryRealm /

/Engine

  /Service

/Server
My web.xml is:
?xml version=1.0 encoding=ISO-8859-1?

!DOCTYPE web-app
PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN

RE: Tomcat 4.1, DBCP and Oracle

2002-12-09 Thread Manavendra Gupta
I had faced a similar situation, but wasn't sure why it was working on
windoze!

-Original Message-
From: Campano, Troy [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 11:15 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1, DBCP and Oracle


Ok...now the problem is stranger.

I am running this on RedHat Linux.

So I downloaded Tomcat 4.1.12 for Windows (the ZIP file).
I set up Tomcat and the environment variables, and I configured my web app
and Data Source stuff the same way...and it works!

So I'm wondering why I get this error on Linux:
java.sql.SQLException: Cannot load JDBC driver class 'null'


Can I copy my tomcat instance on my Windows machine over to Linux?
Will it run? I'm thinking that might help out find the source of this
problem.


thank you!


-Original Message-
From: Thomas Achleitner [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 11:38 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1, DBCP and Oracle


Here are the relevant snapshots of the code (classes12.jar in common/lib):
server.xml:
Resource name=jdbc/OracleDS auth=Container
type=oracle.jdbc.pool.OracleConnectionCacheImpl/
ResourceParams name=jdbc/OracleDS
parameternamefactory/namevalueoracle.jdbc.pool.OracleDataSourceFacto
ry/value/parameter
parameternameuserName/namevaluescott/value/parameter
parameternamepassword/namevaluetiger/value/parameter
parameternamedriverClassName/namevalueoracle.jdbc.OracleDriver/valu
e/parameter
parameternameurl/namevaluejdbc:oracle:thin:@testdb:1525:ORA5/value
/parameter
/ResourceParams

web.xml:
resource-ref
  descriptionResource reference to a factory for java.sql.Connection
  instances that may be used for talking to a particular
  database that is configured in the server.xml file./description
  res-ref-namejdbc/OracleDS/res-ref-name
  res-typejavax.sql.DataSource/res-type
  res-authContainer/res-auth
/resource-ref

Source code that obtains connection:
initCtx = new InitialContext();
envCtx = (Context) initCtx.lookup(java:comp/env);
dataSource = (DataSource) envCtx.lookup(jdbc/OracleDS);
con = dataSource.getConnection();

hope that helps !
thomas

-Original Message-
From: Campano, Troy [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 5:26 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1, DBCP and Oracle


Woa...

Could you send me a copy of your server.xml, web.xml, and how you create the
connection in your Servlet/JSP?

That would be greatly appreciated.


thank you very much!

~ t r o y ~

-Original Message-
From: Thomas Achleitner [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 11:24 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1, DBCP and Oracle


hi!
tomcat 4.1.12
classes12.jar

thomas

-Original Message-
From: Campano, Troy [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 5:22 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1, DBCP and Oracle


Hi Thomas...

What version of Tomcat are you using?
Are you using classes12.jar (zip)?

thanks!

~ t r o y ~


-Original Message-
From: Thomas Achleitner [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 11:15 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1, DBCP and Oracle


hi troy!

You can take oracle.jdbc.OracleDriver as well (the oracle forum told me that
oracle.jdbc.driver.OracleDriver is only kept for backwards compatibility).
If I remove following parameters then it works fine with my application:
parameter
  namemaxLimit/name
  value10/value
/parameter
parameter
  nameminLimit/name
  value5/value
/parameter
parameter
  namecacheScheme/name
  value1/value
/parameter

I think you should have a look at the docu for those parameters. I just have
no idea why they don't work. The parameter user should be changed to
userName as well (casesensitive).

thomas

-Original Message-
From: Campano, Troy [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 4:53 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1, DBCP and Oracle


Hello Thomas,
I take it you mean oracle.jdbc.driver.OracleDriver.
I added it, bounced the server, and still the same dreadful error:

java.sql.SQLException: Cannot load JDBC driver class 'null'


thank you for your help though!

~ t r o y ~


-Original Message-
From: Thomas Achleitner [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 10:44 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1, DBCP and Oracle


Hi!
I think paraemter driverClassName is missing. Try:
parameternamedriverClassName/namevalueoracle.jdbc.OracleDriver/valu
e/parameter

hope this helps!

thomas

-Original Message-
From: Campano, Troy [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 4:36 PM
To: Balzarotti Paolo; Tomcat Users List
Subject: RE: Tomcat 4.1, DBCP and Oracle


Nope...no luck.
Same error:
java.sql.SQLException: Cannot load JDBC driver class 'null'

My server.xml looks like this now:

Context path=/inventoryServer docBase=inventoryServer debug=5

RE: Tomcat 4.1, DBCP and Oracle

2002-12-09 Thread Manavendra Gupta
If you change the debug level of the root application to 4, tomcat shows
following in the thread dump (on windows):
XmlMapper: pop resource-ref org.apache.catalina.deploy.ContextResource:
ContextResource name=jdbc/myoracle, description=Oracle Datasource example,
type=javax.sql.DataSource, auth=Container, scope=Shareable]

No such message on linux though.


-Original Message-
From: Manavendra Gupta [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 10, 2002 10:30 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1, DBCP and Oracle


I had faced a similar situation, but wasn't sure why it was working on
windoze!

-Original Message-
From: Campano, Troy [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 11:15 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1, DBCP and Oracle


Ok...now the problem is stranger.

I am running this on RedHat Linux.

So I downloaded Tomcat 4.1.12 for Windows (the ZIP file).
I set up Tomcat and the environment variables, and I configured my web app
and Data Source stuff the same way...and it works!

So I'm wondering why I get this error on Linux:
java.sql.SQLException: Cannot load JDBC driver class 'null'


Can I copy my tomcat instance on my Windows machine over to Linux?
Will it run? I'm thinking that might help out find the source of this
problem.


thank you!


-Original Message-
From: Thomas Achleitner [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 11:38 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1, DBCP and Oracle


Here are the relevant snapshots of the code (classes12.jar in common/lib):
server.xml:
Resource name=jdbc/OracleDS auth=Container
type=oracle.jdbc.pool.OracleConnectionCacheImpl/
ResourceParams name=jdbc/OracleDS
parameternamefactory/namevalueoracle.jdbc.pool.OracleDataSourceFacto
ry/value/parameter
parameternameuserName/namevaluescott/value/parameter
parameternamepassword/namevaluetiger/value/parameter
parameternamedriverClassName/namevalueoracle.jdbc.OracleDriver/valu
e/parameter
parameternameurl/namevaluejdbc:oracle:thin:@testdb:1525:ORA5/value
/parameter
/ResourceParams

web.xml:
resource-ref
  descriptionResource reference to a factory for java.sql.Connection
  instances that may be used for talking to a particular
  database that is configured in the server.xml file./description
  res-ref-namejdbc/OracleDS/res-ref-name
  res-typejavax.sql.DataSource/res-type
  res-authContainer/res-auth
/resource-ref

Source code that obtains connection:
initCtx = new InitialContext();
envCtx = (Context) initCtx.lookup(java:comp/env);
dataSource = (DataSource) envCtx.lookup(jdbc/OracleDS);
con = dataSource.getConnection();

hope that helps !
thomas

-Original Message-
From: Campano, Troy [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 5:26 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1, DBCP and Oracle


Woa...

Could you send me a copy of your server.xml, web.xml, and how you create the
connection in your Servlet/JSP?

That would be greatly appreciated.


thank you very much!

~ t r o y ~

-Original Message-
From: Thomas Achleitner [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 11:24 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1, DBCP and Oracle


hi!
tomcat 4.1.12
classes12.jar

thomas

-Original Message-
From: Campano, Troy [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 5:22 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1, DBCP and Oracle


Hi Thomas...

What version of Tomcat are you using?
Are you using classes12.jar (zip)?

thanks!

~ t r o y ~


-Original Message-
From: Thomas Achleitner [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 11:15 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1, DBCP and Oracle


hi troy!

You can take oracle.jdbc.OracleDriver as well (the oracle forum told me that
oracle.jdbc.driver.OracleDriver is only kept for backwards compatibility).
If I remove following parameters then it works fine with my application:
parameter
  namemaxLimit/name
  value10/value
/parameter
parameter
  nameminLimit/name
  value5/value
/parameter
parameter
  namecacheScheme/name
  value1/value
/parameter

I think you should have a look at the docu for those parameters. I just have
no idea why they don't work. The parameter user should be changed to
userName as well (casesensitive).

thomas

-Original Message-
From: Campano, Troy [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 4:53 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1, DBCP and Oracle


Hello Thomas,
I take it you mean oracle.jdbc.driver.OracleDriver.
I added it, bounced the server, and still the same dreadful error:

java.sql.SQLException: Cannot load JDBC driver class 'null'


thank you for your help though!

~ t r o y ~


-Original Message-
From: Thomas Achleitner [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 10:44 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1, DBCP and Oracle


Hi!
I

RE: Tomcat 4.1, DBCP and Oracle

2002-12-09 Thread Thomas Achleitner
Good Morning!

Yes, i just renamed classes12.zip to classes12.jar. Tomcat should recognize it when 
rebooting the server!
No further repackaging necessary!

How do you know that tomcat didn't recognize classes12.jar?

thomas

-Original Message-
From: Campano, Troy [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 5:57 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1, DBCP and Oracle


Damn, I'm still getting the same error after I re-did my configuration like yours.
java.sql.SQLException: Cannot load JDBC driver class 'null'

When you put your JAR into /common/lib/ did Tomcat automatically recognize it when you 
rebooted the server?
Mine didn't, though it did in Tomcat 4.0.x.
I wonder if that had something to do with it.

Did all you do was rename classes12.zip to classes12.jar?
Did you have to do any repackaging?

thank you!

~ t r o y ~

-Original Message-
From: Thomas Achleitner [ mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 11:38 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1, DBCP and Oracle


Here are the relevant snapshots of the code (classes12.jar in common/lib):
server.xml:
Resource name=jdbc/OracleDS auth=Container 
type=oracle.jdbc.pool.OracleConnectionCacheImpl/
ResourceParams name=jdbc/OracleDS 
parameternamefactory/namevalueoracle.jdbc.pool.OracleDataSourceFactory/value/parameter
parameternameuserName/namevaluescott/value/parameter
parameternamepassword/namevaluetiger/value/parameter
parameternamedriverClassName/namevalueoracle.jdbc.OracleDriver/value/parameter
parameternameurl/namevaluejdbc:oracle:thin:@testdb:1525:ORA5/value/parameter
/ResourceParams

web.xml:
resource-ref
  descriptionResource reference to a factory for java.sql.Connection
  instances that may be used for talking to a particular
  database that is configured in the server.xml file./description
  res-ref-namejdbc/OracleDS/res-ref-name
  res-typejavax.sql.DataSource/res-type
  res-authContainer/res-auth
/resource-ref

Source code that obtains connection:
initCtx = new InitialContext();
envCtx = (Context) initCtx.lookup(java:comp/env);
dataSource = (DataSource) envCtx.lookup(jdbc/OracleDS);
con = dataSource.getConnection();

hope that helps !
thomas

-Original Message-
From: Campano, Troy [ mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 5:26 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1, DBCP and Oracle


Woa...

Could you send me a copy of your server.xml, web.xml, and how you create the 
connection in your Servlet/JSP?

That would be greatly appreciated.


thank you very much!

~ t r o y ~

-Original Message-
From: Thomas Achleitner [ mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 11:24 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1, DBCP and Oracle


hi!
tomcat 4.1.12
classes12.jar

thomas

-Original Message-
From: Campano, Troy [ mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 5:22 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1, DBCP and Oracle


Hi Thomas...

What version of Tomcat are you using?
Are you using classes12.jar (zip)?

thanks!

~ t r o y ~


-Original Message-
From: Thomas Achleitner [ mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 11:15 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1, DBCP and Oracle


hi troy!

You can take oracle.jdbc.OracleDriver as well (the oracle forum told me that 
oracle.jdbc.driver.OracleDriver is only kept for backwards compatibility). If I remove 
following parameters then it works fine with my application:
parameter
  namemaxLimit/name
  value10/value
/parameter
parameter
  nameminLimit/name
  value5/value
/parameter
parameter
  namecacheScheme/name
  value1/value
/parameter

I think you should have a look at the docu for those parameters. I just have no idea 
why they don't work. The parameter user should be changed to userName as well 
(casesensitive).

thomas

-Original Message-
From: Campano, Troy [ mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 4:53 PM
To: Tomcat Users List
Subject: RE: Tomcat 4.1, DBCP and Oracle


Hello Thomas,
I take it you mean oracle.jdbc.driver.OracleDriver.
I added it, bounced the server, and still the same dreadful error:

java.sql.SQLException: Cannot load JDBC driver class 'null'


thank you for your help though!

~ t r o y ~


-Original Message-
From: Thomas Achleitner [ mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 10:44 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.1, DBCP and Oracle


Hi!
I think paraemter driverClassName is missing. Try: 
parameternamedriverClassName/namevalueoracle.jdbc.OracleDriver/value/parameter

hope this helps!

thomas

-Original Message-
From: Campano, Troy [ mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]]
Sent: Monday

RE: Tomcat 4.1, DBCP and Oracle

2002-12-08 Thread Jacob Kjome



Yes, I have been able to do that.
When you say that Tomcat doesn't automatically recognize the file
in its
classpath, how do you know that? And when you hard code
it in /bin/setclasspath.sh and it sees it, does your
DataSource config now work?
If not, then there is a config problem. You'll have to post your
configuration in order to flesh that issue out.
One hint, make sure to use username and not user
for DBCP configuration. Attached is the DBCP config I use for your
reference.
Jake
At 10:38 PM 12/7/2002 -0500, you wrote:

Hi, 
I've done this.
I renamed zip to jar. put it in /common/lib.
When I bounce tomcat...it doesn't automatically recognize the file in
its
classpath, so I hard code it in /bin/setclasspath.sh, then it sees
it.
I've set this up before. I have no problems setting this up with
tomcat
4.0.X. It works like a charm. I've had the problem with 4.1.12 and
not
4.1.16-beta.
I was working with someone on the Apache Bug database (is that the
tomcat-dev mailing list?). We didn't get anywhere.
So that's why I was wondering if there has been anyone who has
successfully
able to hook up tomcat 4.1.12, DBCP and Oracle. 
Were you able to do it?
thank you for your help...it's greatly appreciated.
~ Troy Campano ~
-Original Message-
From: Jacob Kjome
To: Tomcat Users List
Sent: 12/7/02 2:57 PM
Subject: RE: Tomcat 4.1, DBCP and Oracle

1. Rename classes12.zip to classes12.jar. You don't have to
repackage
the 
classes, simply rename the file.
2. Put classes12.jar in CATALINA_HOME/common/lib. That is the
*only* 
place it can go because both the server and the application require
access 
to it. Libraries under the common (jars in /lib or /endorsed and
class 
files in /classes) directory are seen by both the appserver and webapps

unlike stuff under /shared or stuff under /server.
Then follow the docs for configuration:
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples
-howto.html
Jake
At 12:45 PM 12/7/2002 -0500, you wrote:
Oh yeah...the error I get is:
java.sql.SQLException: Cannot load JDBC driver class 'null'


~ t r o y ~


  -Original Message-
  From: Campano,
Troy
  Sent: Saturday, December 07, 2002 12:44 PM
  To: '[EMAIL PROTECTED]'
  Subject: Tomcat 4.1, DBCP and
Oracle
 
  Has anyone been able to get Tomcat 4.1.12 or Tomcat 4.1.16
working
with 
 DBCP and Oracle (classes12.zip)?
  I've tried a billion combinations of configurations and
nothing
works.
 
  I've see other people on the web have also had this
problem.
  I've tried for months to figure this out and I've opened bug
cases,
but 
 nothing seems to work.
 
  Anyone able to do it?
 
  thank you!
 
  ~ Troy Campano ~
--
To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]



utasklist.xml
Description: application/xml
--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]


RE: Tomcat 4.1, DBCP and Oracle

2002-12-07 Thread Campano, Troy
Oh yeah...the error I get is:
java.sql.SQLException: Cannot load JDBC driver class 'null'


~ t r o y ~


  -Original Message-
 From: Campano, Troy  
 Sent: Saturday, December 07, 2002 12:44 PM
 To:   '[EMAIL PROTECTED]'
 Subject:  Tomcat 4.1, DBCP and Oracle
 
 Has anyone been able to get Tomcat 4.1.12 or Tomcat 4.1.16 working with DBCP and 
Oracle (classes12.zip)?
 I've tried a billion combinations of configurations and nothing works.
 
 I've see other people on the web have also had this problem.
 I've tried for months to figure this out and I've opened bug cases, but nothing 
seems to work.
 
 Anyone able to do it?
 
 thank you!
 
 ~ Troy Campano ~



RE: Tomcat 4.1, DBCP and Oracle

2002-12-07 Thread micael
Sounds as if you don't have the class that it says you don't have.  You 
need to load in the appropriate JDBC driver class.  Have you just loaded 
the standard version of JDBC?

At 12:45 PM 12/7/2002 -0500, you wrote:
Oh yeah...the error I get is:
java.sql.SQLException: Cannot load JDBC driver class 'null'


~ t r o y ~


  -Original Message-
 From: Campano, Troy
 Sent: Saturday, December 07, 2002 12:44 PM
 To:   '[EMAIL PROTECTED]'
 Subject:  Tomcat 4.1, DBCP and Oracle

 Has anyone been able to get Tomcat 4.1.12 or Tomcat 4.1.16 working with 
DBCP and Oracle (classes12.zip)?
 I've tried a billion combinations of configurations and nothing works.

 I've see other people on the web have also had this problem.
 I've tried for months to figure this out and I've opened bug cases, but 
nothing seems to work.

 Anyone able to do it?

 thank you!

 ~ Troy Campano ~

Micael

---

This electronic mail  transmission and any accompanying documents contain 
information belonging to the sender which may be confidential and legally 
privileged.  This information is intended only for the use of the 
individual or entity to whom this electronic mail transmission was sent as 
indicated above. If you are not the intended recipient, any disclosure, 
copying, distribution, or action taken in reliance on the contents of the 
information contained in this transmission is strictly prohibited.  If you 
have received this transmission in error, please delete the message.  Thank 
you  



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



RE: Tomcat 4.1, DBCP and Oracle

2002-12-07 Thread Jacob Kjome

1.  Rename classes12.zip to classes12.jar.  You don't have to repackage the 
classes, simply rename the file.
2.  Put classes12.jar in CATALINA_HOME/common/lib.  That is the *only* 
place it can go because both the server and the application require access 
to it.  Libraries under the common (jars in /lib or /endorsed and class 
files in /classes) directory are seen by both the appserver and webapps 
unlike stuff under /shared or stuff under /server.

Then follow the docs for configuration:
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html

Jake

At 12:45 PM 12/7/2002 -0500, you wrote:
Oh yeah...the error I get is:
java.sql.SQLException: Cannot load JDBC driver class 'null'


~ t r o y ~


  -Original Message-
 From: Campano, Troy
 Sent: Saturday, December 07, 2002 12:44 PM
 To:   '[EMAIL PROTECTED]'
 Subject:  Tomcat 4.1, DBCP and Oracle

 Has anyone been able to get Tomcat 4.1.12 or Tomcat 4.1.16 working with 
DBCP and Oracle (classes12.zip)?
 I've tried a billion combinations of configurations and nothing works.

 I've see other people on the web have also had this problem.
 I've tried for months to figure this out and I've opened bug cases, but 
nothing seems to work.

 Anyone able to do it?

 thank you!

 ~ Troy Campano ~


Re: Tomcat 4.1, DBCP and Oracle

2002-12-07 Thread David Brown
Campano, Troy writes: 

Has anyone been able to get Tomcat 4.1.12 or Tomcat 4.1.16 working with DBCP and Oracle (classes12.zip)?
I've tried a billion combinations of configurations and nothing works. 

I've see other people on the web have also had this problem.
I've tried for months to figure this out and I've opened bug cases, but nothing seems to work. 

Anyone able to do it? 

thank you! 

~ Troy Campano ~



Hello Troy, i have oracle 9.2 (9i) installed working with JDBC connections 
and the JDBCRealm using classes12.jar (not zip, this is for micro$oft) in 
$CATALINA_HOME/lib. i don't know what DBCP is or what impact it may have on 
ur installation. i know 9i is somewhat more straight forward on tc than 
earlier versions because of oracle dumping of the internal (to the database) 
jdk and going with a more traditional approach. also, u should give more 
detail on ur overall system version and type of: os, jdk, jdbc driver 
connection type, network considerations. also, what are the errors or 
exceptions u have been getting. there r gurus on this ml that can diagnose 
and possibly solve ur problems but even they need info. hope this helps, 
david.

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



RE: Tomcat 4.1, DBCP and Oracle

2002-12-07 Thread Campano, Troy
 
Hi, 
I've done this.
I renamed zip to jar. put it in /common/lib.
When I bounce tomcat...it doesn't automatically recognize the file in its
classpath, so I hard code it in /bin/setclasspath.sh, then it sees it.

I've set this up before. I have no problems setting this up with tomcat
4.0.X. It works like a charm. I've had the problem with 4.1.12 and not
4.1.16-beta.

I was working with someone on the Apache Bug database (is that the
tomcat-dev mailing list?). We didn't get anywhere.

So that's why I was wondering if there has been anyone who has successfully
able to hook up tomcat 4.1.12, DBCP and Oracle. 
Were you able to do it?

thank you for your help...it's greatly appreciated.

~ Troy Campano ~

-Original Message-
From: Jacob Kjome
To: Tomcat Users List
Sent: 12/7/02 2:57 PM
Subject: RE: Tomcat 4.1, DBCP and Oracle


1.  Rename classes12.zip to classes12.jar.  You don't have to repackage
the 
classes, simply rename the file.
2.  Put classes12.jar in CATALINA_HOME/common/lib.  That is the *only* 
place it can go because both the server and the application require
access 
to it.  Libraries under the common (jars in /lib or /endorsed and class 
files in /classes) directory are seen by both the appserver and webapps 
unlike stuff under /shared or stuff under /server.

Then follow the docs for configuration:
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples
-howto.html

Jake

At 12:45 PM 12/7/2002 -0500, you wrote:
Oh yeah...the error I get is:
java.sql.SQLException: Cannot load JDBC driver class 'null'


~ t r o y ~


   -Original Message-
  From: Campano, Troy
  Sent: Saturday, December 07, 2002 12:44 PM
  To:   '[EMAIL PROTECTED]'
  Subject:  Tomcat 4.1, DBCP and Oracle
 
  Has anyone been able to get Tomcat 4.1.12 or Tomcat 4.1.16 working
with 
 DBCP and Oracle (classes12.zip)?
  I've tried a billion combinations of configurations and nothing
works.
 
  I've see other people on the web have also had this problem.
  I've tried for months to figure this out and I've opened bug cases,
but 
 nothing seems to work.
 
  Anyone able to do it?
 
  thank you!
 
  ~ Troy Campano ~

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




RE: Tomcat 4.1, DBCP and Oracle

2002-12-07 Thread Campano, Troy
 Oh sorry, i meant i have the problem with 4.1.16-beta as well.

thank you!

-Original Message-
From: Campano, Troy
To: Jacob Kjome; [EMAIL PROTECTED]
Sent: 12/7/02 10:38 PM
Subject: RE: Tomcat 4.1, DBCP and Oracle

 
Hi, 
I've done this.
I renamed zip to jar. put it in /common/lib.
When I bounce tomcat...it doesn't automatically recognize the file in
its
classpath, so I hard code it in /bin/setclasspath.sh, then it sees it.

I've set this up before. I have no problems setting this up with tomcat
4.0.X. It works like a charm. I've had the problem with 4.1.12 and not
4.1.16-beta.

I was working with someone on the Apache Bug database (is that the
tomcat-dev mailing list?). We didn't get anywhere.

So that's why I was wondering if there has been anyone who has
successfully
able to hook up tomcat 4.1.12, DBCP and Oracle. 
Were you able to do it?

thank you for your help...it's greatly appreciated.

~ Troy Campano ~

-Original Message-
From: Jacob Kjome
To: Tomcat Users List
Sent: 12/7/02 2:57 PM
Subject: RE: Tomcat 4.1, DBCP and Oracle


1.  Rename classes12.zip to classes12.jar.  You don't have to repackage
the 
classes, simply rename the file.
2.  Put classes12.jar in CATALINA_HOME/common/lib.  That is the *only* 
place it can go because both the server and the application require
access 
to it.  Libraries under the common (jars in /lib or /endorsed and class 
files in /classes) directory are seen by both the appserver and webapps 
unlike stuff under /shared or stuff under /server.

Then follow the docs for configuration:
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples
-howto.html

Jake

At 12:45 PM 12/7/2002 -0500, you wrote:
Oh yeah...the error I get is:
java.sql.SQLException: Cannot load JDBC driver class 'null'


~ t r o y ~


   -Original Message-
  From: Campano, Troy
  Sent: Saturday, December 07, 2002 12:44 PM
  To:   '[EMAIL PROTECTED]'
  Subject:  Tomcat 4.1, DBCP and Oracle
 
  Has anyone been able to get Tomcat 4.1.12 or Tomcat 4.1.16 working
with 
 DBCP and Oracle (classes12.zip)?
  I've tried a billion combinations of configurations and nothing
works.
 
  I've see other people on the web have also had this problem.
  I've tried for months to figure this out and I've opened bug cases,
but 
 nothing seems to work.
 
  Anyone able to do it?
 
  thank you!
 
  ~ Troy Campano ~

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


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




Re: Tomcat 4.1, DBCP and Oracle

2002-12-07 Thread Dan Tran
Did you configure Oracle DataSource thru the web interface of Admin app in
Tomcat 4.1?
If you did, you will need to link the Global datasource to your webapp in
server.xml.
Please look up ResourceLink tag

-D
- Original Message -
From: Campano, Troy [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, December 07, 2002 7:43 PM
Subject: RE: Tomcat 4.1, DBCP and Oracle


Oh sorry, i meant i have the problem with 4.1.16-beta as well.

thank you!

-Original Message-
From: Campano, Troy
To: Jacob Kjome; [EMAIL PROTECTED]
Sent: 12/7/02 10:38 PM
Subject: RE: Tomcat 4.1, DBCP and Oracle


Hi,
I've done this.
I renamed zip to jar. put it in /common/lib.
When I bounce tomcat...it doesn't automatically recognize the file in
its
classpath, so I hard code it in /bin/setclasspath.sh, then it sees it.

I've set this up before. I have no problems setting this up with tomcat
4.0.X. It works like a charm. I've had the problem with 4.1.12 and not
4.1.16-beta.

I was working with someone on the Apache Bug database (is that the
tomcat-dev mailing list?). We didn't get anywhere.

So that's why I was wondering if there has been anyone who has
successfully
able to hook up tomcat 4.1.12, DBCP and Oracle.
Were you able to do it?

thank you for your help...it's greatly appreciated.

~ Troy Campano ~

-Original Message-
From: Jacob Kjome
To: Tomcat Users List
Sent: 12/7/02 2:57 PM
Subject: RE: Tomcat 4.1, DBCP and Oracle


1.  Rename classes12.zip to classes12.jar.  You don't have to repackage
the
classes, simply rename the file.
2.  Put classes12.jar in CATALINA_HOME/common/lib.  That is the *only*
place it can go because both the server and the application require
access
to it.  Libraries under the common (jars in /lib or /endorsed and class
files in /classes) directory are seen by both the appserver and webapps
unlike stuff under /shared or stuff under /server.

Then follow the docs for configuration:
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples
-howto.html

Jake

At 12:45 PM 12/7/2002 -0500, you wrote:
Oh yeah...the error I get is:
java.sql.SQLException: Cannot load JDBC driver class 'null'


~ t r o y ~


   -Original Message-
  From: Campano, Troy
  Sent: Saturday, December 07, 2002 12:44 PM
  To:   '[EMAIL PROTECTED]'
  Subject:  Tomcat 4.1, DBCP and Oracle
 
  Has anyone been able to get Tomcat 4.1.12 or Tomcat 4.1.16 working
with
 DBCP and Oracle (classes12.zip)?
  I've tried a billion combinations of configurations and nothing
works.
 
  I've see other people on the web have also had this problem.
  I've tried for months to figure this out and I've opened bug cases,
but
 nothing seems to work.
 
  Anyone able to do it?
 
  thank you!
 
  ~ Troy Campano ~

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


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

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