-
1. Re: Problem with Postgresql boolen type with Jboss
petertje Apr 8, 2005 6:41 AM (in response to ramarao_1234)You're probably using postgres 8.0, aren't you?
The default PostgreSQL mapping in the standardjbosscmp-jdbc.xml does not apply for postgres 8.0
Change the following fragment in the type-mapping for PostgreSQL
<java-type>java.lang.Boolean</java-type>
<jdbc-type>CHAR</jdbc-type>
<sql-type>BOOLEAN</sql-type>
into
<java-type>java.lang.Boolean</java-type>
<jdbc-type>BOOLEAN</jdbc-type>
<sql-type>BOOLEAN</sql-type>
Cheers,
Peter -
2. Re: Problem with Postgresql boolen type with Jboss
crmwind Jun 2, 2005 9:09 PM (in response to ramarao_1234)I had the same error as Ramarao (also using Postgres 8.0). I tried the suggestion by Peter, but still the same message (which I repeat below without typos)
java.sql.SQLException: ERROR: column "xyz" is of type boolean but expression is of type character
After experimenting, I got it to work by changing the type of my boolean fields in the ddl to varchar (probably can be char(5)).
I hope someone else can clarify this or come up with a better solution. -
3. Re: Problem with Postgresql boolen type with Jboss
jsoltero Aug 29, 2005 10:04 PM (in response to ramarao_1234)This post is pretty old, but in case someone else runs into this...
append
?protocolVersion=2
to your jdbc connect string defined in your datasource. this is problem springs from the new 8.0.x JDBC driver, it didnt happen to us with the 7.4 JDBC driver