Database Exceptions with Jetty 8.1.0 with BTM
It looks like the null in the parameter variable is single quoted, like 'null'. In the context of SQL query nulls are going without quotation.

This is how it should be:

=# select 1 from t where i = null;
 ?column? 
----------
(0 rows)


And this is what you have:

=# select 1 from t where i = 'null';
ERROR:  invalid input syntax for integer: "null"
LINE 2: select 1 from t where i = 'null';


So you either need to remove any quotation from the parameter variable or to use parameter binding with the database adapter. The second option is preferable.