Java.sql.sqlexception Ora-00604 Error Occurred At Recursive
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn ora-00604: error occurred at recursive sql level 1 ora-01000: maximum open cursors exceeded more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags ora-00604: error occurred at recursive sql level 1 ora-01003: no statement parsed Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, ora-01882: timezone region not found helping each other. Join them; it only takes a minute: Sign up java.sql.SQLException: ORA-00604: error occurred at recursive SQL level 1 up vote 1 down vote favorite 1 I m getting the below SQL exception and I
How To Resolve Ora-01000 Maximum Open Cursors Exceeded
don't know what's the root cause for this exception? I am also closing db connection and statement too. java.sql.SQLException: ORA-00604: error occurred at recursive SQL level 1 ORA-01000: maximum open cursors exceeded ORA-00604: error occurred at recursive SQL level 1 ORA-01000: maximum open cursors exceeded ORA-01000: maximum open cursors exceeded Following is my code: while(true) { Statement stmt2 = conn1.createStatement(); ResultSet rs2 = null; int rec_count=0; rs2 = stmt2.executeQuery("select count(*) as cnt from some_table"); while(rs2.next()) { ora-00604 error occurred at recursive sql level 2 rec_count = rs2.getInt("cnt"); } if(rec_count>0) { update_qry_b_trg1 = "update some_table set to_be_triggered=1,algo_status='D',dealer_id='HD001',price_trig_date=sysdate where buy_sell = 'SELL' and ordertype = 'BNLD' and to_be_triggered = 0 and algo_status = 'P' and Mod(group_ref_no,5)="+th_id; String final_qry = "BEGIN \n"+update_qry_b_trg1+";\n"+";\n END;"; int rows = stmt1.executeUpdate(final_qry); stmt1.close(); } rs2.close(); stmt2.close(); } java oracle jdbc share|improve this question edited Nov 6 '12 at 11:36 RAS 5,309124065 asked Nov 6 '12 at 10:43 praveen2609 1161212 2 You are vulnerable to SQL Injection. Please read about prepared statements to fix this. –Ben Nov 6 '12 at 10:58 1 the code you've pasted doesnt appear to have any cursor leaks. i'd suggest you check v$open_cursor on the DB when this is running to determine what is happening. Ben's point is very valid too, th_id shouldn't be just pasted in there. also if you're only looking for 1 row in the table dont just count(*) at least add where rownum = 1 to cut down the work you do. –DazzaL Nov 6 '12 at 11:20 1 why is your update query in wrapped in BEGIN and END ? i think your update query is getting executed as a PROCEDURE and since your while loop is infinite its causing the problem. –Sajan Chandran Nov 6 '12 at 11:51 add a comment| 1 Answer 1 active oldest votes up vote 0 down vote accepted Whereever st
here for a quick maximum open cursors exceeded oracle overview of the site Help Center Detailed answers to
Ora-12705: Cannot Access Nls Data Files Or Invalid Environment Specified
any questions you might have Meta Discuss the workings and policies of this
Java Sql Sqlexception Ora 01000 Maximum Open Cursors Exceeded
site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us http://stackoverflow.com/questions/13249297/java-sql-sqlexception-ora-00604-error-occurred-at-recursive-sql-level-1 Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up ORA-00604: http://stackoverflow.com/questions/12083712/ora-00604-error-occurred-at-recursive-sql-level-1 error occurred at recursive SQL level 1 up vote 2 down vote favorite 1 I started getting the below SQL exception and I don't know what's the root cause for this exception? I am also closing dbconnection and prepared statement too. Then what's the problem? java.sql.SQLException: ORA-00604: error occurred at recursive SQL level 1 ORA-01000: maximum open cursors exceeded ORA-00604: error occurred at recursive SQL level 1 ORA-01000: maximum open cursors exceeded ORA-01000: maximum open cursors exceeded Below is my code which I am using. Anything wrong in my code? for (Entry
and https://scn.sap.com/thread/3628615 SafetyAsset NetworkAsset Operations and MaintenanceCommerceOverviewSubscription Billing http://www.javatpoint.com/q/6173/java-sql-sqlexception:-ora-00604:-error-occurred-at-recursive-sql-level-1 and Revenue ManagementMaster Data Management for CommerceOmnichannel CommerceFinanceOverviewAccounting and Financial CloseCollaborative Finance OperationsEnterprise Risk and ComplianceFinancial Planning and AnalysisTreasury and Financial Risk ManagementHuman ResourcesOverviewCore error occurred Human Resources and PayrollHuman Capital AnalyticsTalent ManagementTime and Attendance ManagementManufacturingOverviewManufacturing NetworkManufacturing OperationsResponsive ManufacturingMarketingOverviewMarket with Speed and AgilityUnique Customer ExperiencesReal-Time Customer InsightsR&D/EngineeringOverviewDesign NetworkDesign OrchestrationProject and Portfolio ManagementSalesOverviewCollaborative Quote to CashSales Force AutomationSales error occurred at Performance ManagementSelling Through Contact CentersServiceOverviewEfficient Field Service ManagementOmnichannel Customer ServiceTransparent Service Process and OperationsSourcing and ProcurementOverviewContingent Workforce ManagementDirect ProcurementSelf-Service ProcurementServices ProcurementStrategic Sourcing and Supplier ManagementSupply ChainOverviewDemand ManagementDemand NetworkLogistics NetworkManufacturing Planning and SchedulingResponse NetworkResponse and Supply ManagementSales, Inventory, and Operations PlanningTransportation ManagementWarehouse ManagementSustainabilityOverviewEnvironment, Health, and SafetyProduct Safety and Stewardship NetworkBrowse by IndustryAerospace and DefenseAutomotiveBankingChemicalsConsumer ProductsDefense and SecurityEngineering, Construction, and OperationsHealthcareHigh TechHigher Education and ResearchIndustrial Machinery and ComponentsInsuranceLife SciencesMediaMill ProductsMiningOil and GasProfessional ServicesPublic SectorRetailSports and EntertainmentTelecommunicationsTravel and TransportationUtilitiesWholesale DistributionBrowse Platform and TechnologyAnalyticsOverviewBusiness IntelligencePredictive AnalyticsGovernance, Risk, and ComplianceEnterprise Performance ManagementApplication Platform and InfrastructureOverviewA
New Question java.sql.SQLException: ORA-00604: error occurred at recursive SQL level 1By: mhnty_bikash@rediffmail.com On: Wed Sep 17 23:24:34 IST 2014000 0Hi sir, I have to insert more than 1000 of record in mytable.For that i have developed a tool which will insert records from mastertable to my table. But when i run my tool , my tool can inserted only 148 records for 1st run and it will showing a error i.e java.sql.SQLException: ORA-00604: error occurred at recursive SQL level 1 ORA-01000: maximum open cursors exceeded ORA-00604: error occurred at recursive SQL level 1 ORA-01000: maximum open cursors exceeded ORA-01000: maximum open cursors exceeded at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70) at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:112) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:173) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:455) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:413) at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:1030) at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:194) at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:785) at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:860) at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1186) at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3381) at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3425) at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1490) at com.per.sub.ReadNostroReadCount.main After that it will insert 148/2=74 records into the table with same above specified error. After that it will insert 74/2=37 records into the table with same above specified error. and will insert records so on with same error. But at last it will enter only single record with same error and after that it will not enter any reocord. I am afraid why it happens like that. Please help me and please solve the problem. with regards Bikash0 if you are using finally block thata would be better to close that. you should ch