Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
NNot_defined1662386513

Error Java heap space in Talend Studio

Problem while excuting a job in Talend Studio on component tDBinput (MySQL connexion)

How do i fix this problem ?

Do i have to modify settings in my studio or on server ?

émarrage du Job J_DWH_Clients à 14:27 08/11/2023.

[INFO ] 14:27:44 cdpr.j_dwh_clients_1_1.J_DWH_Clients- Project name: CDPR Job name: J_DWH_Clients GIT Commit ID: null Talend Version: 8.0.1.20230913_0925-patch

[INFO ] 14:27:44 cdpr.j_dwh_clients_1_1.J_DWH_Clients- TalendJob: 'J_DWH_Clients' - Start.

[INFO ] 14:27:45 cdpr.j_dwh_clients_1_1.J_DWH_Clients- TalendJob: 'J_DWH_Clients' - Started.

[statistics] connecting to socket on port 3481

[statistics] connected

Exception in component tDBInput_4 (J_DWH_Clients)

java.sql.SQLException: Java heap space

at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:130)

at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)

at com.mysql.cj.jdbc.StatementImpl.executeQuery(StatementImpl.java:1200)

at cdpr.j_dwh_clients_1_1.J_DWH_Clients.tDBInput_4Process(J_DWH_Clients.java:14614)

at cdpr.j_dwh_clients_1_1.J_DWH_Clients.tDBInput_1Process(J_DWH_Clients.java:12486)

at cdpr.j_dwh_clients_1_1.J_DWH_Clients.runJobInTOS(J_DWH_Clients.java:15986)

at cdpr.j_dwh_clients_1_1.J_DWH_Clients.main(J_DWH_Clients.java:15144)

Caused by: java.lang.OutOfMemoryError: Java heap space

at java.base/java.util.Arrays.copyOf(Arrays.java:3689)

at java.base/java.util.ArrayList.grow(ArrayList.java:238)

at java.base/java.util.ArrayList.grow(ArrayList.java:243)

at java.base/java.util.ArrayList.add(ArrayList.java:486)

at java.base/java.util.ArrayList.add(ArrayList.java:499)

at com.mysql.cj.protocol.a.TextResultsetReader.read(TextResultsetReader.java:85)

at com.mysql.cj.protocol.a.TextResultsetReader.read(TextResultsetReader.java:48)

at com.mysql.cj.protocol.a.NativeProtocol.read(NativeProtocol.java:1661)

at com.mysql.cj.protocol.a.NativeProtocol.readAllResults(NativeProtocol.java:1715)

at com.mysql.cj.protocol.a.NativeProtocol.sendQueryPacket(NativeProtocol.java:1065)

at com.mysql.cj.protocol.a.NativeProtocol.sendQueryString(NativeProtocol.java:998)

at com.mysql.cj.NativeSession.execSQL(NativeSession.java:655)

at com.mysql.cj.jdbc.StatementImpl.executeQuery(StatementImpl.java:1168)

... 4 more

[FATAL] 14:28:24 cdpr.j_dwh_clients_1_1.J_DWH_Clients- tDBInput_4 Java heap space

java.sql.SQLException: Java heap space

at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:130) ~[mysql-connector-j-8.0.33.jar:8.0.33]

at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122) ~[mysql-connector-j-8.0.33.jar:8.0.33]

at com.mysql.cj.jdbc.StatementImpl.executeQuery(StatementImpl.java:1200) ~[mysql-connector-j-8.0.33.jar:8.0.33]

at cdpr.j_dwh_clients_1_1.J_DWH_Clients.tDBInput_4Process(J_DWH_Clients.java:14614) [classes/:?]

at cdpr.j_dwh_clients_1_1.J_DWH_Clients.tDBInput_1Process(J_DWH_Clients.java:12486) [classes/:?]

at cdpr.j_dwh_clients_1_1.J_DWH_Clients.runJobInTOS(J_DWH_Clients.java:15986) [classes/:?]

at cdpr.j_dwh_clients_1_1.J_DWH_Clients.main(J_DWH_Clients.java:15144) [classes/:?]

Caused by: java.lang.OutOfMemoryError: Java heap space

at java.util.Arrays.copyOf(Arrays.java:3689) ~[?:?]

at java.util.ArrayList.grow(ArrayList.java:238) ~[?:?]

at java.util.ArrayList.grow(ArrayList.java:243) ~[?:?]

at java.util.ArrayList.add(ArrayList.java:486) ~[?:?]

at java.util.ArrayList.add(ArrayList.java:499) ~[?:?]

at com.mysql.cj.protocol.a.TextResultsetReader.read(TextResultsetReader.java:85) ~[mysql-connector-j-8.0.33.jar:8.0.33]

at com.mysql.cj.protocol.a.TextResultsetReader.read(TextResultsetReader.java:48) ~[mysql-connector-j-8.0.33.jar:8.0.33]

at com.mysql.cj.protocol.a.NativeProtocol.read(NativeProtocol.java:1661) ~[mysql-connector-j-8.0.33.jar:8.0.33]

at com.mysql.cj.protocol.a.NativeProtocol.readAllResults(NativeProtocol.java:1715) ~[mysql-connector-j-8.0.33.jar:8.0.33]

at com.mysql.cj.protocol.a.NativeProtocol.sendQueryPacket(NativeProtocol.java:1065) ~[mysql-connector-j-8.0.33.jar:8.0.33]

