SQL ERROR: Closed Connection in java -
connection closing automatically if i'm not closing in block. public string look( long id, string codename, connection conn ) throws sqlexception { try { stringbuffer sel = new stringbuffer().append(property); stmt = conn.preparecall( sel.tostring() ); /* filecode.java:194 */ stmt.setstring( 1, namec ); stmt.setlong( 2, valuei ); stmt.registeroutparameter( 3, oracle.jdbc.oracletypes.varchar ); stmt.execute(); return stmt.getstring( 3 ); } catch ( sqlexception e ) { if ( e.getmessage().touppercase().contains( "no data" ) ) { return "value not found"; } throw e; } catch ( exception e ) { e.printstacktrace(); } { system.out.println( " connnnnn closed ? : " + conn.isclosed