Hi,
It just occurred to me that at some point the DBCP configuration changed
from "username" to "user" as the user name parameter.  Try changing
username to user in your configuration file and restarting Tomcat.

Yoav Shapira
Millennium Research Informatics


>-----Original Message-----
>From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
>Sent: Friday, September 10, 2004 12:21 PM
>To: Tomcat Users List
>Subject: RE: org.apache.commons.dbcp.SQLNestedException: Cannot create
>PoolableConnectionFactory --help. using Tomcat4.1
>
>
>    But i use the same configuration and try to connect without using
>datasource i have no error.
>
>I have used this code to connect--
>            Class.forName("oracle.jdbc.driver.OracleDriver");
>            Connection conn =
>DriverManager.getConnection("jdbc:oracle:thin:@IPADDRESS:1521:ODINPRD",
>"ioeadmin", "ioeadmin");
>
>
>Can i use someother factory instead of
>org.apache.commons.dbcp.BasicDataSourceFactory , does that make any
>difference...
>
>
>-----Original Message-----
>From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
>Sent: Friday, September 10, 2004 11:28 AM
>To: Tomcat Users List
>Subject: RE: org.apache.commons.dbcp.SQLNestedException: Cannot create
>PoolableConnectionFactory --help. using Tomcat4.1
>
>
>
>Hi,
>Look at the cause.  The connection is refused by your database.  It's
>not a Tomcat problem, it's likely a simple misconfiguration.  Use
>another tool to figure out the correct DB connection parameters, or ask
>your DBA if you're not sure.
>
>Yoav Shapira
>Millennium Research Informatics
>
>
>>-----Original Message-----
>>From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED]
>>Sent: Friday, September 10, 2004 11:17 AM
>>To: Tomcat Users List
>>Subject: org.apache.commons.dbcp.SQLNestedException: Cannot create
>>PoolableConnectionFactory --help. using Tomcat4.1
>>
>>org.apache.commons.dbcp.SQLNestedException: Cannot create
>>PoolableConnectionFact
>>ory, cause:
>>java.sql.SQLException: Connection
>>refused(DESCRIPTION=(TMP=)(VSNNUM=135286784)(E
>>RR=12505)(ERROR_STACK=(ERROR=(CODE=12505)(EMFI=4))))
>>        at oracle.jdbc.dbaccess.DBError.check_error(DBError.java)
>>        at
>>oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java)
>>        at
>>oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.ja
>>va)
>>        at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java)
>>        at
>>org.apache.commons.dbcp.DriverConnectionFactory.createConnection(Driv
>>erConnectionFactory.java:82)
>>        at
>>org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(Poolable
>>ConnectionFactory.java:300)
>>        at
>>org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(Bas
>>icDataSource.java:838)
>>        at
>>org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSou
>>rce.java:821)
>>        at
>>org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource
>>.java:518)
>>        at
>>com.mypublisher.oemapi.DAO.DBAccess.getConnection(DBAccess.java:47)
>>        at
>com.mypublisher.oemapi.DAO.Persister.<init>(Persister.java:32)
>>        at org.apache.jsp.test_jsp._jspService(test_jsp.java:56)
>>        at
>>org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
>>
>>I have this configuartion in server.xml,
>>====================================================
>>      <Context path="/rpcoemapi" docBase="rpcoemapi"
>>              debug="5" reloadable="true" crossContext="true"
>>useNaming="true">
>>
>>      <Logger className="org.apache.catalina.logger.FileLogger"
>>             prefix="localhost_rpcoemapi_log." suffix=".txt"
>>             timestamp="true"/>
>>       <Resource name="jdbc/DBNAME"
>>               auth="Container"
>>               type="javax.sql.DataSource"/>
>>
>>      <ResourceParams name="jdbc/DBNAME">
>>      <parameter>
>>                <name>factory</name>
>>
<value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
>>      </parameter>
>>
>>      <!-- Maximum number of dB connections in pool. Make sure you
>>         configure your mysqld max_connections large enough to handle
>>         all of your db connections. Set to 0 for no limit.
>>         -->
>>      <parameter>
>>          <name>maxActive</name>
>>          <value>50</value>
>>        </parameter>
>>
>>      <!-- Maximum number of idle dB connections to retain in pool.
>>         Set to 0 for no limit.
>>         -->
>>        <parameter>
>>         <name>maxIdle</name>
>>         <value>10</value>
>>        </parameter>
>>
>>       <!-- Maximum time to wait for a dB connection to become
>available
>>         in ms, in this example 10 seconds. An Exception is thrown if
>>         this timeout is exceeded.  Set to -1 to wait indefinitely.
>>         -->
>>      <parameter>
>>         <name>maxWait</name>
>>         <value>10000</value>
>>        </parameter>
>>
>>      <!-- MySQL dB username and password for dB connections  -->
>>      <parameter>
>>        <name>username</name>
>>        <value>ioeadmin</value>
>>      </parameter>
>>      <parameter>
>>        <name>password</name>
>>        <value>ioeadmin</value>
>>      </parameter>
>>
>>      <!-- Class name for mm.mysql JDBC driver -->
>>      <parameter>
>>                <name>driverClassName</name>
>>                <value>oracle.jdbc.driver.OracleDriver</value>
>>      </parameter>
>>
>>      <!-- The JDBC connection url for connecting to your MySQL dB.
>>         The autoReconnect=true argument to the url makes sure that
the
>>         mm.mysql JDBC Driver will automatically reconnect if mysqld
>closed
>>the
>>         connection.  mysqld by default closes idle connections after
8
>>hours.
>>         -->
>>      <parameter>
>>              <name>url</name>
>>
>><value>jdbc:oracle:thin:@IPADDRESS:1521:DBNAME?autoReconnect=true</val
u
>e>
>>      </parameter>
>></ResourceParams>
>></Context>
>>======================================================================
=
>====
>>=
>>=================
>>getConnection method uses the below code:
>>
>>Context ctx = new InitialContext();
>>Context env = (Context)ctx.lookup("java:comp/env");
>>DataSource ds = (DataSource) env.lookup("jdbc/DBNAME");
>>conn = ds.getConnection();
>>
>>
>>---------------------------------------------------------------------
>>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]
>
>
>---------------------------------------------------------------------
>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