Weblog

All | Personal | Sun
« Previous day (May 25, 2006) | Main | Next day (May 26, 2006) »
20060526 Friday May 26, 2006

Hibernate EntityManager library for Netbeans 5.5 Today, I wanted to use Hibernate EntityManager in one project. I downloaded Hibernate EntityManager from official pages. Then unziped the file and just used all jars in my project. However, I got NoClassDefFoundError when executed my project. I asked on Hibernate forum and got very quick response that Hibernate core is required for using Hibernate EntityManager. Thanks steckemetz for you hint.
Many jars are needed for running Hibernate on your project and it's not simple to find out all jars on Hibernate pages. Therefore, I decided to create Hibernate EntityManager library for NetBeans 5.5 that includes all required jars and JavaDoc as well. You can download NetBeans nbm here.
Install this nbm in NetBeans 5.5 and you can see new library in Tools - Library Manager. Now, let's use it. It's really simple. If you want to develop application that uses Hibernate as O/R framework you can follow same steps as for TopLink that is bundled with NetBeans by default. Create new application, you can choose J2SE project, web or EJb project and then create new persistence unit. In this wizard choose Hibernate as Persistence Library and generate persistence.xml.

You can see in file that correct Hibernate options and provider are used in this file. Next, you can use Hibernate provider in your code. This module provides code completion for Hibernate as weel, see screenshot:
Posted by pblaha ( May 26 2006, 06:08:20 PM CEST ) Permalink Comments [11]

Calendar

RSS Feeds

Search

Links

Navigation

Referers

Older blog entries