Steve Dyke wrote:
To the best of my knowledge it is the correct DuplicateKeyException. Yes it is deployed. And no the println do not appear.
Then that code does not execute at all.
The only other option is that your version of the JVM is completely borked such that it does not operate within the rules of a JVM.
If that exception is being thrown from within that try block then, even if the first catch is using the wrong DuplicateKeyException
the second catch (which is a catch all Exception
catch) will catch it and print out those log lines.
That is assuming any println
calls in your code appear in your logs.
Your original code above was this:
So either the exception is ignored, which seems to be what you want, or it is picked up by the next catch block.
That code will not result in a stack trace appearing in the logs for that exception, unless it is something inside the executeUpdate
that is doing the logging, which would strike me as a little odd.
My next step would be either to debug it using the debugger, if this is easily reproducible in your test environment, or stick a load of debug statements in that area of code to track exactly what route it is taking and with what variables.