[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Re: ERROR: invalid byte sequence for encoding
santtuh
do-not-reply at jboss.com
Mon Dec 11 09:59:27 EST 2006
anonymous wrote : 19:39:06,208 ERROR [JDBCExceptionReporter] ERROR: invalid byte sequence for encoding "UTF8": 0x00
It's a bug in postgresql <-> hibernate interaction.
'name' is a string that contains the '\0' (NUL) character. Hibernate passes it on to postgresql without conversion. Postgresql thinks it is invalid and spits an error.
Quick fix is to do
name = name.replace('\0', ' ');
or something on top of the function.
The real fix would be to teach postgresql about NUL characters, or alternatively convert them in hibernate.
Hope this helps.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3992779#3992779
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3992779
More information about the jboss-user
mailing list