Skip to Content
Former Member
May 16, 2011 at 08:01 AM

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 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);


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

Any ideas why I'm getting this error?