Hi All,
I am developed new custom adapter module and I want it to be called after the execution standard module in File receiver channel.
But I am getting a Null pointer exception as it has lost the reference to ModuleData while the custom module is invoked.
*****Error message
Transmitting the message to endpoint <local> using connection File_http://sap.com/xi/XI/System failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: java.lang.NullPointerException: while trying to invoke the method com.sap.engine.interfaces.messaging.api.Message.getMessageId() of a null object loaded from local variable msg
********
But When the same module is placed before standard "CallSapAdapter", it is getting executed successfully.
Could some please advise if we can call a custom module after standard Sap "CallSapAdapter" module.
Part code:
obj = inputModuleData.getPrincipalData();
msg = (Message)obj;
loc = Location.getLocation(getClass().getName());
this.trace = moduleContext.getContextData("trace");
this.key = new MessageKey(msg.getMessageId(), msg.getMessageDirection());
Getting error @this.key = new MessageKey(msg.getMessageId(), msg.getMessageDirection()); as msg object is null.