cancel
Showing results for 
Search instead for 
Did you mean: 

ClassCastException while executing adapter module IDOCFlatToXmlConvertor

Former Member
0 Kudos

Hi All,

I'm trying to convert Idoc flat file to Idoc XML at sender file channel using module

IDOCFlatToXmlConvertor. I've followed the steps mentioned in Willam Li's blog

now i'm getting the following error at my sender file channel while it tries to process the file.

MP: processing local module localejbs/SAP_XI_IDOC/IDOCFlatToXmlConvertor

MP: exception caught with cause java.lang.ClassCastException: class java.lang.String:null incompatible with class java.util.ArrayList:null

Error Attempt to process file failed with java.lang.ClassCastException: class java.lang.String:null incompatible with class java.util.ArrayList:null

Please let me know why this error and how to resolve this?

Regards,

Rashmi

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Can you please mention the release and SP? It seems to be a technical bug. Contact SAP support with the logs.

Answers (2)

Answers (2)

Former Member
0 Kudos

Question still open

Former Member
0 Kudos

Hi ,  Did you get this issue resolved ?

Former Member
0 Kudos

Hi,

     Did you manage to resolve this one ? I have replaced the E1 with E2s, still get that same error

Error Attempt to process file failed with java.lang.ClassCastException: class java.lang.String:null incompatible with class java.util.ArrayList:null

Please update if you managed to solve this one..

Thanks!

baskar_gopalakrishnan2
Active Contributor
0 Kudos

>Attempt to process file failed with java.lang.ClassCastException: class java.lang.String:null incompatible with class java.util.ArrayList:null

ClasscastException will occur if the code does not find the right instance of the class type. Here the logic is doing to type cast ArrayList for String class. You might be having the adapter module jar which supports IDOCFlatToXmlConvertor is outdated or incompatible version. Please check. Also I hope you are doing class java.lang.String in the Application Resources overview screen. Please check.

Former Member
0 Kudos

Hi,

Thanks for your replies. Actually there's no issue with the module. I checked with other files downlaoded from ECC system, they work fine. Issue is with the test files i have.

One thing is we need to replace all E1EDK* segments as E2EDK*. With this replacement, file is getting processed. but then there's one more error: Error: java.lang.NumberFormatException: For input string: "".

1. Is there any way we can replace all 1s with 2s in the input file (E1EDK as E2EDK), is any such option there in the module?

2. For data validation error like above, is there any way to skip it?

Regards,

Rashmi

Edited by: Rashmi HS on Jan 4, 2012 12:08 PM

Edited by: Rashmi HS on Jan 4, 2012 12:15 PM