Skip to Content
0
Former Member
Sep 14, 2005 at 05:48 AM

JCo IDoc program outofmemory error

146 Views

Hi, I'm a new one in SDN and this is my first topic.

Now i use Jco-idoc jar to do some programs, and these programs are very sample: recieve IDOC requests,download to flat file and then do the other things with these files.

When i send a small IDOC request to this program manually (use WE19), all things look very well. But when i try to send a big one ,the program throw exception as below and the program crashed:

<b>Exception in thread "JCO.ServerThread-1" java.lang.OutOfMemoryError: requested 196370116 bytes for jchar in D:/BUILD_AREA/jdk142-update/ws/fcs/hotspot\src\share\vm\prims\jni.cpp. Out of swap space?</b>

I try to increase the JVM with "-Xms1024M -Xmx1024M -XX:NewSize=256M -XX:MaxNewSize=256M -XX:MaxPermSize=256M", but this error as same as before!

Is there buffer space limitation for JNI interface in sapjcorfc.dll? I guess. And the other question confused me. When i use EDI write this IDOC request to SAP local file, the file size only has about 20M and 92363 rows, why in my program recieve "<b>196370116 bytes</b>"?

I work in winxp, JSDK is j2se 1.4.2_08-b03, JCO version is 2.1.5, SAP Java Base IDoc Class Library version is 1.0.2, and SAP Java Connector IDoc Class Library version is 1.0.3.

Thank you!

Regards,

Liu Hui