cancel
Showing results for 
Search instead for 
Did you mean: 

java.lang.StackOverflowError in SAP PO

Former Member
0 Kudos

Hello Guys,

We are receiving failed messages in SAP PO single stack.

Following are the error details.

Mapping "xyz_mapping" failed to execute: javax.ejb.EJBException: nested exception is: java.lang.RuntimeException: java.lang.StackOverflowError, RuntimeException: java.lang.StackOverflowError, java.lang.StackOverflowError


Transmitting the message to endpoint <local> using connection IDoc_AAE_http://sap.com/xi/XI/System failed, due to: com.sap.aii.af.service.mapping.MappingException: Unexpected exception caught while executing mapping: javax.ejb.EJBException: nested exception is: java.lang.RuntimeException: java.lang.StackOverflowError


Scenario - Message flows from ECC to SFDC through PO for updating order details

Analysis done from our side:

--> We found that order which are failed contains very long text at header level due to which source payload contains very big size and message failed.

--> But after doing further analysis we found that multiple idoc triggered for the same order and some idocs reached successfully to receiver side & some are still in the system error,

--> while executing input payload directly in ESR mapping, same stackoverflow error occurred in production system, but we are not facing this issue in development & quality system

--> one more point for your reference, currently our system upgraded to Support pack 16.

Kindly provide your valuable inputs.

Thanks & Regards,

Riya


Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Look for related errors in the NWA Logs around the same time as your mapping failure. This may give you more clues.

Also, as Raghuraman said, maybe the Java heap size is different (or utilized different) between your production and test instances. For example maybe in the Instance Profile you will find: jstart/stackSize = [something]

Former Member
0 Kudos

Hello All,

I have checked NWA logs also and it gives me the same error that indicates "StackoverflowError"

Failed to transmit message Message_ID(OUTBOUND). Reason: com.sap.aii.af.service.mapping.MappingException: Unexpected exception caught while executing mapping: javax.ejb.EJBException: nested exception is: java.lang.RuntimeException: java.lang.StackOverflowErr

Basis team has also checked java heap size as mentioned in sap note 558250, everything seems fine from their end.

Could you please provide some more details..

former_member186851
Active Contributor
0 Kudos

Hello Riya,

Did you check the content of the message? Is everything fine in that?

Former Member
0 Kudos

Please refer above snapshots for your reference.

Former Member
0 Kudos

Yes Raghuraman,

Content of message is right, but it contains very long text at header level because of which payload size gets increased.

But i don't think that matters because sometimes it gets executed successfully.

former_member186851
Active Contributor
0 Kudos

Hello Riya,

I guess maybe something wrong in the payload of the messages which is failing(invalid data/huge size)

Or might me memory issues(maybe production memory/heap size is less)

Former Member
0 Kudos

Hello Raghuraman,

We have never face this issue before SP upgrade and all the parameters values are also same.

Former Member
0 Kudos

Your second screen shot shows an issue with function UseOneAsMany. Please share the relevant details of your mapping and the test payload.

Please confirm with the same test payload; does it ALWAYS fail when you debug it on your production platform (message mapping test), and does the exact same payload succeed on your PI test platform?

This will help you narrow down if you can make a change to your mapping to solve or if the solution will be in parameters of the prod server vs test server.

former_member186851
Active Contributor
0 Kudos

Hello Riya,

Tell your basis team to increase the Java Heap Size(java memory allocation) in PI.

And also increase the heap size in your system(in control panel) and download ESR save the file and increase the heap size by opening the file in notepad.

pvishnuvardan_reddy
Active Contributor
0 Kudos

Hi Riya,

Also please check the sap note 558250  and see if it helps you.

pvishnuvardan_reddy
Active Contributor
0 Kudos

Hi Riya,

Did you check with your basis team whether there is any OOM(out of memory issue) occurring in PO system.

Also, are you facing this issue for any particular interface message flow or for all?

Please let us know your PI version you are working on.

Former Member
0 Kudos

Hello Vishu,

We are not facing this issue evertime.. that indicates there is no out of memory issue from my point of view -- i m not sure

And yes i faced this issue for particular interface only.

Please find below version details.

Java version:    1.6.0_22

Java vendor:    Sun Microsystems Inc.

Version

Service Pack:   16

Release:            NW731EXT_16_REL

Please let me know your inputs that would be very helpful.

Thanks & Regards,

Riya