Hi all,
I have a
java program which runs repeatedly by calling to main functions in a loop based on a condition ..But after running for some time(say 30 minutes),it shows the follwing error and it terminate the program execution.But as per my requirement i want to run this program for several hours or time without showing any error and terminating the program.
Exception in
thread "main" java.lang.StackOverflowError
at sun.nio.cs.StreamEncoder$CharsetSE.implWrite(Unknown Source)
at sun.nio.cs.StreamEncoder.write(Unknown Source)
at java.io.OutputStreamWriter.write(Unknown Source)
at java.io.BufferedWriter.flushBuffer(Unknown Source)
at java.io.PrintStream.write(Unknown Source)
at java.io.PrintStream.print(Unknown Source)
at java.io.PrintStream.println(Unknown Source)
at pitstop.automation1.main(automation1.java:18)
at pitstop.automation1.main(automation1.java:298)
at pitstop.automation1.main(automation1.java:298)
at pitstop.automation1.main(automation1.java:298)
at pitstop.automation1.main(automation1.java:298)
at pitstop.automation1.main(automation1.java:298)
at pitstop.automation1.main(automation1.java:298)
at pitstop.automation1.main(automation1.java:298)
at pitstop.automation1.main(automation1.java:298)
at pitstop.automation1.main(automation1.java:298)
at pitstop.automation1.main(automation1.java:298)
at pitstop.automation1.main(automation1.java:298)
Could anyone please tell me what is the exact reason for this and how to fix this error.
The code for the same program is below:
Here i am calling the main function again and again using automation1.main(args) at line no 299 and 304.
Please help me in this issue.
Thanks,
Sanat
>