Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

tjavarow:Error in serialized byte output creation

In trying to create serialized byte output in tjavarow. Iam facing following error.

ERROR: Detail Message: The constructor ProducerRecord<byte[],byte[]>(String, Byte) is undefined

Here is the code that I have put in tjavarow.

output_row.SerializedValue = new StringBuilder()
.append(input_row.product_id)
.append(":")
.append(input_row.model)
.append(":")
.append(input_row.country)
.append(":")
.append(input_row.availableQTY)
.append(":")
.append(input_row.priceperQTY)
.append(":")
.append(input_row.currency)
.append(":")
.append(input_row.glob_delivery)
.append(":")
.append(input_row.Out_of_Stock).toString().getBytes();
Labels (3)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Thanks @vapukov for the reply.

 

The problem was not in the code but in the column which was receiving this value in the downstream tkafkaoutput where I had used 'Byte' instead of byte[]. I was able to resolve it then. Thanks anyways

View solution in original post

2 Replies
vapukov
Master II
Master II

output_row.SerializedValue = new StringBuilder() 

 

is String variable,

but you try to assign for string variable byte[] value

 

remove .getBytes from your code and add one more column for test

output_row.SerializedValueByteswith type byte[]

 

at the end of your code add:

output_row.SerializedValueBytes = output_row.SerializedValue.getBytes();
Anonymous
Not applicable
Author

Thanks @vapukov for the reply.

 

The problem was not in the code but in the column which was receiving this value in the downstream tkafkaoutput where I had used 'Byte' instead of byte[]. I was able to resolve it then. Thanks anyways