Author Message
RajaMohammed
Joined: Mar 9, 2014
Messages: 196
Offline
Hi, I got some serious production issue. My current code is working fine. Then I just updated SessionID value into one existing table column. This table column for Session ID already exists but currently updated with null. New application will just fill that column with IVR session id.
I complied and generated code and deployed code in IBMWAS server. But it is throwing errors in random places. Mainly it showed the StackOverflowError. But it raised some other error also. Attached the log files for your reference.
This error happened randomly for customers. For example, one customer will get succeeded in few calls and failed in after 4th or 5th call.
Also It is getting succeeded in test environment and this issue is not happening since no call volume.
Please note that without this session if update, current code is working very fine without any issue. Please advice.

Tools used: OD7, WAS 8, JDK7

Thanks & Regards,
Raja Mohammed
Filename WAS_OD_ErrorLogs.rar [Disk] Download
Filename usmpp02_Apr_07_2019_17_00_00_MPP.tar.gz [Disk] Download
WilsonYu
Joined: Nov 6, 2013
Messages: 3950
Offline
This is a strange error started by OD trying to write a log statement using log4J. It looks like the IBM Java has problem with the date format. You would need to Google around or consult IBM support since this error comes from their Java stack. I have not seen it before even doing testing on IBM app servers. It may have something to do with localization in the app server environment.

[4/7/19 14:18:47:835 AST] 000000ef ServletWrappe E com.ibm.ws.webcontainer.servlet.ServletWrapper service Uncaught service() exception thrown by servlet HandleSCI-SuccessMsgDateTime: java.lang.StackOverflowError
at java.text.SimpleDateFormat.zeroPaddingNumber(SimpleDateFormat.java:1346)
at java.text.SimpleDateFormat.subFormat(SimpleDateFormat.java:1285)
at java.text.SimpleDateFormat.format(SimpleDateFormat.java:989)
at java.text.SimpleDateFormat.format(SimpleDateFormat.java:959)
at java.text.DateFormat.format(DateFormat.java:348)
at org.apache.log4j.helpers.PatternParser$DatePatternConverter.convert(PatternParser.java:444)
at org.apache.log4j.helpers.PatternConverter.format(PatternConverter.java:65)
at org.apache.log4j.PatternLayout.format(PatternLayout.java:502)
at org.apache.log4j.WriterAppender.subAppend(WriterAppender.java:302)
at org.apache.log4j.RollingFileAppender.subAppend(RollingFileAppender.java:263)
at org.apache.log4j.WriterAppender.append(WriterAppender.java:160)
at org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:251)
at org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:66)
at org.apache.log4j.Category.callAppenders(Category.java:206)
at org.apache.log4j.Category.forcedLog(Category.java:391)
at org.apache.log4j.Category.info(Category.java:666)
at com.avaya.runtimecommon.platforms.vp.tracking.TraceWriter.writeln(TraceWriter.java:49)
RajaMohammed
Joined: Mar 9, 2014
Messages: 196
Offline
No. I could not be the problem with IBMWAS or DB or other environment. Because other version of same code is working fine without any issue. As I stated before, only difference is updating session id value to database field. Even this DB session ID field is already exists with empty values. Now I am just updating this field. I doubt that any compilation problem or eclipse problem occured.
Also this date conversion is subflow and the same is worked in previous place of same code. Really It is confusing me. I could not come to any conclusion.
WilsonYu
Joined: Nov 6, 2013
Messages: 3950
Offline
The exception StackOverflow itself implies you might be in an infinite loop or it is looping too much the application is running out of stack. It just happens that it always end up in the spot when the log statement is being executed. You would need to examine your application closely to see where the loop is.
RajaMohammed
Joined: Mar 9, 2014
Messages: 196
Offline
The problem was solved. Hope there was some compilation problem. I reinstalled fresh eclipse and tomcat. Then created new EAR file and deployed. It started working fine. Thanks.
danelyoung
Joined: May 25, 2020
Messages: 1
Offline
A StackOverflowError is simply signals that there is no more memory available. It is to the stack what an OutOfMemoryError is to the heap: it simply signals that there is no more memory available. JVM has a given memory allocated for each stack of each thread, and if an attempt to call a method happens to fill this memory, JVM throws an error. Just like it would do if you were trying to write at index N of an array of length N. No memory corruption can happen. The stack can not write into the heap.

The common cause for a stackoverflow is a bad recursive call. Typically, this is caused when your recursive functions doesn't have the correct termination condition, so it ends up calling itself forever. Or when the termination condition is fine, it can be caused by requiring too many recursive calls before fulfilling it.

Here's an example:

public class Overflow {
public static final void main(String[] args) {
main(args);
}
}

That function calls itself repeatedly with no termination condition. Consequently, the stack fills up because each call has to push a return address on the stack, but the return addresses are never popped off the stack because the function never returns, it just keeps calling itself. If the stack is full you can't push, if you do you'll get stack overflow error. StackOverflowError is avoidable if recursive calls are bounded to prevent the aggregate total of incomplete in-memory calls (in bytes) from exceeding the stack size (in bytes).


Go to:   
Mobile view