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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to determine which field in a tMap is causing issues

Noob Question -- my apologies.
How do you trace mapping issues that cause java errors from a tMap down to the problematic column that is causing the issue?
I made a huge mistake and just mass corrected everything without testing each unit one by one, and now I am receiving the error on my tMap and am having a difficult time tracking the columns transformation code in the tMap to find the offending code of the 100+ column map:
Error in the component's properties!

I expanded it and saw:
Type mismatch: cannot convert from Object&Serializable&Comparable<?> to String

.. just letting the broken code continue I see:
 connecting to socket on port 4046
connected
Exception in thread "Thread-2" java.lang.Error: Unresolved compilation problem:
Type mismatch: cannot convert from Object&Serializable&Comparable<?> to String
at sap_uploads.sap_uploads_0_1.sap_uploads.tFileList_1Process(sap_uploads.java:2652)
at sap_uploads.sap_uploads_0_1.sap_uploads$1.run(sap_uploads.java:3689)
connecting to socket on port 4616
connected
Labels (3)
5 Replies
Anonymous
Not applicable
Author

hi
a first step to debug is to open code (just beside designer) and look at the right if you see a red "mark" ...
click on it , and you'll see which part of your code(and the name of the column) have a problem ...
regards
laurent
alevy
Specialist
Specialist

I find this kind of compilation error usually results from a missing " to start or end a String constant. Find it using Laurent's suggestion.
Anonymous
Not applicable
Author

perhaps in a ternary condition (boolean expression ? value1 : value2) ... but not sure about that 0683p000009MACn.png
Anonymous
Not applicable
Author

I found a more effective way to debug this by accident; if you instead use the drop down to change the debug type of run a Java Debug under the Debug Run section you get java code in a tab.
From here you can use the line number from the description of the error text (on the "Problems" tab) to find out what line of code is buggy. Based on the great naming convention of the automatically generated code, when you see the line that has an error, it should match the token of the offending field(s) in your tMap.
I hope this helps others.
Anonymous
Not applicable
Author