I\'m using the Apache Derby embedded database for unit testing in a Maven project. Unfortunately whenever I run the test I end up with the derby.log file in the
You can get rid of derby.log file by creating the following class
public class DerbyUtil {
public static final OutputStream DEV_NULL = new OutputStream() {
public void write(int b) {}
};
}
and setting the JVM system property derby.stream.error.field, for example, using the following JVM command-line argument:
-Dderby.stream.error.field=DerbyUtil.DEV_NULL
Credit to whom it is due.