Skip to Content
avatar image
Former Member

ClassCastException while executing adapter module IDOCFlatToXmlConvertor

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 How to Use User-Module for Conversion of IDoc Messages Between Flat and XML Formats

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Dec 29, 2011 at 01:50 PM

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

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 29, 2011 at 02:40 PM

    >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.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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

  • avatar image
    Former Member
    Jan 04, 2012 at 11:14 AM

    Question still open

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      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!