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.


Posted by Marcel Schepers on May 27, 2006 at 10:51 AM CEST #
Posted by Lukas on May 28, 2006 at 05:29 PM CEST #
Posted by Carlos on May 30, 2006 at 02:42 AM CEST #
Posted by Patrik on May 30, 2006 at 10:09 PM CEST #
Posted by PetrB on May 31, 2006 at 10:38 AM CEST #
Posted by PetrB on May 31, 2006 at 10:39 AM CEST #
Posted by Richard Huang on May 31, 2006 at 09:27 PM CEST #
I get the below exception when browsing the auto created jsf pages. The first page view is allways ok. It is on the second (different page) view that the exception is thrown.
Petr, if you need more info, you can reach me at patrik{dot}buckau{at}buckadero{dot}se.
Cheers,
Patrik
javax.persistence.PersistenceException: org.hibernate.cache.CacheException: Attempt to restart an already started EhCacheProvider. Use sessionFactory.close() between repeated calls to buildSessionFactory. Consider using net.sf.ehcache.hibernate.SingletonEhCacheProvider. Error from ehcache was: Cannot parseConfiguration CacheManager. Attempt to create a new instance of CacheManager using the diskStorePath "C:\Documents and Settings\demo\.netbeans\5.5beta\apache-tomcat-5.5.16_base\temp" which is already used by an existing CacheManager. The source of the configuration was classpath.
Posted by Patrik on May 31, 2006 at 09:43 PM CEST #
Posted by PetrB on May 31, 2006 at 11:02 PM CEST #
Posted by PetrB on May 31, 2006 at 11:17 PM CEST #
Posted by PetrB on June 01, 2006 at 10:03 AM CEST #