I have a tricky issue with the Oracle JDBC driver\'s handling of CHAR data types. Let\'s take this simple table:
CHAR
the other way is modify your sql as
select * from x where NVL(TRIM(c),' ') = NVL(TRIM('a'),' ')