cancel
Showing results for 
Search instead for 
Did you mean: 

Error in Java mapping

Former Member
0 Kudos

Hi all!

I've an Scenary: Flat file -> IDoc (Java mapping)

When i run the interfce, that give me an exception, but when i run it locally, it works sucessfully.

any idea?

Thkz

Accepted Solutions (1)

Accepted Solutions (1)

VijayKonam
Active Contributor
0 Kudos

Provide us the exception. We would be able to help.

VJ

Former Member
0 Kudos

The exception is this: java.lang.ArrayIndexOutOfBoundsException

i dubbuged it and no one array is accesed whit an illegal index..

Former Member
0 Kudos

Hi Matias.

You work with File- IDOC right.

Is your target node has multiple ocurrence-unbounded?

Former Member
0 Kudos

Hi,,

The exception is this: java.lang.ArrayIndexOutOfBoundsException

This exception will occur when u are trying to access a element in an array,which is not existing.

So the best way to zero in the problem, will be....

1.Copy the payload XML from ur SXMB_MONI.

2.Call the java mapping from other class(Main function)... providing this input payload.

3.If it works fine, then ultimately the Java mapping works in PI also.

4. If u r using any RFC or JDBC Lookup's please hardcode them just for testing..... (So then u can identify if it is from mapping are any Lookups)

If prblm exist still.. pl do post.

Babu

Answers (4)

Answers (4)

Former Member
0 Kudos

Trace:

</Trace>

<Trace level="1" type="T">RuntimeException during appliction Java mapping com/converter/BankTransformation</Trace>

<Trace level="1" type="T">com.converter.CustomMappingException: Error: 16[Ljava.lang.StackTraceElement;@713a2c6116java.lang.ArrayIndexOutOfBoundsException: 16nullclass java.lang.ArrayIndexOutOfBoundsException at com.converter.ExceptionThrower.fire(ExceptionThrower.java:15) at com.converter.BankTransformation.execute(BankTransformation.java:93) at com.sap.aii.ibrun.server.mapping.JavaMapping.executeStep(JavaMapping.java:64) at com.sap.aii.ibrun.server.mapping.Mapping.execute(Mapping.java:92) at com.sap.aii.ibrun.server.mapping.MappingHandler.run(MappingHandler.java:90) at com.sap.aii.ibrun.sbeans.mapping.MappingRequestHandler.handleMappingRequest(MappingRequestHandler.java:95) at com.sap.aii.ibrun.sbeans.mapping.MappingRequestHandler.handleRequest(MappingRequestHandler.java:68) at com.sap.aii.ibrun.sbeans.mapping.MappingServiceImpl.processFunction(MappingServiceImpl.java:79) at com.sap.aii.ibrun.sbeans.mapping.MappingServiceObjectImpl0_0.processFunction(MappingServiceObjectImpl0_0.java:131) at sun.reflect.GeneratedMethodAccessor1022.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at com.sap.engine.services.ejb.session.stateless_sp5.ObjectStubProxyImpl.invoke(ObjectStubProxyImpl.java:187) at $Proxy243.processFunction(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at com.sap.engine.services.rfcengine.RFCDefaultRequestHandler.call(RFCDefaultRequestHandler.java:284) at com.sap.engine.services.rfcengine.RFCDefaultRequestHandler.handleRequest(RFCDefaultRequestHandler.java:219) at com.sap.engine.services.rfcengine.RFCJCOServer$J2EEApplicationRunnable.run(RFCJCOServer.java:254) 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:104) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:176)</Trace>

