cancel
Showing results for 
Search instead for 
Did you mean: 

Logs issue and java.lang.NullPointerException in Receiver Adapter

maheswarareddykonda
Active Contributor
0 Kudos

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 content
11.05.2015 08:24:08.452message.InformationCalling server: {1}
11.05.2015 08:24:08.821message.InformationServer returned code: 201
11.05.2015 08:24:08.822message.InformationREST call finished
11.05.2015 08:24:08.822message.InformationProcessing result
11.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.NullPointerException
11.05.2015 08:24:08.838message.ErrorMessage status set to FAIL
11.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


Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

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.

Former Member
0 Kudos

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

maheswarareddykonda
Active Contributor
0 Kudos

Hi Botha,

Thanks for reply..

i have used "Google Postman " tool for test the message ..here successfully working post method and sends back blank message and i could see one unique number(ID) under http header , which PI need to send back to Sender system.

can u please help me,since "ID" coming back using tool(postman),why the same not coming when we run the interface in PI

also why two logs not created in PI one is for Request and and another for response.

P.S: Interface configuration made perfectly fine.

Thanks & Regards,

Maheswarareddy

Former Member
0 Kudos

Hi,

Ok that is strange. On what PI system are on on? Just make sure that all the data en config and design is correct. Also make sure that the network is allowing traffic in and out on the server.

It says that is failing to log the message because of Java Null pointer exception. Run a message again and the the error will be generate on the developer logs in NWA. Please send me those logs.

Regards,

Jannus Botha

maheswarareddykonda
Active Contributor
0 Kudos

Hi Jannus Botha,

here is the attached Log viewer screenshot for particular this message.

Thanks and Regards,

Maheswarareddy

former_member182412
Active Contributor
0 Kudos

Hi Maheswarareddy,

Are you using any logging under your integrated configuration->Advanced settings?

Regards,

Praveen.

Former Member
0 Kudos

Hi,

That error doesnt look good.It seems the payload that gets sent back cannot because convert in the adapter. That can be because that you might have the incorrect structure in your response message. Just double check that you do have the correct message.

It says that it cannot generate the header mapping. Have you switch on your logging to log everything?

Regards,

Jannus Botha

maheswarareddykonda
Active Contributor
0 Kudos

Hi Praveen,

i could not see any log for response message neither used global configuration nor like below configuration

Thanks & Regards,

Maheswarareddy

former_member182412
Active Contributor
0 Kudos

Hi Maheswarareddy,

Change the configuration to below and try the message.

Regards,

Praveen.

maheswarareddykonda
Active Contributor
0 Kudos

Hi Jannus Botha,

the fact is even i am not sure what is the structure for response messages and created one field for response structure ,i hope this is not an problem ,i am expecting mapping exception if that structure is wrong..once i get mapping exception i can see what data is coming from receiver system.. so that i could be created structure as per that response..

Coming to logging ...can you please tell me where exactly i should switch on log for everything?

Thanks & Regards,

Maheswarareddy

Former Member
0 Kudos

Hi,

Ok that could be your problem. You should get your response structure from the third party.

We will take it from there after you get a response.

Switch on your logging on your ICO - The last Tab. Like Praveen showed in a earlier post.

Regards,

Jannus Botha

maheswarareddykonda
Active Contributor
0 Kudos

Hi Praveen,

I tried as you suggested configuration..but i could not see response message Log..

please find the below msg log screenshot.

once i click on Open message..below is the screenshot..

i have checked all logs ...those all are related to request message only, not Response ..

I hope you got what i am expecting


if you see my first post which i pasted error logs...there you can see below line

11.05.2015 08:24:08.822message.InformationREST call finished

this means request msg is processing correctly(also checked in receiver server) and along with having 2 more lines which i am thinking related to response one..

my confusion is why those 2 line added in request log instead create two msg logs for request and response.

Thanks & Regards,

Maheswarareddy

maheswarareddykonda
Active Contributor
0 Kudos

Hi Jannus Botha,

Thank you..i will defiantly get back once i get response structure..

Also i am 100% sure that approach which i tried wrong structure for response is not an issue,that must be fail with mapping exception..

here i am thinking why that response log does not creating..

Thanks & Regards,

Maheswarareddy

former_member182412
Active Contributor
0 Kudos

Hi Maheswarareddy,

What is your PI version and SP level? Are you logging raw JSON according to below SAP Note.

http://service.sap.com/sap/support/notes/2079486

May be it is failing to log response raw JSON step?

Regards,

Praveen.

maheswarareddykonda
Active Contributor
0 Kudos

Hi Praveen,

i have just checked Note..as per that my PI server is on top..

here is PI Server info

PI7.40 SP10 and patch level 05.

Thanks & Regards,

Maheswarareddy

former_member182412
Active Contributor
0 Kudos

Hi Maheswarareddy,

  • If possible disable the logging of JSON text and test the interface.
  • if not, Run XPI Inspector and you will see more details about error, If it is failing when logging JSON text then better to log a call to SAP.

Regards,

Praveen.

maheswarareddykonda
Active Contributor
0 Kudos

Hi Praveen,

I already raised the OSS note..and waiting for response..once they come up i let you know the reason.

and your second point, can u please elaborate how to run the XPI Inspector ..i'm very new to that feature.

Thanks & Regards,

Maheswarareddy

former_member182412
Active Contributor
0 Kudos

Hi

Check below blogs for XPI Inspector.

Regards,

Praveen.

former_member198060
Participant
0 Kudos

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.