It is a fairly small number of objects, but about 30 CMP's or so.  At the
time we are loading general things into our database (Lookup beans) such as
Languages, States, Countries, Gender, Income, Interests, and other such
objects which later act as "Lookup" or relational objects.  It could very
well be, that we are running out of cursors on the Oracle's side, and we
need to increase the count.

When a user is created, this is when the actual problem occurs, we are doing
ejbFinds all over the place for all of these entities.  So for example, to
create a user, there would be an EJB find executed on Languages, States,
Countries, Gender, Income, Interests, and a whole bunch of other things.
How long do cursors stay open?  Is Orion using cursors? When do they get
closed?

It is quite silly at this point, but we are not using transactions for our
Loads, so there is A LOT OF UPDATE/SELECT type of calls going out to the
database.  I am sure, if we wrap all the loaders into a single transaction
this problem might go away.

At this point, I am not sure if I want to open a bug, since it's so
difficult to reproduce, and I am not even sure if it is a bug.

-AP_

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of The
elephantwalker
Sent: Wednesday, August 15, 2001 2:56 PM
To: Orion-Interest
Subject: FW: ORA-01000: maximum open cursors exceeded Exception


resend, first one didn't catch...

-----Original Message-----
From: The elephantwalker [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 15, 2001 12:46 AM
To: Orion-Interest
Subject: RE: ORA-01000: maximum open cursors exceeded Exception


Alex and Dennis,

This is from experience with oracle. The try/catch in the finally is
necessary for these statements, or they won't compile.

Also, it looks like Alex's problem has to do with the number of open cursors
with cmp's and orion. I would be interested in the cmp.size() for a
findAll() on this just to see what the maximum problem could be. It could be
that his maximum cursor can't handle 1000 simulataneous open cursors, even
though his application is regularly producing this activity.

If its a small number of cmp's, then Karl and Magnus need to know...its a
bug.

Regards,

the elephantwalker


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of DENNIS
STRAIGHT
Sent: Tuesday, August 14, 2001 5:45 PM
To: Orion-Interest
Subject: Re: ORA-01000: maximum open cursors exceeded Exception


>Then again, it could be normal operation and we just need to increase the
number
>of cursors allowed.

This is possible but I doubt it.  Setting up the limit seems like a
cheap way to fix the problem... for now.  How many concurrent users are
executing this code?  And how long does it take for the error to occur?

I also noticed that your closing everything in its own try block inside
the finally block.  Of course you realize that if the line  rs.close();
for example, causes an error (because rs == null for example) then the
code would get thrown into the catch block and nothing else would get
closed.  At the very least I would remove the try - catch that is inside
the finally block.

Cheers,
Dennis



Alex Paransky wrote:
>
> We are not using any direct connections to the database.  We only use CMP
> beans.  So there might be something wrong in the way I am using the beans,
> or the could be a bug in Orion which is leaving a lot of cursors open.
Then
> again, it could be normal operation and we just need to increase the
number
> of cursors allowed.
>
> -AP_
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of The
> elephantwalker
> Sent: Tuesday, August 14, 2001 10:55 AM
> To: Orion-Interest
> Subject: RE: ORA-01000: maximum open cursors exceeded Exception
>
> Here's a bit of code I use alot in ejb's. The handler interface only has
one
> method, processResultSet. The getDBConnection is a helper method. Notice
how
> the connection, resultset and statement are closed. If these are'nt
executed
> in the proper order, and within a finally clause, oracle will glorck on
you
> with the 01000 error.
>
> If you have many cmp beans, it could be that your maximum's for open
cursors
> is like 50 or so. It should be up around 300. This can be modified in the
> ora.ini file.
>
> Regards,
>
> the elephantwalker
>
>     private void executeStatement(String statement, Handler handler)
throws
> RemoteException {
>
>         Connection con = null;
>         ResultSet rs = null;
>         Statement stmt = null;
>
>           try{
>             con = getDBConnection();
>             stmt = con.createStatement();
>             rs = stmt.executeQuery(statement);
>             handler.processResultSet(rs);
>
>         } catch (Exception ex){
>
>            throw new EJBException( ex.getMessage());
>     }  finally {
>
>            try{
>               rs.close();
>               stmt.close();
>               con.close();
>               rs = null;
>               stmt = null;
>               con = null;
>         } catch (SQLException se){
>
>            throw new EJBException( se.getMessage());
>
>         }
>
>    }
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Kesav Kumar
> Sent: Tuesday, August 14, 2001 10:26 AM
> To: Orion-Interest
> Subject: RE: ORA-01000: maximum open cursors exceeded Exception
>
> This is because you have too many opened statements and Resultsets.  Make
> sure that you close your statements and resultsets properly.  Try to debug
> the jdbc activity by setting the following properties.
>
> jdbc.debug=true
> debug.jdbc.check=true
> jdbc.connection.debug=true
>
> Kesav Kumar Kolla
> Voquette Inc
> 650 356 3740(W)
> 510 889 6840(R)
> Voquette....Delivering Sound Information
> -----Original Message-----
> From: Alex Paransky [mailto:[EMAIL PROTECTED]]
> Sent: Monday, August 13, 2001 6:51 PM
> To: Orion-Interest
> Subject: ORA-01000: maximum open cursors exceeded Exception
>
> We have been using the server more frequently now, and are getting this
> exception from time to time.  Does any one know why does this exception
> occur and what to do about it?  Could I be doing something wrong in my CMP
> 2.0 Entity Beans?  I am using Orion Server 1.5.2.
> Thanks.
> -AP_
>
> Embedded Exception ->
> com.evermind.server.rmi.OrionRemoteException: Database error:
>         at
>
InterestEntityHome_EntityHomeWrapper532.findExistingEntity(InterestEntityHom
> e_EntityHomeWrapper532.java:54)
>         at
>
InterestEntityHome_EntityHomeWrapper532.findByPrimaryKey(InterestEntityHome_
> EntityHomeWrapper532.java:269)
>         at
>
com.indnet.symbiosis.service.interestmanagement.InterestManagementServiceBea
> n.getValue(InterestManagementServiceBean.java:229)
>         at
>
com.indnet.symbiosis.service.interestmanagement.InterestManagementServiceBea
> n.getValue(InterestManagementServiceBean.java:254)
>         at
>
com.indnet.symbiosis.service.interestmanagement.InterestManagementServiceBea
> n.getTree(InterestManagementServiceBean.java:193)
>         at
>
com.indnet.symbiosis.service.interestmanagement.InterestManagementServiceBea
> n.getTrees(InterestManagementServiceBean.java:202)
>         at
>
com.indnet.symbiosis.service.interestmanagement.InterestManagementServiceBea
> n.getRootTrees(InterestManagementServiceBean.java:218)
>         at
>
InterestManagementService_StatelessSessionBeanWrapper8.getRootTrees(Interest
> ManagementService_StatelessSessionBeanWrapper8.java:849)
>         at
>
com.indnet.symbiosis.client.jsp.pagegen.services.UserMaintenanceService.init
> ialize(UserMaintenanceService.java:291)
>         at
>
com.slsideas.services.GenericServiceManager.initialize(GenericServiceManager
> .java:99)
>         at
> com.slsideas.pagegen.contexts.ServerContext.<init>(ServerContext.java:197)
>         at
>
com.slsideas.pagegen.servlets.BaseControllerServlet.doGet(BaseControllerServ
> let.java:238)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:195)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:309)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)
>         at com.evermind._cxb._abe(Unknown Source)
>         at com.evermind._cxb._uec(Unknown Source)
>         at com.evermind._io._twc(Unknown Source)
>         at com.evermind._io._gc(Unknown Source)
>         at com.evermind._if.run(Unknown Source)



Reply via email to