<Trace level="1" type="T">Runtime exception occurred during execution of application mapping program com/converter/BankTransformation: com.converter.CustomMappingException; Error: 16[Ljava.lang.StackTraceElement;@713a2c6116java.lang.ArrayIndexOutOfBoundsException: 16nullclass java.lang.ArrayIndexOutOfBoundsException</Trace>

<Trace level="1" type="T">com.sap.aii.ibrun.server.mapping.MappingRuntimeException: Runtime exception occurred during execution of application mapping program com/converter/BankTransformation: com.converter.CustomMappingException; Error: 16[Ljava.lang.StackTraceElement;@713a2c6116java.lang.ArrayIndexOutOfBoundsException: 16nullclass java.lang.ArrayIndexOutOfBoundsException at com.sap.aii.ibrun.server.mapping.JavaMapping.executeStep(JavaMapping.java:73) at com.sap.aii.ibrun.server.mapping.Mapping.execute(Mapping.java:92) at com.sap.aii.ibrun.server.mapping.MappingHandler.run(MappingHandler.java:90) at com.sap.aii.ibrun.sbeans.mapping.MappingRequestHandler.handleMappingRequest(MappingRequestHandler.java:95) at com.sap.aii.ibrun.sbeans.mapping.MappingRequestHandler.handleRequest(MappingRequestHandler.java:68) at com.sap.aii.ibrun.sbeans.mapping.MappingServiceImpl.processFunction(MappingServiceImpl.java:79) at com.sap.aii.ibrun.sbeans.mapping.MappingServiceObjectImpl0_0.processFunction(MappingServiceObjectImpl0_0.java:131) at sun.reflect.GeneratedMethodAccessor1022.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at com.sap.engine.services.ejb.session.stateless_sp5.ObjectStubProxyImpl.invoke(ObjectStubProxyImpl.java:187) at $Proxy243.processFunction(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at com.sap.engine.services.rfcengine.RFCDefaultRequestHandler.call(RFCDefaultRequestHandler.java:284) at com.sap.engine.services.rfcengine.RFCDefaultRequestHandler.handleRequest(RFCDefaultRequestHandler.java:219) at com.sap.engine.services.rfcengine.RFCJCOServer$J2EEApplicationRunnable.run(RFCJCOServer.java:254) 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:104) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:176) Root Cause: com.converter.CustomMappingException: Error: 16[Ljava.lang.StackTraceElement;@713a2c6116java.lang.ArrayIndexOutOfBoundsException: 16nullclass java.lang.ArrayIndexOutOfBoundsException at com.converter.ExceptionThrower.fire(ExceptionThrower.java:15) at com.converter.BankTransformation.execute(BankTransformation.java:93) at com.sap.aii.ibrun.server.mapping.JavaMapping.executeStep(JavaMapping.java:64) at com.sap.aii.ibrun.server.mapping.Mapping.execute(Mapping.java:92) at com.sap.aii.ibrun.server.mapping.MappingHandler.run(MappingHandler.java:90) at com.sap.aii.ibrun.sbeans.mapping.MappingRequestHandler.handleMappingRequest(MappingRequestHandler.java:95) at com.sap.aii.ibrun.sbeans.mapping.MappingRequestHandler.handleRequest(MappingRequestHandler.java:68) at com.sap.aii.ibrun.sbeans.mapping.MappingServiceImpl.processFunction(MappingServiceImpl.java:79) at com.sap.aii.ibrun.sbeans.mapping.MappingServiceObjectImpl0_0.processFunction(MappingServiceObjectImpl0_0.java:131) at sun.reflect.GeneratedMethodAccessor1022.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at com.sap.engine.services.ejb.session.stateless_sp5.ObjectStubProxyImpl.invoke(ObjectStubProxyImpl.java:187) at $Proxy243.processFunction(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at com.sap.engine.services.rfcengine.RFCDefaultRequestHandler.call(RFCDefaultRequestHandler.java:284) at com.sap.engine.services.rfcengine.RFCDefaultRequestHandler.handleRequest(RFCDefaultRequestHandler.java:219) at com.sap.engine.services.rfcengine.RFCJCOServer$J2EEApplicationRunnable.run(RFCJCOServer.java:254) 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:104) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:176)</Trace>

<Trace level="1" type="E">CL_XMS_PLSRV_MAPPING~ENTER_PLSRV</Trace>

</Trace>

<Trace level="1" type="B" name="CL_XMS_MAIN-WRITE_MESSAGE_LOG_TO_PERSIST" />

<Trace level="1" type="System_Error">Error exception return from pipeline processing!</Trace>

<Trace level="1" type="B" name="CL_XMS_MAIN-WRITE_MESSAGE_TO_PERSIST" />

- <!-- ************************************

-->

</SAP:Trace>

sbuttler77
Active Participant
0 Kudos

Just guessing but happened to me before have you copied your interface mapping and not changed the message mapping it refers to?

Former Member
0 Kudos

Luis: yes, i'm my idoc target node has multiple ocurrence-unbounded.

Babu: i done what you tell me, and the interface works great in dubbug mode

Christian: if i run the java mapping like Babu says, it works. But when i run it in XI it dosen't work. I'm working whit the same payload as when the error occurs in SXMB_MONI. The mapping dosen't use any runtime specific attributes.

Sven: i don't think so

Thanks all!!!

Former Member
0 Kudos

I suggest you enter some trace-info commands into your Java code at suitable places. And then compare the output of the trace values between interface test in IB and sxmb_moni trace,

Stupid question, did you activate the current versions (Interface mapping, External archive, whatever else is needed by the mapping) with which you are testing ?? Are you sure you are comparing the same thing ? sxmb_moni works on the activated versions. IB tests work on the current versions. That does not need to be the same.

CSY

Former Member
0 Kudos

You mean when you test the interface (operation) mapping in Integration Builder, it works ? You are working with the same payload as when the error occurs in SXMB_MONI ? Does the mapping use any runtime specific attributes ? Those can be different when testing in Integration Builder.

Can you post the full stack trace, not only the Exception name ?

CSY

Former Member
0 Kudos

Hi Matias

Can you give us the exception?

Thanks