Hi,
Add a <factory> ResourceParam as shown in the docs.

Yoav Shapira http://www.yoavshapira.com


>-----Original Message-----
>From: spammemothers [mailto:[EMAIL PROTECTED]
>Sent: Monday, October 25, 2004 12:14 PM
>To: 'Tomcat Users List'
>Subject: RE: Does Oracle 9i thin jdbc driver work in Tomcat 5?
>
>This is my app file i.e prd.xml in
>c:\jakarta-tomcat-5.0.28\conf\Catalina\localhost
>
><?xml version='1.0' encoding='utf-8'?>
><Context displayName="Project Report Database" docBase="PRD"
path="/PRD"
>privileged="true" workDir="work\Catalina\localhost\PRD">
>  <Resource auth="Container" name="PRDConnectionPool"
>type="javax.sql.DataSource"/>
>  <ResourceParams name="PRDConnectionPool">
>    <parameter>
>      <name>maxWait</name>
>      <value>-1</value>
>    </parameter>
>    <parameter>
>      <name>maxActive</name>
>      <value>20</value>
>    </parameter>
>    <parameter>
>      <name>username</name>
>      <value>prd_user</value>
>    </parameter>
>    <parameter>
>      <name>password</name>
>      <value>prd_user</value>
>    </parameter>
>    <parameter>
>      <name>url</name>
>      <value>jdbc:oracle:thin:[EMAIL PROTECTED]:1521:dev</value>
>    </parameter>
>    <parameter>
>      <name>driverClassName</name>
>      <value>oracle.jdbc.driver.OracleDriver</value>
>    </parameter>
>    <parameter>
>      <name>maxIdle</name>
>      <value>10</value>
>    </parameter>
>  </ResourceParams>
></Context>
>
>My web.xml (in c:\jakarta-tomcat-5.0.28\conf) contains this -
>
><resource-ref>
> <description>Oracle Datasource example</description>
> <res-ref-name>PRDConnectionPool</res-ref-name>
> <res-type>javax.sql.DataSource</res-type>
> <res-auth>Container</res-auth>
></resource-ref>
>
>Hope this helps?
>
>Thanks
>
>harry
>
>
>
>
>
>-----Original Message-----
>From: Phillip Qin [mailto:[EMAIL PROTECTED]
>Sent: 25 October 2004 15:25
>To: 'Tomcat Users List'
>Subject: RE: Does Oracle 9i thin jdbc driver work in Tomcat 5?
>
>
>What arr your <Resource> and <ResourceParams>?
>
>-----Original Message-----
>From: Adrian Harrison [mailto:[EMAIL PROTECTED]
>Sent: October 23, 2004 12:28 PM
>To: [EMAIL PROTECTED]
>Subject: Does Oracle 9i thin jdbc driver work in Tomcat 5?
>
>
>using tomcat 5.0.28, oracle 9.2.1.0 on windows 2000 (sp4)
>
>having a nightmare here, upgraded from oracle 8i to 9i, downloaded &
>installed ojdbc14.jar file in Tomcat's common\lib directory.
>
>Now all I get when trying to create a connection pool is this exception
-
>
>2004-10-22 17:04:22 StandardContext[/PRD]action: null
>java.lang.NullPointerException
>   at
>org.apache.commons.dbcp.DelegatingConnection.close(DelegatingConnection
.jav
>a
>:151)
>   at
>org.apache.commons.dbcp.PoolableConnection.reallyClose(PoolableConnecti
on.j
>a
>va:95)
>   at
>org.apache.commons.dbcp.PoolableConnectionFactory.destroyObject(Poolabl
eCon
>n
>ectionFactory.java:301)
>   at
>org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(Basic
Data
>S
>ource.java:883)
>   at
>org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSourc
e.ja
>v
>a:851)
>etc...
>
>from my web.xml file -
>
><resource-ref>
> <description>Oracle Datasource example</description>
><res-ref-name>PRDConnectionPool</res-ref-name>
> <res-type>javax.sql.DataSource</res-type>
> <res-auth>Container</res-auth>
></resource-ref>
>
>from my app xml file -
>
>   <parameter>
>     <name>factory</name>
>     <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
>   </parameter>
>   <parameter>
>     <name>driverClassName</name>
>     <value>oracle.jdbc.driver.OracleDriver</value>
>   </parameter>
>   <parameter>
>     <name>url</name>
>     <value>jdbc:oracle:thin:[EMAIL PROTECTED]:1521:dev91</value>
>   </parameter>
>
>Worked fine under 8.1i but now I've hit a brick wall with this one - is
it
>possible to get these to work together?
>
>Probably doing something really stupid, any ideas?
>
>many thanks
>
>harry
>
>
>
>
>!DSPAM:417a864a256491205720536!
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]




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


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

Reply via email to