Four Stars

OutOfMemoryError when in Java debug

When I try to debug a job in TOS 4.2, I am getting the exception below. After looking for similar posts here, I have updated my tMaps to use a data directory and upped my heap space (first Xmx2048M then 4096M). I updated the interpreter to the latest JDK. None of these changes have affected the exception, which happens before I even get to the breakpoint on my first component.
Any ideas? Is this a known bug with Java debug? Thanks!
Exception in thread "main" java.lang.Error: java.lang.Error: java.lang.OutOfMemoryError: Java heap space
at ot.productfeed_0_1.productFeed.tFileList_1Process(productFeed.java:4929)
at ot.productfeed_0_1.productFeed.runJobInTOS(productFeed.java:7284)
at ot.productfeed_0_1.productFeed.main(productFeed.java:7182)
Caused by: java.lang.Error: java.lang.OutOfMemoryError: Java heap space
at ot.productfeed_0_1.productFeed.tMSSqlInput_2Process(productFeed.java:6693)
at ot.productfeed_0_1.productFeed.tFileList_1Process(productFeed.java:2819)
... 2 more
Caused by: java.lang.OutOfMemoryError: Java heap space
at java.lang.String.toCharArray(Unknown Source)
at sun.nio.cs.SingleByteDecoder.<init>(Unknown Source)
at sun.nio.cs.MS1252$Decoder.<init>(Unknown Source)
at sun.nio.cs.MS1252.newDecoder(Unknown Source)
at java.lang.StringCoding$StringDecoder.<init>(Unknown Source)
at java.lang.StringCoding$StringDecoder.<init>(Unknown Source)
at java.lang.StringCoding.decode(Unknown Source)
at java.lang.String.<init>(Unknown Source)
at net.sourceforge.jtds.jdbc.ResponseStream.readString(ResponseStream.java:293)
at net.sourceforge.jtds.jdbc.ResponseStream.readNonUnicodeString(ResponseStream.java:274)
at net.sourceforge.jtds.jdbc.TdsData.readData(TdsData.java:936)
at net.sourceforge.jtds.jdbc.TdsCore.tdsRowToken(TdsCore.java:3007)
at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2270)
at net.sourceforge.jtds.jdbc.TdsCore.getNextRow(TdsCore.java:765)
at net.sourceforge.jtds.jdbc.JtdsResultSet.next(JtdsResultSet.java:581)
at ot.productfeed_0_1.productFeed.tMSSqlInput_2Process(productFeed.java:6096)
... 3 more
2 REPLIES
Community Manager

Re: OutOfMemoryError when in Java debug

Hi
It was a 21637.
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
Four Stars

Re: OutOfMemoryError when in Java debug

Thanks Shong, but I think that's a different problem. I never got the error that shows up in that bug report. The job starts in Java debug mode, it just runs out of memory before it gets to the first breakpoint (which is on the first component, if that makes a difference). If I create a very simple subjob (file list >> delmited file >> log) I can run it in Java debug mode just fine.
The reason for debug is that I want to step through the execution and kill the job if I see bad data or logic before rows are persisted to the database. Having to restore my DB between each test run would kill my productivity, as you can imagine. I would use traces debug if I could step through a job with that. Traces debug also ignores breakpoints, it seems.
Is there any way to fix this memory problem? Or any workaround you can think of? Thanks!