Quantcast
Channel: SCN : All Content - Process Integration (PI) & SOA Middleware
Viewing all articles
Browse latest Browse all 7030

Error in Split Mapping on NW 7.31 SP05

$
0
0

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.

 

Code in SP05

 

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

// ...

}

 



Viewing all articles
Browse latest Browse all 7030

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>