Hello,
I know this isn't exactly a shell script question but I'm not sure where else to post it.
I am running a java program out of a shell script. There are times when I get an error like,
"java.lang.ArrayIndexOutOfBoundsException: 22
at blah, blah
at blah, blah
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:724)"
java.util.concurrent.ExecutionException: java.lang.ArrayIndexOutOfBoundsException: 22
at blah, blah
at blah, blah
Caused by: java.lang.ArrayIndexOutOfBoundsException: 22
at blah, blah
at blah, blah
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:724)
The error above isn't import in and of itself. I have a work around when this happens but I would like to get rid of the error printing to the shell.
I am calling the program with,
java_app --log-level off -o output_file input_file ... other_options ... 2> /dev/null
I thought that the 2> /dev/null
would dump the error printout, but I am still getting it. The --log-level off
was an attempt to limit output from the program but the error messages look like they are from the jre and not the application.
Any suggestions on how to clean this up?
---------- Post updated 04-27-17 at 01:02 PM ---------- Previous update was 04-26-17 at 11:12 PM ----------
This actually does work,
java_app --log-level off -o output_file input_file ... other_options ... 2> /dev/null
which, really, it has to. For some reason it wasn't working and now it is???
I was thinking it wasn't working because the errors were from the jre and not the application, but at any rate, the error output is gone now.
LMHmedchem