Skip to Content

Logs issue and java.lang.NullPointerException in Receiver Adapter

Hi Experts


I am currently working on an SOAP to REST synchronous interface and am using SAP rest adapter at receiver side.

the requirement is when we perform the POST operation ..record must be suppose to created and send back the unique number to PI server.


but interface is working till the creating the record at target side and not sending back unique number.


below is the error log in PI:


11.05.2015 08:24:08.424message.InformationPreparing message content11.05.2015 08:24:08.452message.InformationCalling server: {1}11.05.2015 08:24:08.821message.InformationServer returned code: 20111.05.2015 08:24:08.822message.InformationREST call finished11.05.2015 08:24:08.822message.InformationProcessing result11.05.2015 08:24:08.830message.ErrorTransmitting the message using connection AFW failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: Logging message failed, due to Failed to log msg 181bd100-f7b7-11e4-937c-0000185d0526(OUTBOUND). Reason: java.lang.NullPointerException11.05.2015 08:24:08.838message.ErrorMessage status set to FAIL11.05.2015 08:24:08.839message.ErrorReturning to application. Exception: com.sap.engine.interfaces.messaging.api.exception.MessagingException: Logging message failed, due to Failed to log msg 181bd100-f7b7-11e4-937c-0000185d0526(OUTBOUND). Reason: java.lang.NullPointerException



Note: As we know since this is synchronous, two message logs must be created one is request and second one for response ..but here that is not happening .its creating only one log which is for the request message and nothing is coming for response.


Please can you help where its going wrong.


Thanks and Regards,

Maheswarareddy


Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • author's profile photo
    Former Member
    Posted on May 11, 2015 at 02:27 PM

    Hi,

    Might be a stupid question but have you made sure that all your design and config is correct? Is the answer is yes.

    Would suggest try and running it from SOAPUI and see what response you get back?

    You might be getting a blank response (It will fail) because you are expecting some sort of response.

    Test with SOAPUI and ask the guys on the Restful side to make sure that they are sending a response back and if they have programmed it to be Sync. Just make sure of all of these and then we can maybe go and look on the SAP PI NWA Logs to see what is happening.

    Regards,

    Jannus Botha

    Add comment
    10|10000 characters needed characters exceeded

    • Hello,

      I am having the exact same issue. I have a synchronous call to a REST receiver which responds with an empty body payload. If I am setting the response format to JSON, PI fails while trying to do the JSON conversion. If I set the response format to "XML", PI fails with the error "Transmitting the message using connection SOAP_http://sap.com/xi/XI/System failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: Logging message failed, due to Failed to log msg ea53b2b5-8890-11e5-9e88-00000084d992(OUTBOUND). Reason: java.lang.NullPointerException".

      I don't really expect anything (not even header information) back from the recipient, but I cannot set the channel to EO and asynchronous service interfaces because in this case I don't get errors back if the receiver cannot process the request message.

      Is there any work around how we can receive empty payload message so that PI can consume it? I would just want to wrap an XML root element around which doesnt contain any elements using the REST adapter.

  • author's profile photo
    Former Member
    Posted on Nov 17, 2015 at 08:46 PM

    I have this issue too. I am also using a REST receiver adapter and have created the message structure based on the XML response I get to the HTTP POST.

    The incorrect message type in response looks to be the issue.

    Add comment
    10|10000 characters needed characters exceeded