It looks that there is a bug in Apache Common DbUtils (v. 1.5) AbstractQueryRunner
(base class of QueryBuilder
) code. It has parameter pmdKnownBroken
, which desribed as follows:
if pmdKnownBroken
is set to true, we won't even try it; if false, we'll try it, and if it breaks, we'll remember not to use it again.
But does not work as described, becausefillStatement
method does not catch an exception when calling java.sql.getParameterMetaData
.
So you should set pmdKnownBroken to true.