at com.mysql.cj.protocol.a.NativeProtocol.sendQueryString(NativeProtocol.java:998) ~[mysql-connector-j-8.0.33.jar:8.0.33]

at com.mysql.cj.NativeSession.execSQL(NativeSession.java:655) ~[mysql-connector-j-8.0.33.jar:8.0.33]

at com.mysql.cj.jdbc.StatementImpl.executeQuery(StatementImpl.java:1168) ~[mysql-connector-j-8.0.33.jar:8.0.33]

... 4 more

[ERROR] 14:28:24 cdpr.j_dwh_clients_1_1.J_DWH_Clients- JL_Databases_1_tWarn_1 - Message: Erreur technique : abandon des transaction en cours sur SQL. Code: 1

[FATAL] 14:28:25 cdpr.j_dwh_clients_1_1.J_DWH_Clients- JL_Databases_1_tDBRollback_4 Packet for query is too large (5 047 892 > 4 194 304). You can change this value on the server by setting the 'max_allowed_packet' variable.

com.mysql.cj.jdbc.exceptions.PacketTooBigException: Packet for query is too large (5 047 892 > 4 194 304). You can change this value on the server by setting the 'max_allowed_packet' variable.

at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:107) ~[mysql-connector-j-8.0.33.jar:8.0.33]

at com.mysql.cj.jdbc.ConnectionImpl.rollbackNoChecks(ConnectionImpl.java:1902) ~[mysql-connector-j-8.0.33.jar:8.0.33]

at com.mysql.cj.jdbc.ConnectionImpl.rollback(ConnectionImpl.java:1796) ~[mysql-connector-j-8.0.33.jar:8.0.33]

at cdpr.j_dwh_clients_1_1.J_DWH_Clients.JL_Databases_1_tDBRollback_4Process(J_DWH_Clients.java:6044) [classes/:?]

at cdpr.j_dwh_clients_1_1.J_DWH_Clients.JL_Databases_1_tLogCatcher_1Process(J_DWH_Clients.java:5567) [classes/:?]

at cdpr.j_dwh_clients_1_1.J_DWH_Clients$TalendException.printStackTrace(J_DWH_Clients.java:883) [classes/:?]

at cdpr.j_dwh_clients_1_1.J_DWH_Clients$TalendException.printStackTrace(J_DWH_Clients.java:858) [classes/:?]

at cdpr.j_dwh_clients_1_1.J_DWH_Clients.runJobInTOS(J_DWH_Clients.java:15993) [classes/:?]

at cdpr.j_dwh_clients_1_1.J_DWH_Clients.main(J_DWH_Clients.java:15144) [classes/:?]

[FATAL] 14:28:26 cdpr.j_dwh_clients_1_1.J_DWH_Clients- JL_Databases_1_tDBCommit_5 Communications link failure

...

Labels (3)
1 Solution

Accepted Solutions
NNayal1600240775
Contributor III
Contributor III

Hi,

 

To fix Java heap space error in Talend, you can do the following things:

 

(1) Increase the Java heap space memory in Talend. To achieve this

Go to the Run tab->Advanced settings-> Tick Use specific JVM arguments->Add arguments for setting the xms(minimum memory specification) and xmx(maximum memory specification) memory accordingly:

Eg:

-Xms8192M

-Xmx16384M

 

(2) In the Talend configuration file specify the xms and xmx memory.

 

The configuration file is present in Studio folder->open file with type as Configuration settings, edit/increase the xms and xmx memory based on the memory of your pc

0695b00000reiqZAAQ.png

View solution in original post

6 Replies
NNayal1600240775
Contributor III
Contributor III

Hi,

 

To fix Java heap space error in Talend, you can do the following things:

 

(1) Increase the Java heap space memory in Talend. To achieve this

Go to the Run tab->Advanced settings-> Tick Use specific JVM arguments->Add arguments for setting the xms(minimum memory specification) and xmx(maximum memory specification) memory accordingly:

Eg:

-Xms8192M

-Xmx16384M

 

(2) In the Talend configuration file specify the xms and xmx memory.

 

The configuration file is present in Studio folder->open file with type as Configuration settings, edit/increase the xms and xmx memory based on the memory of your pc

0695b00000reiqZAAQ.png

NNot_defined1662386513
Author

Hi,

 

It works.

Thanks a lot.

nj2
Contributor
Contributor

Hi Alll

    I would like to increase the Java heap Memory in Talend Studio, but when I try to do same, I get error

---

Job failed. Could not load or find main class 

Caused By: java.lang.ClassNotFoundException

Any ideas??

Xiaodi_Shi
Employee
Employee

Hello @nj2 

Does this issue repro on all your jobs or a specific one? Is it a Resolving class and JAR related issue? Could you please post the error full stack trace here?

Best regards

Sabrina

nj2
Contributor
Contributor

I uninstalled Java and re-installed Azul Java8 and it is working fine now. 

Thanks 

 

Xiaodi_Shi
Employee
Employee

Hello,

So far, the updates for Talend products delivered in May 2024 came with the requirement to start most of the modules with Java 17.

Here is online documentation about:

https://help.qlik.com/talend/en-US/installation-guide-windows/Cloud/compatible-java-environments

Best regards

Sabrina