YIKES!!! I see something that I think is the problem....at least it caused me 
ample problems and I was totally tarred and feathered on the Sun Java forum for 
doing.

Are you using that driver you show?

driverClassName="sun.jdbc.odbc.JdbcOdbcDriver"

or is that just the example that you peeled off and showed to us?

That will cause numerous problems. That driver is awful and not meant for DBCP.

Do you have the Oracle thin client driver? If not, I'll send to you offline. 
Let me know if you need it.

In fact, in one of my servlets I specifically commented out that sun.jdbc.odbc 
...driver and told myself to never use that again!

actually not that harsh, but here were the comments I found:
===================================

try {
//changed from Oracle driver, orig. Sun driver, to DBCP, 2-22-2007-BP
/*
                 Class.forName("oracle.jdbc.driver.OracleDriver");
                   String dbURL = "jdbc:oracle:thin:@192.168.XX.XXX:1521:SID";
                   String usernm = "user_name";
                   String pwd = "user_pass";
                   connection = DriverManager.getConnection(dbURL, usernm, pwd);
*/
                   Context initCtx = new InitialContext();
                   Context envCtx = (Context) initCtx.lookup("java:comp/env");
                   // Look up our data source
                   DataSource ds = (DataSource)
                     envCtx.lookup("jdbc/myoracle");
                   // Allocate and use a connection from the pool
           Connection connection = ds.getConnection();

   //SQL info and set property statements
   //will go below here

==================================

Try this for starters.


Now, I'm using 4.1.31 still, but you'll get the idea I think. I have to 
separate my param tags, rather than cramming them all into one tag,like you 
likely can do.

 <Resource name="jdbc/myoracle" auth="Container" type="javax.sql.DataSource"/> 
 
 <ResourceParams name="jdbc/myoracle">
   <parameter>
     <name>factory</name>
     <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
   </parameter>
   <parameter>
     <name>driverClassName</name>
     <value>oracle.jdbc.OracleDriver</value>
   </parameter>
   <parameter>
     <name>url</name>
     <value>jdbc:oracle:thin:@192.168.XX.XXX:1521:SID</value>
   </parameter>
   <parameter>
     <name>username</name>
     <value>user_name</value>
   </parameter>
   <parameter>
     <name>password</name>
     <value>user_pass</value>
   </parameter>
   <parameter>
     <name>maxActive</name>
     <value>125</value>
   </parameter>
   <parameter>
     <name>maxIdle</name>
     <value>15</value>
   </parameter>
   <parameter>
     <name>maxWait</name>
     <value>7000</value>
   </parameter>
 <parameter>
 <name>removeAbandoned</name>
 <value>true</value>
 </parameter>
 <parameter>
 <name>removeAbandonedTimeout</name>
 <value>60</value>
 </parameter>
 <parameter>
 <name>logAbandoned</name>
 <value>true</value>
 </parameter>
 
 <parameter>
 <name>minEvictableIdleTimeMillis</name>
 <value>5000</value>
 </parameter>
 <parameter>
 <name>timeBetweenEvictionRunsMillis</name>
 <value>10000</value>
 </parameter>
  <parameter>
  <name>testWhileIdle</name>
  <value>true</value>
  </parameter>
 
 </ResourceParams>

-----Original Message-----
From: Adam Gordon [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 26, 2008 4:49 PM
To: Tomcat Users List
Subject: Re: Connection Pooling


Hi, I think you may be confusing the number of allowable processes with 
the number of allowable threads.

Per Tomcat's documentation, maxActive refers to the maximum number of DB 
connections whereas the Oracle error you are seeing refers to the 
maximum number of processes (threads?) which are not necessarily 
connections.  It's been too many years since I've worked with Oracle, 
let alone 9i, so I can't point you where to look in your config files, 
but I suspect that's where the problem may be.

As an aside, the solution is probably not to just up the number of 
processes but to determine why Oracle is generating so many (if 150 is 
indeed considered "many.").

Hope this helps.

--adam

abhishek reddy wrote:
>  Here are the pool configuration details in context.xml file.........
>
> <Resource
> name="jdbc/pool"
> auth="Container"
> type="javax.sql.DataSource"
> username="scott"
> password="tiger"
> driverClassName="sun.jdbc.odbc.JdbcOdbcDriver"
> url="jdbc:odbc:pool"
> maxWait="60000"
> removeAbandoned="true"
> maxActive="130"
> maxIdle="50"
> removeAbandonedTimeout="300"
> logAbandoned="true"
> />
>
>  software:
>  database : oracle 9i
>  server: tomcat 5.5
>
>  iam getting the following error:
>
>  java.sql.SQLException: [Oracle][ODBC][Ora]ORA-00020: maximum number
> of processes (150) exceeded.
>
>  I have set the maxActive to 130 then how will the number of processes
> exceeds 150?
>
>  tell me when will the maximum number of processes (150) exceeded in
> the oracle and how do i solve the problem?
>
>  I have checked the application 5 to 10 times and there is no
> connection leakage problem.
>
>  the application is under going performance testing.....with around
> 200 users at a time, for the first time it worked perfeclty, next time
> the
>  above mentioned error is comming..
>
>  i need your help in solving this problem..
>
>
>   

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to