on 05-16-2011 9:01 AM
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?
> I use the adapter module in a receiver file adapter after the standard CallSapAdapter, ...
You cannot put a module after the standard module.
Every module has to be before the standard module.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Aftre the standard module the whole XI message is not available anymore. In a sync scenario you could read the response, bit in file adapter there is no response, so the XI message is null, therefore you cannot access the message attributes.
Could you zip the file inside the adapter module (or use payloadzipbean) instead zipping it after being written to file system?
Hello Stephan,
Can you please check if you are using latest jar file containing MessageKey class?
I remember,I was getting the same error when I was using old jar file (for XI3.0)
Thanks.
Best Regards,
Shweta
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Stephan,
Please find the details of changes in jar files for PI7.1 and the location to find these jar files:
http://wiki.sdn.sap.com/wiki/display/XI/XI%20libraries%20for%20development
Thanks.
Best Regards,
Shweta
Hi
I used the new jar files on our PI 7.1 instilation, copied the code from:
http://wiki.sdn.sap.com/wiki/display/XI/AdaptermoduleexampleforPI+7.1
but till get error:
Message processing failed. Cause: java.lang.NullPointerException: while trying to invoke the method com.sap.engine.interfaces.messaging.api.Message.getMessageId() of an object loaded from local variable 'msg'
User | Count |
---|---|
84 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.