1 Reply Latest reply on Sep 21, 2001 10:46 AM by 7081

    ORA-29532: java.lang.OutOfMemoryError

      OK, here's the deal. I am getting a java.lang.OutOfmemoryError while executing a java stored proc from a background process. The line it stops at is on the CallableStatement.execute(), which should return a recordset of ~500,000 - 1,000,000 rows of 3 integers (from MSSQL). My top-level catch-statement catches and prints this out:

      ORA-29532: Java call terminated by uncaught Java exception: java.lang.OutOfMemoryError

      relevant excerpt:
      Dump file E:\oracle\admin\sh\bdump\shSNP1.TRC
      Fri Aug 24 17:02:39 2001
      ORACLE V8. - Production vsnsta=0
      vsnsql=e vsnxtr=3
      Windows NT Version 4.0 Service Pack 6, CPU type 586
      Oracle8i Enterprise Edition Release - Production
      With the Partitioning option
      JServer Release - Production
      Windows NT Version 4.0 Service Pack 6, CPU type 586
      Instance name: sh

      Redo thread mounted by this instance: 1

      Oracle process number: 9

      Windows thread id: 274, image: ORACLE.EXE

      *** 2001-08-24 17:02:39.453
      *** SESSION ID:(7.11721) 2001-08-24 17:02:39.390
      at com.ashna.jturbo.tds.i.d(i.java)
      at com.ashna.jturbo.tds.i.b(i.java)
      at com.ashna.jturbo.tds.h.a(h.java)
      at com.ashna.jturbo.driver.ba.a(ba.java)
      at com.ashna.jturbo.driver.bb.k(bb.java)
      at com.ashna.jturbo.driver.bb.a(bb.java)
      at com.ashna.jturbo.driver.bc.execute(bc.java)
      at com.ashna.jturbo.driver.bb.executeQuery(bb.java)
      at com.sh.oracle.data_import.import_individual_batch(data_import.sqlj:1223)
      at com.sh.oracle.data_import.do_do_import(data_import.sqlj:490)
      at com.sh.oracle.data_import.do_import(data_import.sqlj:78)

      What this procedure is doing is using the jturbo JDBC driver to import MSSQL data into oracle (via the oracle thin driver). At first I suspected a bad, memory hogging jdbc driver, so I increased the java pool to 150 Megs and the shared pool to 100 Megs (was originally at the default, whatever that may be) (Excessive, I know), but this helped only a little. I did a string search though the driver to make certain that it never threw a java.lang.OutOfMemoryError, so I know it is not falsely generated. So I looked elsewhere, thinking that perhaps it had something to do with the size of our recordsets. This does not seem to be the case, however, because I keep an eye on the sys.v$sgastat while the procedure is executing, and memory usage stays constant pretty much at, even before & after the exception is thrown:
      shared pool free memory: ~90,000,000
      java pool free memory: 143,425,536
      java pool memory in use: 7,548,928

      And just before executing this callablestatement I get
      (I am not sure where jserver gets these numbers).

      To make a long story short, I appear to have plently of memory available, and yet the jvm will not give it to the driver. Anybody have any ideas? Thoughts on how to debug this would be just as appreciated. Obviously it would be difficult to do any instrumentation of the driver, but is there anything I can do on the oracle side to get more information.

      TIA for any help, I'm going nuts over here!(Oh, and I'll be more than happy to supply any more info needed)


      (ps I have mailed the JTurbo fellows and they haven't a clue, they say it (the sql driver) does use up a bit more memory as the result set size increases, but nowhere near 143 Megs (even for a 1,000,000 record set result), though it seems that the driver is never even trying to allocate this memory...)
        • 1. re:ORA-29532: java.lang.OutOfMemoryError

          Did you ever solve this problem? I have kind of the same problem, I have plenty of memory left but for some reason I get an OutOfMemory exception. Ive trie to increase shared and java_pool size but nothing helps.

          I even tried to increase the callspace area (the amount of memory that a java proocess can allocate in JServer) since this is limmited to 100MB by oracle default.

          I would appreciate any help!
          Regards Richard