NetBeans Platform + JPA + Derby embedded
If you want to use NetBeans Platform and JPA together, there's a great tutorial on NB's site. Unfortunatelly, it explains how to do it with an external database and using an external JAR for your entities.
If you want to have a entity module with your classes (instead of an external JAR and a library wrapper), no big deal - it works! You can follow GJ's tutorial, but you will create a module project instead and you will not have NB's wizards to help creating entity classes.
I also created a module install on my Derby wrapper, with this line:
FileUtil configRoot = FileUtil.getConfigRoot(); System.setProperty("derby.system.home", FileUtil.toFile(configRoot).getCanonicalPath());
This defines where Derby will create database files (user's dir, in this case).
BTW, if a "no suitable driver found" is thrown, you forgot to add a dependency between JPA wrapper (EclipseLink, TopLink, OpenJPA or Hibernate) and JDBC wrapper.
Pages
Categories
Archives
- July 2011
- April 2011
- October 2010
- September 2010
- August 2010
- July 2010
- May 2010
- April 2010
- March 2010
- December 2009
- November 2009
- October 2009
- September 2009
- July 2009
- June 2009
- May 2009
- March 2009
- February 2009
- January 2009
- November 2008
- October 2008
- September 2008
- August 2008
- July 2008
- June 2008
- May 2008
- April 2008
- March 2008
- February 2008
- January 2008
- March 2007
- September 2006