on 11-06-2012 7:25 PM
After, applying SP05 on NetWeaver 7.31 I get the following error in Split/Multi Mapping
Catching java.lang.ArrayIndexOutOfBoundsException: 1at com.sap.aii.adapter.xi.mapping.MappingService.splitMultisourceMessage(MappingService.java:383)at com.sap.aii.adapter.xi.mapping.MappingService.executeMapping(MappingService.java:317)at com.sap.aii.adapter.xi.ms.XIEventHandler$MAPProcessingBlock.process(XIEventHandler.java:1385)at com.sap.engine.messaging.impl.spi.stage.ProcessorImpl.proceedToProcessingBlock(ProcessorImpl.java:98)at com.sap.engine.messaging.impl.spi.stage.ProcessorImpl.processMessage(ProcessorImpl.java:69)at com.sap.aii.adapter.xi.ms.processor.ScenarioConfigurableProcessor.processMessage(ScenarioConfigurableProcessor.java:52)at com.sap.aii.adapter.xi.ms.XIEventHandler.onTransmit(XIEventHandler.java:455)at com.sap.engine.messaging.impl.core.queue.consumer.SendConsumer.processMessage(SendConsumer.java:319)at com.sap.engine.messaging.impl.core.queue.consumer.SendConsumer.onMessage(SendConsumer.java:102)at com.sap.engine.messaging.impl.core.queue.Queue.run(Queue.java:1000)at com.sap.engine.messaging.runtime.MSWorkWrapper.run(MSWorkWrapper.java:58)at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)at java.security.AccessController.doPrivileged(Native Method)at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:185)at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:302)
The following code in line 383 in java method com.sap.aii.adapter.xi.mapping.MappingService.splitMultisourceMessage is wrong.
Interface splitInterface = interfacesArray[i];
The interfaces collection must be accessed using the MessageN (Message1, Message2, ..) element index and not the index of each message inside each MessageN element. I checked the code in both versions and it seams in the new code of SP05 is wrong.
private TransportableMessage[] splitMultisourceMessage(XIMessage message, Collection<Interface> interfaces)
throws MessagingException, RoutingException
{
String SIGNATURE = "splitMultisourceMessage(message, interfaces)";
if (loc.bePath()) loc.entering("splitMultisourceMessage(message, interfaces)", new Object[] { message, interfaces });
ArrayList messageList = new ArrayList();
List splittedContent = this.multiStructDocHandler.splitMultiSourceDoc(message.getMainPayload().getContent());
RoutingManagerImpl manager = RoutingManagerImpl.getInstance();
Interface[] interfacesArray = (Interface[])interfaces.toArray(new Interface[interfaces.size()]);
for (int i = 0; i < splittedContent.size(); i++) {
if (((byte[])splittedContent.get(i)).length > 0) {
XIMessage childMessage = manager.performXIMessageSplit(message);
PayloadImpl payload = new PayloadImpl();
payload.setContent((byte[])splittedContent.get(i));
childMessage.setMainPayload(payload);
Interface splitInterface = interfacesArray[i];
Binding receiverBinding = RoutingUtils.queryCPAForBinding(splitInterface.getReceiverConnectivityId());
RoutingUtils.applyRetrySettingsToMessage(childMessage, receiverBinding);
childMessage.setAction(new Action(splitInterface.getInterfaceName(), splitInterface.getInterfaceNamespace()));
TransportableMessage tMessage = childMessage;
ICOHelper.setReceiverActionForICOMessage(tMessage, childMessage.getAction());
messageList.add(tMessage);
}
}
TransportableMessage[] tMessages = (TransportableMessage[])messageList.toArray(new TransportableMessage[messageList.size()]);
if (TRACE.beLogged(200)) TRACE.exiting("splitMultisourceMessage(message, interfaces)", message.getMessageKey());
return tMessages;
}
Code in SP04
private TransportableMessage[] splitMultisourceMessage(XIMessage message, Collection<Interface> interfaces)
throws MessagingException, RoutingException, IOException
{
String SIGNATURE = "splitMultisourceMessage(message, interfaces)";
if (loc.bePath()) loc.entering("splitMultisourceMessage(message, interfaces)", new Object[] { message, interfaces });
// ....
RoutingManagerImpl manager = RoutingManagerImpl.getInstance();
childMessage = manager.performXIMessageSplit(message);
PayloadImpl payload = new PayloadImpl();
payload.setContent(out.toByteArray());
childMessage.setMainPayload(payload);
InterfaceImpl splitInterface = (InterfaceImpl)interfacesArray[(messageState - 1)];
receiverBinding = RoutingUtils.queryCPAForBinding(splitInterface.getReceiverConnectivityId());
RoutingUtils.applyRetrySettingsToMessage(childMessage, receiverBinding);
childMessage.setAction(new Action(interfacesArray[(messageState - 1)].getInterfaceName(), interfacesArray[(messageState - 1)].getInterfaceNamespace()));
TransportableMessage tMessage = childMessage;
ICOHelper.setReceiverActionForICOMessage(tMessage, childMessage.getAction());
messageList.add(tMessage);
// ...
}
Hello,
Did u find out any solution?
I am implementing multi-mapping in SAP PI7.31 SP05 using graphical mapping, but i am getting out of bound exception when mapping tries to create multiple messages:
Mapping "XXXXX" failed to execute: ArrayIndexOutOfBoundsException: 1
Please share your findings?
Thanks
Amit Srivastava
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Marked the discussion as a Question.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Is PI7.31 java only stack?
- Praveen Gujjeti
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.