× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hello Eric,

The first thing I would do is go over your program and make sure you are freeing up all of necessary JVM object references with freeLocalRef or begin/end object groups.  Anything you do not free up with these will be left "in use" inside the Java Virtual Machine (JVM) and if enough of these build up, you'll run out of memory.

If that doesn't help, and you're still running out, you could increase the amount of memory available to the JVM.  There's a good discussion on how to do that, here: https://www.geeksforgeeks.org/how-to-increase-heap-size-in-java-virtual-machine/

Since you are running it from an RPG program, you'll need to set these settings in the QIBM_RPG_JAVA_PROPERTIES environment variable as explained here: https://www.ibm.com/docs/en/i/7.4?topic=rj-controlling-how-java-virtual-machine-is-set-up

Good luck!


On 8/10/22 1:16 PM, eric bothes wrote:
im using Scotts JDBC to write records to a MS SQL database.

After so many records are written, i get java exception java/lang/OutOfMemoryError and the programs dumps out.

The code uses jdbc_prepStmd/jdbc_execprepupd  to insert records into the table.





As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.