-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Hibernate and JDBC to MySQL data corruption
PostPosted: Tue Jan 03, 2006 1:22 am 
Newbie

Joined: Wed Jun 01, 2005 8:26 pm
Posts: 5
I have a web based application on tomcat that workes fine on Windows XP and used to work fine on Mandrake 10.1 Linux. I upgraded to Mandrivia and now the linux side does not work. I tested JDBC directly to the MySQL 4.1.12 and it works fine. When hibernate in the java web server writes to the MySQL the data gets corrupted. (only on Linux).

Mandrivia Linux, WInXP
Java 1.4.2_08 on both machines
MySQL 4.1.11-nt on windows
MySQL 4.1.12 on Linux
Connector J 3.1.7 on both machines.
hibernate 3.0-final

Any ideas why the data would get corrupted? The uid on the tables is fine. names,timestamps, etc. get corrupted?

_________________
Inside every complex program is a simple program try ing to get out.


Top
 Profile  
 
 Post subject: A workaround
PostPosted: Wed Jan 04, 2006 5:21 pm 
Newbie

Joined: Wed Jun 01, 2005 8:26 pm
Posts: 5
I found a fix. The problem is the ConnectJ and hibernate and MySQL 4.1.12 have a problem with server side prepared statements.
What you do is change the JDBC connection string to be like...
jdbc:mysql://myserver.com/thedatabse?useServerPrepStmts=false

See
http://www.spikesource.com/docs/cs_1.6. ... notes.html

_________________
Inside every complex program is a simple program try ing to get out.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.