cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with Java Mapping

arkesh_sharma
Active Participant
0 Kudos

Hi Experts,

I am currently surrounded by a strange kind of problem.

My Scenario is file to JDBC in which a XML file gets picked up from the shared directory and is posted in SQL Server DB using JDBC adapter. In between, in XI, the mapping transformation takes place in which the Message Mapping (i.e.Java mapping in this case) makes some conversion from one number format to the other.

When the file first gets posted in the shared directory it gets picked up by XI and then in XI it throws an error saying that "STREAM_TRANSFORMATION_EXCEPTION; message mapping failed. Java Mapping code XYZ thrown an exception while executing the message"

I look into the code, i run the Java Code seperately, i check the XML format, i check the interface mapping in the test tab, etc. All of them are working fine. I did not find a single error in any one of it.

So, i posted the file again for the second time and this time it was successfully processed and the DB was updated. This problem occurred recently and it was not there previously. The Java code and its conversion was perfectly working and for the past few months we never faced this issue.

Kindly let me know what is the possible cause of this issue and how can i resolve it because every time it throws an exception that the Java mapping is not working fine and when i test the Java code with the same file, it executes the file without any errors / exceptions.

Thanks,

Arkesh

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

<h5>this link explains u when that exception occurs</h5>

[https://help.sap.com/javadocs/NW04/current/pi/com/sap/aii/mapping/api/StreamTransformation.html]

Answers (3)

Answers (3)

arkesh_sharma
Active Participant
0 Kudos

Problem solved !

Former Member
0 Kudos

Hi ,

Please find the below links which might help you .

http://tutorials.jenkov.com/java-exception-handling/exception-handling-templates.html

/people/stefan.grube/blog/2006/10/23/testing-and-debugging-java-mapping-in-developer-studio

Regards,

Madhu

JoelTrinidade
Active Contributor
0 Kudos

Hi Arkesh,

Totally agree with you that its a strange problem ... actually its very difficult to diagnose the problem without actually looking into your scenario . Only guesses can be made ...

I found a guide about JAVA RUNTIME EXCEPTIONS .

http://download.oracle.com/docs/cd/E13185_01/fmd/docs10gr3/pdf/JavaRuntimeExceptions.pdf

Please go through it for some leads , because what i feel is that something at runtime goes wrong which is why the mapping error gets thrown. Check against the error code on google or in the guide.

Regards

joel