Receiving NumberFormatException #67
-
Hello, I was trying to implement CDC on the AS400 system while doing so I am constantly receiving an error "class":"java.lang.NumberFormatException","message":"High-order nibble of the byte at array offset 5036 is not valid. Byte value: 20" . I have tried to go through the journal files but couldn't find anything suspicious there. Thus, can anyone of you please help me out to know how I can get though this or how to debug it. Thanks in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments 9 replies
-
It sounds like the type on the table is deteched as some sort of number and when we try and decode it, the value is not valid for that decoder. I'd need to know the column type on the table to further diagnose. Hopefully it will log the table name, if not you could turn on debug logging adding a line to log4j2.xml like : Then we need to work out what column it is. If it's not obvious I might need to add some code to aid diagnostics. What's the full stack trace look like? |
Beta Was this translation helpful? Give feedback.
-
That's odd the only type that results in zonedDecimal is NUMERIC, which we use extensively I wonder if it's something magic about the parameters of your column. You can check the column type with:
filling in the appropriate please can you see if you can recreate the issue with some sql you could send me e.g.
you can configure this as the only table to include in debezium so the existing problem doesn't triger first using the |
Beta Was this translation helpful? Give feedback.
-
One thing I'd like to check, has the table changed recently - there is a limitation that if the connector isn't running and the table changes it loads the new state and can't decode the old journal entries |
Beta Was this translation helpful? Give feedback.
-
It occured to me last night that maybe the problem isn't the number column but the column before The buffer we decode has no field delimeters so if we get the length wrong on a prior column we will be trying to extract data from the wrong place in the buffer and it probably won't be valid Please could you run the following sql:
I'm not expecting anything in the |
Beta Was this translation helpful? Give feedback.
-
We ran the above mentioned SQL query and didn't find any special things in the user_defined parts along with this message I have attached the csv file which contains the column data type and its lengths.
We have checked the journal file using the following query but we found the buffer position to be fine. At least we can say that the column_number 90 is the buffer position which shows an error. So it will be best if we can compare the buffer from debezium with the journal records. |
Beta Was this translation helpful? Give feedback.
-
This should fix it I think: #69 Is graphic simply for unicode ucs2/utf16 - it looks like the newer versions of db2 (11) has 4 byte variants as well as 2 byte but that's not available for the iseries |
Beta Was this translation helpful? Give feedback.
-
I've pushed image silllencem/debezium-connector-ibmi:2.4.0.Final_1.10.5 if you want to try it |
Beta Was this translation helpful? Give feedback.
This should fix it I think: #69
Is graphic simply for unicode ucs2/utf16 - it looks like the newer versions of db2 (11) has 4 byte variants as well as 2 byte but that's not available for the iseries