Re: Oracle DataSource configuration

2004-01-01 Thread Dirk Verbeeck
The exception you see is an indication that the factory doesn't see 
the ResourceParams you have specified. Try to print out the url and 
driverClassName properties of BasicDataSource, you will see they are null.

You have an extra  tag there in your definition of 
the server.xml file. Is that just a copy/paster error?
Maybe you can post the whole 

You should also try without a  in web.xml.

By the way, questions about DBCP are best posted on commons-user 
mailing list. http://jakarta.apache.org/commons/dbcp/mail-lists.html

-- Dirk

Ed Dowgiallo wrote:
I'm running into the following exception when issuing a getConnection to 
an Oracle DataSource.
 
SQLException: Cannot create JDBC driver of class '' for connect URL 'null'
 
It has the following definition in a Tomcat 4.1.29 server.xml file.
 









factory

org.apache.commons.dbcp.BasicDataSourceFactory





driverClassName

oracle.jdbc.driver.OracleDriver





url

jdbc:oracle:thin:@192.168.0.202:1521:tpeds002





username

abc





password

xyz





maxActive

25





maxIdle

10





maxWait

-1





I have setup the following resource-ref in the applications web.xml file.

  
Oracle DataSource
Library
javax.sql.DataSource
Container
  
The JDBC library is a class12.jar file in the Tomcat shared/lib directory.

Comments and suggestions are most welcome.

Thank you,

Ed



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


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


Re: Oracle DataSource configuration

2003-12-29 Thread Kris Schneider
What you're thinking of as a connection pool, Oracle refers to as a connection
cache. Their pool/cache implementation is provided by
oracle.jdbc.pool.OracleConnectionCacheImpl. I don't recall if I've gotten that
to work with TC before. Have you read:

http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html

Quoting Ed Dowgiallo <[EMAIL PROTECTED]>:

> OK.
> 
> I have moved the Oracle JDBC library from shared/lib to common/lib.  Same
> error message.  SQLException: Cannot create JDBC driver of class '' for
> connect URL 'null'
> 
> Restarted Tomcat service.  Same error message.
> 
> Removed all the javax.sql... classes from classes12.jar and
> classes12dms.jar.  Same error message.
> 
> Logged a few sanity checks.  All look OK.
> Value of servlet init parameter data-source is Library
> InitialContext is not null
> Context for java:/comp/env is not null
> dataSource is not null: [EMAIL PROTECTED]
> 
> Any other ideas?
> 
> Has anyone successfully configured oracle.jdbc.pool.OracleDataSourceFactory
> or oracle.jdbc.pool.OracleConnectionPoolDataSource instead of or in
> addition
> to org.apache.commons.dbcp.BasicDataSourceFactory and
> oracle.jdbc.driver.OracleDriver?
> 
> Thank you,
> Ed
> 
> - Original Message - 
> From: "Kris Schneider" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Monday, December 29, 2003 12:13 PM
> Subject: RE: Oracle DataSource configuration
> 
> 
> > The following:
> >
> > http://jakarta.apache.org/tomcat/tomcat-4.1-doc/class-loader-howto.html
> >
> > explains TC 4.1's class loaders. Personally, I also place JDBC drivers in
> > $CATALINA_HOME/common/lib. If they're in $CATALINA_HOME/shared/lib, then
> all web
> > apps can "see" them but catalina can't, IIRC.
> >
> > Quoting Ben Anderson <[EMAIL PROTECTED]>:
> >
> > > not sure if this matters, but my oracle jar is in common/lib instead of
> > > shared/lib.  I'm not familiar with the differences/uses of common and
> > > shared, but that's how mine works.
> > > -Ben
> > >
> > >
> > > >From: "Ed Dowgiallo" <[EMAIL PROTECTED]>
> > > >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > > >To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > > >Subject: Oracle DataSource configuration
> > > >Date: Mon, 29 Dec 2003 11:12:11 -0500
> > > >
> > > >I'm running into the following exception when issuing a getConnection
> to an
> > >
> > > >Oracle DataSource.
> > > >
> > > >SQLException: Cannot create JDBC driver of class '' for connect URL
> 'null'
> > > >
> > > >It has the following definition in a Tomcat 4.1.29 server.xml file.
> > > >
> > > > > > >type="javax.sql.DataSource"/>
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >factory
> > > >
> > > >org.apache.commons.dbcp.BasicDataSourceFactory
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >driverClassName
> > > >
> > > >oracle.jdbc.driver.OracleDriver
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >url
> > > >
> > > >jdbc:oracle:thin:@192.168.0.202:1521:tpeds002
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >username
> > > >
> > > >abc
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >password
> > > >
> > > >xyz
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >maxActive
> > > >
> > > >25
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >maxIdle
> > > >
> > > >10
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >maxWait
> > > >
> > > >-1
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >I have setup the following resource-ref in the applications web.xml
> file.
> > > >
> > > >   
> > > > Oracle DataSource
> > > > Library
> > > > javax.sql.DataSource
> > > > Container
> > > >   
> > > >
> > > >The JDBC library is a class12.jar file in the Tomcat shared/lib
> directory.
> > > >
> > > >Comments and suggestions are most welcome.
> > > >
> > > >Thank you,
> > > >
> > > >Ed
> >
> > -- 
> > Kris Schneider <mailto:[EMAIL PROTECTED]>
> > D.O.Tech   <http://www.dotech.com/>

