Question

My application has started to non-deterministically fail after upgrading to Java 8. It doesn't throw an exception or print an error message. The only sign of its failure is the exit code -559038737. Has anyone encountered this?

Was it helpful?

Solution

That exit code probably comes from Apache Commons Exec:

public interface Executor {

/** Invalid exit code. */
int INVALID_EXITVALUE = 0xdeadbeef;
...

There are some changes in Java 8 that might have introduced a bug.

But without knowing your classpath and code, this is just an educated guess.

Maybe you are using the asynchronous way to use Commons Exec:

DefaultExecuteResultHandler resultHandler = new DefaultExecuteResultHandler();

Executor executor = new DefaultExecutor();
executor.execute(cmdLine, resultHandler);

int exitValue = resultHandler.waitFor();

return exitValue;

So the exception is only captured in the resultHandler, but not print on stderr automatically?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top