cancel
Showing results for 
Search instead for 
Did you mean: 

java mapping 1:n message split

Former Member
0 Kudos

Hi,

I have a problem with a 1:n massage split via java mapping on a PI 7.11.

Scenario:

I want to read a binary file which contains some messages, do some stuff in the java mapping and split it into n messages.

Everything works fine, except the split. When I change the operation mapping to 1 -> 0..unbounded and set the namesspaces in java mapping to

<ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge"><ns0:Message1><ns1:FlatfileMessage xmlns:ns1="http://namespace.com/Flatfile">

I'm always getting the same errror:

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> 
- <!--  Request Message Mapping 
  --> 
- <SAP:Error SOAP:mustUnderstand="" xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
  <SAP:Category>XIServer</SAP:Category> 
  <SAP:Code area="MAPPING">GENERIC</SAP:Code> 
  <SAP:P1></SAP:P1> 
  <SAP:P2></SAP:P2> 
  <SAP:P3></SAP:P3> 
  <SAP:P4></SAP:P4> 
  <SAP:AdditionalText></SAP:AdditionalText> 
  <SAP:Stack></SAP:Stack> 
  <SAP:Retry>M</SAP:Retry> 
  </SAP:Error>

Trace:

<Trace level="1" type="T">Mapping-Step:1</Trace> 
  <Trace level="1" type="T">Mapping-Type:JAVA_JDK</Trace> 
  <Trace level="1" type="T">Mapping-Program:com/mapping/JavaMapping</Trace> 
  <Trace level="3" type="T">MTOM-Attachments werden in die Payload geschrieben.</Trace> 
  <Trace level="3" type="T">Dynamische Konfiguration ( <a href="http://sap.com/xi/XI/Message/30/general" TARGET="test_blank">http://sap.com/xi/XI/Message/30/general</a> senderAgreementGUID...)</Trace> 
  <Trace level="3" type="T">Ein Multi-Mapping wird durchgeführt.</Trace> 
  <Trace level="1" type="E">CL_XMS_PLSRV_MAPPING~ENTER_PLSRV</Trace> 
  </Trace>
  <Trace level="3" type="System_Error">Error exception return from pipeline processing!</Trace> 
  <Trace level="1" type="B" name="CL_XMS_MAIN-WRITE_MESSAGE_TO_PERSIST"></Trace> 
- <!--  ************************************ 
  --> 
  <Trace level="3" type="T">Persisting message Status = 014</Trace> 
  <Trace level="3" type="T">Message version 005</Trace> 
  <Trace level="3" type="T">Pipeline CENTRAL</Trace> 
  </SAP:Trace>

Even if i set a trace on the beginning of the java mapping, the trace doesn't show up.

As I said, if I change the whole thing to 1:1 everthing works fine.

Does anybody has an idea?

Thanks,

Torsten

Accepted Solutions (1)

Accepted Solutions (1)

arkesh_sharma
Active Participant
0 Kudos

Hi Torsten,

I have a simple solution to your problem. Try it if you find it feasible in your scenario:

Create a two step map. In the first step, you implement your java map, perform all the operations on the data that is required, pass the output of the first step java map to the second step graphical map and split the messages using multi-mapping.

This will give you multiple files at the target and also help you perform operations on the data whatever you want.

Thanks,

Arkesh

Former Member
0 Kudos

Hi Arkesh,

thanks for your reply. To get into to deeper details:

it is already a two step mapping. [binary file] -> java mapping -> [flatfile in xml structure] -> graphical mapping (with split) -> [xml output message].

Because the binary file is sometimes too big, the output xml flatfile can be up to 40 MB. The graphical mapping can't handle such a big message, it takes too long. If the message is smaller ~5 MB then the graphical mapping works well.

Becaus of the problem mentioned above, even the operation mapping with the java and graphical mapping doesn't work. So I had to make 2 operation mappings in a row and put the xml flatfile in the file system and read it again.

After many tests now, I can say that I haven't found a way to handle a java mapping inside a 1:n operatirons mapping (even if the java mapping is 1:1 and the graphical mapping step is 1:n)

Thanks,

Torsten

maciej_jarecki
Contributor
0 Kudos

Hi

Every mapping program will run slow when send messages around ~40 MB. In this case if it is possible i would rathed resign from using java mapping because PI have to load to times message for mapping process and this operation is high system resources consumic.

BR

Maciej

Former Member
0 Kudos

Hi,

this is why we want to split the message. The binary file contaisn some bit commpressed values, which are decompressed in the java mapping. The java mapping also makes a flat xml structure.

For a 6 MB binary file, which is a 40 MB file in the flat xml structure. The java mapping on the PI only takes 40 sec in a development environment. Because of the usage of StAX it is very fast and doesn't take much memory, althought the xml contains approx. 600000 xml elements.

But that is not the point, these problems whre allready solved, the split is the only remaining issue and has nothing to do with the size of the messages. The question is: is it possible to split a message with a java mapping (wich can be configured the PI) without getting an error which has nearly no information.

I think there is something wrong in the PI or it is not pissible, but I can't find any further information about this.

Even a "no, not possible" would be an answer, so I can try to find a workaround.

Thanks for tipps so far

Torsten

former_member214137
Participant
0 Kudos

Hi Torsten,

I have a similar situation. Did you find a solution for java splitting of files?

regards

Julian

Answers (1)

Answers (1)

maciej_jarecki
Contributor
0 Kudos