Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / First Aid / March 2004

Tip: Looking for answers? Try searching our database.

OC4j and abnormal exit of stm.executeQuery

Thread view: 
Antonio - 26 Mar 2004 15:32 GMT
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" );
 }
Antonio - 29 Mar 2004 11:34 GMT
Good Morning Joe
first of all thanks for your answer, in any case I've still not solved
this problem,
naturally the getConnection() include the right arguments and the
query is working on a time interval of 9 mounths while is not working
on a greater time interval, I've changed to Throwable ex as you
suggest but the execution do not enter there where that "something
strange" happens, I'm thinking that maybe the virtual machine crash or
something else, have you any idea  else ???

Thanks

                                                                   
Antonio D'Ottavio

"Joe Weinstein" <joeNOSPAM@bea.com> ha scritto nel messaggio
news:406460E5.4040604@bea.com...

> Antonio wrote:
>
[quoted text clipped - 53 lines]
> >     System.out.println("WebStampaRERO - dopo sendTemplate" );
> >   }
Antonio - 31 Mar 2004 08:44 GMT
Problem solved passing from OC4j 9.03 to OC4j 9.0.4 but please don't ask me why,
bye
                 Antonio


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.