Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Adapter Module error

Hi All

I coded a adapter module but get the following error:

Message processing failed. Cause: java.lang.NullPointerException: while trying to invoke the method com.sap.engine.interfaces.messaging.api.Message.getMessageDirection() of an object loaded from local variable 'msg'

I use the adapter module in a receiver file adapter after the standard CallSapAdapter, When I take code from sdn from blog for sample adapter module I still get this error.

This is where the code is being used:

Message msg = null;

MessageKey key = null;

try {

obj = inputModuleData.getPrincipalData();

msg = (Message) obj;

if (msg.getMessageDirection().equals(MessageDirection.OUTBOUND))

key = new MessageKey(msg.getMessageId(), MessageDirection.OUTBOUND);

else

key = new MessageKey(msg.getMessageId(), MessageDirection.INBOUND);

Any ideas why I'm getting this error?

Former Member
Former Member replied

Here is a coding example for zipping:

/people/alessandro.guarneri/blog/2007/02/21/sap-xi-acting-as-a-huge-file-mover

0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question