{"id":23,"date":"2005-09-05T14:55:46","date_gmt":"2005-09-05T13:55:46","guid":{"rendered":"http:\/\/www.epischel.de\/wordpress\/?p=23"},"modified":"2009-10-21T21:46:01","modified_gmt":"2009-10-21T20:46:01","slug":"hibernate-a-developers-notebook-migrating-to-hibernate-30-chapter-1","status":"publish","type":"post","link":"https:\/\/www.epischel.de\/wordpress\/2005\/09\/hibernate-a-developers-notebook-migrating-to-hibernate-30-chapter-1\/","title":{"rendered":"&#8222;Hibernate &#8211; A Developers Notebook&#8220; &#8211; migrating to Hibernate 3.0, Chapter 1"},"content":{"rendered":"<p>In this blog series I want to go through the examples in James Elliotts book <a href=\"http:\/\/www.oreilly.com\/catalog\/hibernate\/\">&#8222;Hibernate &#8211; a developers notebook&#8220;<\/a> using<br \/>\nobject\/relation mapping service <a href=\"http:\/\/www.hibernate.org\">Hibernate<\/a> 3.0 instead of Hibernate 2.x that this book was written about and noting the differences, i.e. what I had to change to get them working.<\/p>\n<p>I enjoyed reading &#8222;Hibernate &#8211; a developers notebook&#8220; by James Elliott . In order to put my hands on hibernate I want to try out the <a href=\"http:\/\/examples.oreilly.com\/hibernate\/\">examples of the book<\/a>. While it describes Hibernate 2 I want to try it out with Hibernate 3.0 . Not having used Hibernate before I&#8217;m a complete newbie and may stumble over things an experienced Hibernate-developer has no problems with.<\/p>\n<p>In the first chapter we are encouraged to download <a href=\"http:\/\/ant.apache.org\/\">Apache Ant<\/a>, Hibernate and <a href=\"http:\/\/www.hsqldb.org\/\">HSQLDB<\/a> (a free pure-Java DBMS that is used throughout the book).<\/p>\n<p>I didn&#8217;t download Ant in the first place because I already had Ant 1.5 installed. Foreshadowing part 2, it will turn out that Apache Ant 1.6 is required for the HibernateToolTask so I later installed that.<\/p>\n<p>I then downloaded HSQLDB 1.8.0.2 without problems.<\/p>\n<p>From some Java Magazin CD-ROM I used a source distribution of Hibernat 3.0.1, installed and compiled it. In order to create<br \/>\njava-files from hbm-files we need hibernate-tools.jar which we get by downloading <a href=\"http:\/\/sourceforge.net\/project\/showfiles.php?group_id=40712&#038;package_id=141977\">hibernate-tools-3.1.0.alpha5.zip<\/a> and extracting it from org.hibernate.eclipse_3.1.0.alpha5.jar that lives within that zip-file.<\/p>\n<p>Finally, I ended up with the following files in the examples lib directory:<\/p>\n<pre>\r\nant-1.6.2.jar\r\nant-antlr-1.6.2.jar\r\nant-junit-1.6.2.jar\r\nant-launcher-1.6.2.jar\r\nantlr-2.7.5H3.jar\r\nasm-attrs.jar\r\nasm.jar\r\ncglib-2.1.jar\r\ncommons-collections-2.1.1.jar\r\ncommons-logging-1.0.4.jar\r\ndom4j-1.6.jar\r\nehcache-1.1.jar\r\nhibernate-tools.jar\r\nhibernate3.jar\r\nhsqldb.jar\r\njdbc2_0-stdext.jar\r\njta.jar\r\njtidy-r8-21122004.jar\r\nlog4j-1.2.9.jar\r\nvelocity-1.4.jar\r\nvelocity-tools-generic-1.1.jar\r\nxerces-2.6.2.jar\r\nxml-apis.jar\r\n<\/pre>\n<p>I&#8217;m not sure if every single jar is required (especially the ant-xxx.jar files).<\/p>\n<div class=\"syndication-links\"><\/div>","protected":false},"excerpt":{"rendered":"<p>In this blog series I want to go through the examples in James Elliotts book &#8222;Hibernate &#8211; a developers notebook&#8220; using object\/relation mapping service Hibernate 3.0 instead of Hibernate 2.x that this book was written about and noting the differences, i.e. what I had to change to get them working. I enjoyed reading &#8222;Hibernate -&hellip;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"mf2_syndication":[],"webmentions_disabled_pings":false,"webmentions_disabled":false,"footnotes":""},"categories":[3],"tags":[23,24,120],"series":[],"class_list":["post-23","post","type-post","status-publish","format-standard","hentry","category-java","tag-bucher","tag-hibernate","tag-java","kind-"],"kind":false,"_links":{"self":[{"href":"https:\/\/www.epischel.de\/wordpress\/wp-json\/wp\/v2\/posts\/23","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.epischel.de\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.epischel.de\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.epischel.de\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.epischel.de\/wordpress\/wp-json\/wp\/v2\/comments?post=23"}],"version-history":[{"count":2,"href":"https:\/\/www.epischel.de\/wordpress\/wp-json\/wp\/v2\/posts\/23\/revisions"}],"predecessor-version":[{"id":172,"href":"https:\/\/www.epischel.de\/wordpress\/wp-json\/wp\/v2\/posts\/23\/revisions\/172"}],"wp:attachment":[{"href":"https:\/\/www.epischel.de\/wordpress\/wp-json\/wp\/v2\/media?parent=23"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.epischel.de\/wordpress\/wp-json\/wp\/v2\/categories?post=23"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.epischel.de\/wordpress\/wp-json\/wp\/v2\/tags?post=23"},{"taxonomy":"series","embeddable":true,"href":"https:\/\/www.epischel.de\/wordpress\/wp-json\/wp\/v2\/series?post=23"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}