You are hereBlogs / David Grant's blog / Hibernate-3.2.x/JDBC-3.1.x Does Not Work With MySQL 4.1.x

Hibernate-3.2.x/JDBC-3.1.x Does Not Work With MySQL 4.1.x


By David Grant - Posted on 12 November 2006

I just spent six hours today trying to figure out why the Hibernate example I set up and the example in the "eg" directory of the Hibernate binary distribution both did not work. The example I made was doing something really simple, filling in 3 attributes in a table. It was putting in garbage instead. The "auction" example that comes with Hibernate (in the "eg" directory) would just cack, leaving me with all sorts of confusing log messages.

Since the "auction" example worked at my work computer so I thought about what was different on that computer. I then thought that my work computer might have been using mysql-5, while my home computer is still using mysql-4.1.x. I had tried upgrading to mysql-5 a few months ago but it didn't work for some reason. I tried following the instructions for upgrading mysql on gentoo again and they worked flawlessly. I tried running the hibernate auction example by typing ant eg and it worked. Next I tried running the example I made myself and it worked as well. Finally, 6 hours later, and it looks like the solution was to upgrade to mysql-5.x.

I have no idea why mysql-5.x works but mysql-4.1.x would not. I would be surprised if my example or the auction example were making use of any new mysql 5 features. It's been a painful day, but at least it is fixed now. Now I can finally continue working to understand Hibernate.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <blockquote> <s> <img> <h2> <h3>
  • Lines and paragraphs break automatically.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>. The supported tag styles are: <foo>, [foo].
  • Insert Google Map macro.
  • Images can be added to this post.
  • You may use [inline:xx] tags to display uploaded files or images inline.
  • You may use [view:name=display=args] tags to display views.

More information about formatting options

CAPTCHA
Sorry I had to add this test to combat the spam problem.
v
4
2
4
Q
G
Enter the code without spaces and pay attention to upper/lower case.