Re: OC4j and abnormal exit of stm.executeQuery

From: Vissu <vissuyk_at_yahoo.com>
Date: 28 Mar 2004 06:33:50 -0800
Message-ID: <2bedd6a7.0403280633.40b760eb_at_posting.google.com>


It is hard to say, but try cathing all errors (Throwable) to get an idea. You may be running OutOfMemory or some other error, which is not an exception.

try
{
-- your query execution goes here
}
catch(Throwable t)
{
t.printStackTrace();
}

dottavio_at_ised.it (Antonio) wrote in message news:<fb35ea96.0403260635.19994ee4_at_posting.google.com>...
> Good Morning,
> I've a Servlet with inside the doPost() method a connection to a dB,
> the problem is that is a long query that work ok if launched on the dB
> with something like TOAD and also works well on (JbuilderX + Tomcat)
> environment but when deployed on OC4j it happens that during the
> execution of
> rs = stm.executeQuery(sSQL);
> something appens and the result is that the execution go out of the
> doPost() without passing for the catch() or the finally(), after this
> the servlet is recharged again.
> I can't not figure what is happening, could you help me ???
> Thanks
>
> Antonio D'Ottavio
>
>
> P.S. : Here's the code :
>
>
> ResultSet rs = null;
> Statement stm = null;
> Connection connR = null;
> try {
> sSQL = getSQLSelect();
> Class.forName("oracle.jdbc.driver.OracleDriver");
> connR = DriverManager.getConnection();
> stm = connR.createStatement();
> rs = stm.executeQuery(sSQL);
> System.out.println("WebStampaRERO - after executeQuery" );
> }
> catch (Exception ex) {
> System.out.println("WebStampaRERO - inside exception" );
> ex.printStackTrace(System.out);
> }
> finally {
> System.out.println("WebStampaRERO - dentro finally" );
> if (rs != null) {
> try {rs.close();} catch (Exception ex) {}
> }
> if (stm != null) {
> try {stm.close();} catch (Exception ex) {}
> }
> if (connR != null) {
> try { connR.close();} catch (Exception ex) {}
> }
> }
> System.out.println("WebStampaRERO - dopo sendTemplate" );
> }
Received on Sun Mar 28 2004 - 16:33:50 CEST

Original text of this message