473,594 Members | 2,770 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 18328
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
12750
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
6894
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
22117
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
2430
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
3966
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
6307
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
14194
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
28510
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
4041
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
7936
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
7874
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
8366
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
6646
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
5738
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
3853
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2383
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
1
1469
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1203
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.