473,698 Members | 2,156 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

java.sql.SQLExc eption: ORA-00020: maximum number of processes (100) exceeded

Hello Friends,

I am getting the following error.
java.sql.SQLExc eption: ORA-00020: maximum number of processes (100)
exceeded

I am closing all my resultsets and all my connections in the try
block.
should i close ResultSets and Connections in the catch block aswell?.

or the problem is due to the connection pool settings in weblogic or
on the oracle side instead of in my application.

Thanks in Advance
s
Jul 17 '05 #1
4 18333
You need to close at least your Connection object in the finally
clause, like this:

Connection conn = null;
try {
//get connection...

//do stuff...

} catch (SQLException sqle) {
e.printStackTra ce();
} finally {
try { conn.close(); } catch (Exception e) { //do nothing }
}

If your application hits the database a lot, you might want to have
your DBA increase the maximum number of processes (I'm not a DBA, so I
don't know how to do this, or what side-effects it might have).

-Nathan

su**********@ho tmail.com wrote in message news:<2e******* *************** ***@posting.goo gle.com>...
Hello Friends,

I am getting the following error.
java.sql.SQLExc eption: ORA-00020: maximum number of processes (100)
exceeded

I am closing all my resultsets and all my connections in the try
block.
should i close ResultSets and Connections in the catch block aswell?.

or the problem is due to the connection pool settings in weblogic or
on the oracle side instead of in my application.

Thanks in Advance
s

Jul 17 '05 #2


<su**********@h otmail.com> wrote in message
news:2e******** *************** **@posting.goog le.com...
| Hello Friends,
|
| I am getting the following error.
| java.sql.SQLExc eption: ORA-00020: maximum number of processes (100)
| exceeded
|
| I am closing all my resultsets and all my connections in the try
| block.
| should i close ResultSets and Connections in the catch block aswell?.
|
| or the problem is due to the connection pool settings in weblogic or
| on the oracle side instead of in my application.
|
| Thanks in Advance
| s

You should try to close them in a finally block (checking first to see that
the connection is not null) this way you will be sure that they get closed.
How many multiple connections do you get on your server? If it is a busy
website you may well need in excess of 100 connections in the pool. We have
max connections set to 200 in ours. A good way to close your connections so
that you don't have to have too many nested connections is as follows:

try{
Connection con = myDataSource.ge tConnection();
try{
// database call code here
}
finally{
if(con != null){
con.close();
}
}
}
catch(SQLExcept ion sqle){
//handle exception here
}
--
-P
Jul 17 '05 #3
OOps 'nested connections' should say nested try catch finally blocks :-)
Long day at work ;-)
--
-P

Jul 17 '05 #4
PerfectDayToCha seTornados wrote:

You should try to close them in a finally block (checking first to see that
the connection is not null) this way you will be sure that they get closed.
How many multiple connections do you get on your server? If it is a busy
website you may well need in excess of 100 connections in the pool. We have
max connections set to 200 in ours. A good way to close your connections so
that you don't have to have too many nested connections is as follows:

try{
Connection con = myDataSource.ge tConnection();
try{
// database call code here
}
finally{
if(con != null){
con.close();
}
}
}
catch(SQLExcept ion sqle){
//handle exception here
}

Hmmm; don't you risk the possibility that an exception on the
con.close() will overshadow another exception and make debugging more
difficult?

I usually use the following pattern:

Connection conn = null;
try
{
conn = getConnection() ;
// use connection
}
catch (final SQLException sqle)
{
// handle exception; call conn.rollback() if desired
}
finally
{
try
{
if (conn != null)
{
conn.close();
}
}
catch (final SQLException sqle)
{
// log exception
}
}

The nesting is no deeper than the original code.

Actually, this kind of issue makes me wish that Java supported the
notion of attaching a finally block to a method. The syntax would look like:

public void doStuff()
{
// do stuff
}
finally
{
// clean up
}

That would make a lot of code look cleaner.

Ray