-- 
Kris Schneider <mailto:[EMAIL PROTECTED]>
D.O.Tech   <http://www.dotech.com/>

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



Re: Oracle DataSource configuration

2003-12-29 Thread Ed Dowgiallo
OK.

I have moved the Oracle JDBC library from shared/lib to common/lib.  Same
error message.  SQLException: Cannot create JDBC driver of class '' for
connect URL 'null'

Restarted Tomcat service.  Same error message.

Removed all the javax.sql... classes from classes12.jar and
classes12dms.jar.  Same error message.

Logged a few sanity checks.  All look OK.
Value of servlet init parameter data-source is Library
InitialContext is not null
Context for java:/comp/env is not null
dataSource is not null: [EMAIL PROTECTED]

Any other ideas?

Has anyone successfully configured oracle.jdbc.pool.OracleDataSourceFactory
or oracle.jdbc.pool.OracleConnectionPoolDataSource instead of or in addition
to org.apache.commons.dbcp.BasicDataSourceFactory and
oracle.jdbc.driver.OracleDriver?

Thank you,
Ed

- Original Message - 
From: "Kris Schneider" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, December 29, 2003 12:13 PM
Subject: RE: Oracle DataSource configuration


> The following:
>
> http://jakarta.apache.org/tomcat/tomcat-4.1-doc/class-loader-howto.html
>
> explains TC 4.1's class loaders. Personally, I also place JDBC drivers in
> $CATALINA_HOME/common/lib. If they're in $CATALINA_HOME/shared/lib, then
all web
> apps can "see" them but catalina can't, IIRC.
>
> Quoting Ben Anderson <[EMAIL PROTECTED]>:
>
> > not sure if this matters, but my oracle jar is in common/lib instead of
> > shared/lib.  I'm not familiar with the differences/uses of common and
> > shared, but that's how mine works.
> > -Ben
> >
> >
> > >From: "Ed Dowgiallo" <[EMAIL PROTECTED]>
> > >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > >To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > >Subject: Oracle DataSource configuration
> > >Date: Mon, 29 Dec 2003 11:12:11 -0500
> > >
> > >I'm running into the following exception when issuing a getConnection
to an
> >
> > >Oracle DataSource.
> > >
> > >SQLException: Cannot create JDBC driver of class '' for connect URL
'null'
> > >
> > >It has the following definition in a Tomcat 4.1.29 server.xml file.
> > >
> > > > >type="javax.sql.DataSource"/>
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >factory
> > >
> > >org.apache.commons.dbcp.BasicDataSourceFactory
> > >
> > >
> > >
> > >
> > >
> > >driverClassName
> > >
> > >oracle.jdbc.driver.OracleDriver
> > >
> > >
> > >
> > >
> > >
> > >url
> > >
> > >jdbc:oracle:thin:@192.168.0.202:1521:tpeds002
> > >
> > >
> > >
> > >
> > >
> > >username
> > >
> > >abc
> > >
> > >
> > >
> > >
> > >
> > >password
> > >
> > >xyz
> > >
> > >
> > >
> > >
> > >
> > >maxActive
> > >
> > >25
> > >
> > >
> > >
> > >
> > >
> > >maxIdle
> > >
> > >10
> > >
> > >
> > >
> > >
> > >
> > >maxWait
> > >
> > >-1
> > >
> > >
> > >
> > >
> > >
> > >I have setup the following resource-ref in the applications web.xml
file.
> > >
> > >   
> > > Oracle DataSource
> > > Library
> > > javax.sql.DataSource
> > > Container
> > >   
> > >
> > >The JDBC library is a class12.jar file in the Tomcat shared/lib
directory.
> > >
> > >Comments and suggestions are most welcome.
> > >
> > >Thank you,
> > >
> > >Ed
>
> -- 
> Kris Schneider <mailto:[EMAIL PROTECTED]>
> D.O.Tech   <http://www.dotech.com/>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


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



RE: Oracle DataSource configuration

2003-12-29 Thread Steve Muench
Ed,
 
The setup instructions for the "BC4J/Struts Toy Store Demo" at:
 
  http://otn.oracle.com/sample_code/products/jdev/bc4jtoystore/index.html
 
 
go over the specifics of setting up Oracle DataSource for Tomcat.
 
The direct URL to the 80-page whitepaper that explains the demo's implementation and 
setup is at:
 
  http://otn.oracle.com/sample_code/products/jdev/bc4jtoystore/readme.html
 
