Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Bit -boolean mismatch in postgresql jdbc 9.0-801 driver?

 
Vic Hood
Ranch Hand
Posts: 477
Eclipse IDE Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Folks,
I've been using PostGresql for my database . And had been using postgresql 7.4.1jdbc3.jar up until last week , I recently upgraded to jdbc 9.0-801jdbc4.jar and began having problems with the bit fields in my database .
Earlier the following code used to work seamlessly.

where getActive and getEdit are functions that return boolean type.The columns isactive and isedit are of type bit in the DB side.The values of 0 and 1 are inserted into the database when true and false are passed to them respectively.
But upon trying the new jdbc jar . I faced the following exception
--
org.postgresql.util.PSQLException: ERROR: column "isactive" is of type bit but expression is of type boolean
Hint: You will need to rewrite or cast the expression....

I did read up a little on the issue ,but havent found any concrete suggestions . Is changing the datatype of the coloumn to boolean the only option??
Thanks in advance.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic