Recently, though, I ran into a problem. If the "COPY INTO" statement that I issue is wrong, for example the referenced table doesn't exist, Monet comes back with an error. The example isn't checking for this error condition and proceeds to send data anyway. With a really large batch of data, this becomes a problem because the SQL parser ends up trying to parse all that data as if it were SQL and basically chokes on it.
The solution is to add something like the following after the out.newLine() on line 86:
error = in.waitForPrompt();
if (error != null) {
throw new Exception(error);
}