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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

[resolved] Execution Failed: JVM Compatibility

I'm trying to send messages to a Kafka topic but I get the following error: 
Execution failed : Job compile errors 
At least job "OnBoardingDemoJob" has a compile errors, please fix and export again.
Error Line: 1788
Detail Message: The constructor ProducerRecord<byte[],byte[]>(String, String) is undefined
There may be some other errors caused by JVM compatibility. Make sure your JVM setup is similar to the studio.

I've checked and everywhere it seems that I correctly use JDK 1.8 (Installed JREs; Compiler and Talend Java Interpreter).
My job is as follows:

0683p000009MDmY.png
0683p000009MDjQ.png

When I look at the code, the error on line 1788 the code is
tKafkaOutput_1_kafkaProducer.send(
   new org.apache.kafka.clients.producer.ProducerRecord<byte[], byte[]>("code", row5.code)
);

There is an error indicating that "The constructor ProducerRecord<byte[],byte[]>(String, String) is undefined". And when I open the class ProducerRecord it seems that this class was compiled for java 1.7 ("Compiled from ProducerRecord.java (version 1.7 : 51.0, super bit)").

Is it a Maven configuration issue or am I missing a configuration somewhere ?
Labels (3)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Sorry, the problem was that the output of the ExcelInputFile (" row5.code") was a string and kafka needs  byte[].
I changed the type of row5.code to byte[] and it works !
Thank you,
- Etienne

View solution in original post

3 Replies
Anonymous
Not applicable
Author

Hi,
Could you please indicate on which talend build version you are using? Does this JVM compatibility issue repro on all your jobs or a specific job(send messages to a Kafka topic)?
Best regards
Sabrina
Anonymous
Not applicable
Author

Sorry, the problem was that the output of the ExcelInputFile (" row5.code") was a string and kafka needs  byte[].
I changed the type of row5.code to byte[] and it works !
Thank you,
- Etienne
Anonymous
Not applicable
Author

Hi,
Great this issue has been fixed. Could you please mark this topic as resolved?
Best regards
Sabrina