Denis, the code you were looking at was not posted by me.  In the case of
ORA-01000 we have a system built entirely with CMP beans and Orion 1.5.2.
We have a program, we call the loader, which loads a number of entities into
the database after initial database refresh.  It is during the execution of
the loader, that we get this error.  The loader, is doing a lot of
ejbCreate() and finds to create the relationships between the entities.  So
to answer your original question, there is only 1 user.

-AP_

-----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