RE: ORA-01000: maximum open cursors exceeded Exception
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) VoquetteDelivering 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
RE: ORA-01000: maximum open cursors exceeded Exception
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
RE: ORA-01000: maximum open cursors exceeded Exception
Title: RE: ORA-01000: maximum open cursors exceeded Exception I believe u get this error when you are opening tooo many connections. (duh) In other words make sure you are closing your Statements or PreparedStatements. If you are, then check with your DBA to see how many current cursors you are allowed and see if you could get that increased. Joseph Faisal Nusairat, Sr. Project Manager WorldCom tel: 614-723-4232 pager: 888-452-0399 textmsg: [EMAIL PROTECTED] -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)
Re: ORA-01000: maximum open cursors exceeded Exception
I've seen this before with my code. It has nothing to do with Orion. Make sure you are closing your Connections, Statements, PreparedStatements, CallableStatements and ResultSets. The proper place to do this is in a finally statement so the code will always get executed, even if an exception is thrown. BTW: SQL Server seems to allow you to be sloppy in closing connections. I guess (think) SQL Server somehow closes them for you. Oracle, however, does not :) -DStraight Nusairat, Joseph F. wrote: I believe u get this error when you are opening tooo many connections. (duh) In other words make sure you are closing your Statements or PreparedStatements. If you are, then check with your DBA to see how many current cursors you are allowed and see if you could get that increased. Joseph Faisal Nusairat, Sr. Project Manager WorldCom tel: 614-723-4232 pager: 888-452-0399 textmsg: [EMAIL PROTECTED] -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)
RE: ORA-01000: maximum open cursors exceeded Exception
Title: 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=truedebug.jdbc.check=truejdbc.connection.debug=true Kesav Kumar Kolla Voquette Inc 650 356 3740(W) 510 889 6840(R) VoquetteDelivering 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)
Auto-reply: RE: ORA-01000: maximum open cursors exceeded Exception
I am out of the office until September 5th. Please contact Mark.Reeves:oracle.com if you require assistance. Regards Antony BEGIN:VCARD VERSION:2.1 N:Reynolds;Antony;J FN:Antony J Reynolds ORG:a href=http://www.oracle.com/index.html; target=_topimg src=http://www.oracle.com/admin/images/oraclelogo.gif; width=188 height=44 border=0 alt=/abrbA href=http://www.uk.oracle.com;Oracle Corporation UK Limited/A;A href=http://presales.uk.oracle.com;BCorporate Pre-Sales/A TITLE:Principal Sales Consultant NOTE;ENCODING=QUOTED-PRINTABLE:Principal Consultant in Corporate Pre-Sales for Oracle UK=0D=0Aspecialising = in Java, CORBA and large-scale online transaction=0D=0Aprocessing systems us= ing Oracle Server platform.=0D=0A=0D=0AInternally my time can be requested v= ia a a href=3Dhttp://presales.uk.oracle.com/cps_tools/plsql/cpsreq$.startu= pCPS request/a. TEL;WORK;VOICE:+44 (0)118 924 3245 TEL;WORK;VOICE:+44 (0) 1454 631524 TEL;CELL;VOICE:+44 (0)7775 896150 TEL;WORK;FAX:+44 (0)118 924 3721 ADR;POSTAL;ENCODING=QUOTED-PRINTABLE:;;Castlegate=0D=0ATower Hill;Bristol;;BS2 OJA;UK LABEL;POSTAL;ENCODING=QUOTED-PRINTABLE:Castlegate=0D=0ATower Hill=0D=0ABristol BS2 OJA=0D=0AUK URL:http://www.oracle.com EMAIL;PREF;INTERNET:[EMAIL PROTECTED] EMAIL;INTERNET:[EMAIL PROTECTED] EMAIL;INTERNET:[EMAIL PROTECTED] REV:20010601T130645Z END:VCARD smime.p7s Title: RE: ORA-01000: maximum open cursors exceeded Exception I believe u get this error when you are opening tooo many connections. (duh) In other words make sure you are closing your Statements or PreparedStatements. If you are, then check with your DBA to see how many current cursors you are allowed and see if you could get that increased. Joseph Faisal Nusairat, Sr. Project Manager WorldCom tel: 614-723-4232 pager: 888-452-0399 textmsg: [EMAIL PROTECTED] -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)
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) VoquetteDelivering 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)
RE: ORA-01000: maximum open cursors exceeded Exception
I am using CMP beans only, so i am not controlling any connections directly. -AP_ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of DENNIS STRAIGHT Sent: Tuesday, August 14, 2001 10:55 AM To: Orion-Interest Subject: Re: ORA-01000: maximum open cursors exceeded Exception I've seen this before with my code. It has nothing to do with Orion. Make sure you are closing your Connections, Statements, PreparedStatements, CallableStatements and ResultSets. The proper place to do this is in a finally statement so the code will always get executed, even if an exception is thrown. BTW: SQL Server seems to allow you to be sloppy in closing connections. I guess (think) SQL Server somehow closes them for you. Oracle, however, does not :) -DStraight Nusairat, Joseph F. wrote: I believe u get this error when you are opening tooo many connections. (duh) In other words make sure you are closing your Statements or PreparedStatements. If you are, then check with your DBA to see how many current cursors you are allowed and see if you could get that increased. Joseph Faisal Nusairat, Sr. Project Manager WorldCom tel: 614-723-4232 pager: 888-452-0399 textmsg: [EMAIL PROTECTED] -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)
RE: ORA-01000: maximum open cursors exceeded Exception
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) VoquetteDelivering 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)
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) VoquetteDelivering 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