Hope this helps.
 

Steve Muench - Technical Evangelist, Product Mgr, Developer, Author
http://radio.weblogs.com/0118231/


 


  _  

From: Ed Dowgiallo [mailto:[EMAIL PROTECTED] 
Sent: Monday, December 29, 2003 08:12
To: Struts Users Mailing List
Subject: Oracle DataSource configuration


I'm running into the following exception when issuing a getConnection to an Oracle 
DataSource.
 
SQLException: Cannot create JDBC driver of class '' for connect URL 'null'
 
It has the following definition in a Tomcat 4.1.29 server.xml file.
 








factory

org.apache.commons.dbcp.BasicDataSourceFactory

 



driverClassName

oracle.jdbc.driver.OracleDriver





url

jdbc:oracle:thin:@192.168.0.202:1521:tpeds002





username

abc





password

xyz





maxActive

25





maxIdle

10





maxWait

-1





I have setup the following resource-ref in the applications web.xml file.

  
Oracle DataSource
Library
javax.sql.DataSource
Container
  

The JDBC library is a class12.jar file in the Tomcat shared/lib directory.

Comments and suggestions are most welcome.

Thank you,

Ed



RE: Oracle DataSource configuration

2003-12-29 Thread Kris Schneider
The following:

http://jakarta.apache.org/tomcat/tomcat-4.1-doc/class-loader-howto.html

explains TC 4.1's class loaders. Personally, I also place JDBC drivers in
$CATALINA_HOME/common/lib. If they're in $CATALINA_HOME/shared/lib, then all web
apps can "see" them but catalina can't, IIRC.

Quoting Ben Anderson <[EMAIL PROTECTED]>:

> not sure if this matters, but my oracle jar is in common/lib instead of 
> shared/lib.  I'm not familiar with the differences/uses of common and 
> shared, but that's how mine works.
> -Ben
> 
> 
> >From: "Ed Dowgiallo" <[EMAIL PROTECTED]>
> >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >Subject: Oracle DataSource configuration
> >Date: Mon, 29 Dec 2003 11:12:11 -0500
> >
> >I'm running into the following exception when issuing a getConnection to an
> 
> >Oracle DataSource.
> >
> >SQLException: Cannot create JDBC driver of class '' for connect URL 'null'
> >
> >It has the following definition in a Tomcat 4.1.29 server.xml file.
> >
> > >type="javax.sql.DataSource"/>
> >
> >
> >
> >
> >
> >
> >
> >factory
> >
> >org.apache.commons.dbcp.BasicDataSourceFactory
> >
> >
> >
> >
> >
> >driverClassName
> >
> >oracle.jdbc.driver.OracleDriver
> >
> >
> >
> >
> >
> >url
> >
> >jdbc:oracle:thin:@192.168.0.202:1521:tpeds002
> >
> >
> >
> >
> >
> >username
> >
> >abc
> >
> >
> >
> >
> >
> >password
> >
> >xyz
> >
> >
> >
> >
> >
> >maxActive
> >
> >25
> >
> >
> >
> >
> >
> >maxIdle
> >
> >10
> >
> >
> >
> >
> >
> >maxWait
> >
> >-1
> >
> >
> >
> >
> >
> >I have setup the following resource-ref in the applications web.xml file.
> >
> >   
> > Oracle DataSource
> > Library
> > javax.sql.DataSource
> > Container
> >   
> >
> >The JDBC library is a class12.jar file in the Tomcat shared/lib directory.
> >
> >Comments and suggestions are most welcome.
> >
> >Thank you,
> >
> >Ed

-- 
Kris Schneider 
D.O.Tech   

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



RE: Oracle DataSource configuration

2003-12-29 Thread Ben Anderson
not sure if this matters, but my oracle jar is in common/lib instead of 
shared/lib.  I'm not familiar with the differences/uses of common and 
shared, but that's how mine works.
-Ben


From: "Ed Dowgiallo" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Subject: Oracle DataSource configuration
Date: Mon, 29 Dec 2003 11:12:11 -0500
I'm running into the following exception when issuing a getConnection to an 
Oracle DataSource.

SQLException: Cannot create JDBC driver of class '' for connect URL 'null'

It has the following definition in a Tomcat 4.1.29 server.xml file.









factory

org.apache.commons.dbcp.BasicDataSourceFactory





driverClassName

oracle.jdbc.driver.OracleDriver





url

jdbc:oracle:thin:@192.168.0.202:1521:tpeds002





username

abc





password

xyz





maxActive

25





maxIdle

10





maxWait

-1





I have setup the following resource-ref in the applications web.xml file.

  
Oracle DataSource
Library
javax.sql.DataSource
Container
  
The JDBC library is a class12.jar file in the Tomcat shared/lib directory.

Comments and suggestions are most welcome.

Thank you,

Ed
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
Check your PC for viruses with the FREE McAfee online computer scan.  
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963

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