Skip to Content

Custom adapter module throwing exception

Hi,

We have written an adapter module (EJB) to convert a file structure into XML for conversion in XI. Using file adapter(FTP), we are getting the files converted into XML without any problem. However, when there is no file in the directory the module is throwing an exception and writing an entry into the log (polling interval is 1 minute).

The requirement is when there is no file in the directory, the adapter should keep on polling, but without generating any exception or making an entry in the log.

Can anyone help out with this please?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • avatar image
    Former Member
    Jun 11, 2007 at 12:58 PM

    hi

    Are you having logic in the code to handle such a situation?

    Why dont you handle it in the Catch section of your try block

    I believe you are getting a null pointer exception right???

    regards

    krishna

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 12, 2007 at 03:29 AM

    Generally the file adapter polls continuosly even if there is no file. Since you are using file not found exception hence the exception. So i would suggest that do not throw any exception. let the file adapter keep polling.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 12, 2007 at 04:31 AM

    strange...

    if a file is not found in the specified directory where your file adapter is polling, it is not possible that the control comes to the adapter module you have specified in the module chain.

    have you done something unusual in your CC config i.e. added only your module in the module chain and removed CallSAPAdapter 😉

    Add comment
    10|10000 characters needed characters exceeded

  • Jun 12, 2007 at 10:12 AM

    By any chance in the Adapter Module are you performing a File IO to read a file from some location?

    Regards

    Bhavesh

    Add comment
    10|10000 characters needed characters exceeded

    • Hi,

      No I have not performed any File IO to read the file from the specified directory.

      I have used ModuleContext and ModuleData and then used

      Message msg = (Message) inputModuleData.getPrincipalData(); to retrieve the data.