Jul 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
12755
by: Jan Gregor | last post by:
Hello I found that jython catches exact java exceptions, not their subclasses. Is there some way to get around this limitation (or error) ? My program has class representing database source and specialed classes for particulars databases. Now there are two options - to include exception (subclasses of SQLException) for every db in except (so all drivers has to be present) or to move methods to subclasses.
1
6904
by: Vijai Kumar | last post by:
Hi, I am using jsp page to connect to oracle database. We are using a Borland Enterprise Server 5.2 application server and a web server running on IIS 6.0. A GUI module is hosted on the web server. When we use the logon.jsp page to connect we get the following error Error Logging On : java.sql.SQLException: ORA-00600: internal error code, arguments: , , , , , , , Can you please kindly advice what needs to be done.
3
22134
by: dinesh prasad | last post by:
I'm trying to use a servlet to process a form, then send that data to an SQL server stored procedure. I'm using the WebLogic 8 App. server. I am able to retrieve database information, so I know my application server can talk to the database. I've determined the failure occurs when the the following statement is executed: cstmt.execute(); (due to the failure of println statements placed afterwards). I get the following error after trying to...
6
2436
by: Rhino | last post by:
I'm trying to debug a simple Java UDF written in the DB2General style within Eclipse. I'm getting a java.lang.UnsatisfiedLinkError when I execute the set() method in the UDF. I know that the UnsatisfiedLinkError has something to do with a DLL that is not visible but I'm not sure why I'm having the problem given that both db2java.zip and db2jcc.jar are visible on my classpath and each of them contain the COM.ibm.db2.app.UDF class with a...
2
3977
by: astolpho | last post by:
I am using a slightly outdated reference book on J2EE programming. It gives 2 methods of creating a database used in its casestudies. The first is an ANT script that gives the following output: D:\original\CaseStudy-2-5\CaseStudy\Day02\exercise>asant database Buildfile: build.xml env-user: prop-user: set-user:
2
6320
by: hemantmudaliar | last post by:
The Trigger is giving following exception java.sql.SQLException: ORA-04091: table PSCONTENT.VGNASCHANNEL is mutating, trigger/function may not see it ORA-06512: at "PSCONTENT.CHECK_CHANNEL_UNPUBLISH", line 4 ORA-06512: at "PSCONTENT.CHECK_CHANNEL_UNPUBLISH_TR", line 1 ORA-04088: error during execution of trigger ................................ // Trigger CREATE OR REPLACE TRIGGER check_channel_unpublish_tr before delete ON...
2
14209
by: lunas | last post by:
hi i am trying to update a table selecting a value from another table and ve written the following codes for it.. import java.sql.*; import java.io.*; import java.util.*; public class AF_updateAlleleTmp { Connection m_alleleCon;
8
28568
by: ajos | last post by:
hi frnds, im trying to convert my servlets database configuration from ms access to mysql database.however im getting some error like no driver found exception. to verify this error ive made a simple database in jsp(just to check if my mysql is working smoothly otherwise) which access' the username.....but in the process im getting a error--> java.sql.SQLException: Access denied for user ''@'localhost' (using password: NO) i have...
0
604
by: Jim Kennedy | last post by:
ALL DDL does a commit. Hence Drop Table movies; issues a commit. True you don't issue a commit and the driver does not issue a commit, but the server does for all DDL. That is probably where your commit is coming from. Jim -- Replace part of the email address: kennedy-down_with_spammers@attbi.com with family. Remove the negative part, keep the minus sign. You can figure it out.
2
4046
by: meenuchotijuhi | last post by:
Hi, I've Recently joined this community coz i m very much interested in Oracle DBA track. Actaully I' m currently working on a project where I m using Java (jdk1.4) as front end and Oracle 9i as back end. When i connect my java gui application with Oracle db, it displays successful connection but when i try to enter some values through this application to the oracle database table then it display the following error - ...
0
8603
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9157
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8895
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7725
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6518
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5860
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4619
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3046
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2329
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.