JB's Visions (Dreams or Nightmares)
  • Where does the Internet take you?
  • How does it contribute to your daily life?
  • Has it changed your opinions on topics or issues in your local community or the world?

20061210 Sunday December 10, 2006


Using Netbeans Visual Web Pack with Hibernate

Using Netbeans Visual Web Pack with Hibernate

Many people have asked in the nbusers mailing list about how to use Hibernate with the Netbeans Visual Web Pack(VWP). I know that the existing Hibernate tutorial for Sun Java Studio Creator is in the process of being updated for use with VWP, however in the interest of time, here is a list of changes that have to be made when using the existing tutorial with VWP.

Once the new Tutorial comes out, this blog entry will be of no use, so keep an eye on the Tutorials page for the latest and greatest from the Tutorial Divas

To use this information properly, go to, and follow the existing Java Studio Creator tutorial for using Hibernate and just make the changes listed below when necessary.


-- When adding the Hibernate library to the POJO project, a dialog box pops up telling you it needs to upgrade the project because it was made in an earlier version of NetBeans. After upgrading, it will not work in older versions again.

-- derbyclient.jar file is located in <app Server install>/javadb/lib
(This is the same for both Sun App Server and Glassfish)

-- Default port number for the JavaDB used by Visual Web Pack is 1527

-- The travel database in VWP is called "travel" and not "sample". You have to change both 'port' and 'databasename' in the hibernate.cfg.xml file

-- When creating the Tutorial Application, select Java EE 1.4 as the platform type.

-- Select "connect" in the Travel database connection to start the DB

-- server.policy is located by default at: <app server install dir>\domains\domain1\config\

-- Instead of right clicking on the Projects window to add a new Property, for personOptions, to the SessionBean, right click on the Outline windows SessionBean node.

-- Instead of right clicking on the Projects window to add a new Property, for tripDataProvider, to the SessionBean, right click on the Outline windows SessionBean node.

-- F11 to build the project instead of Ctrl-Shift-B

-- If you add the Getter and Setter code, you don't have to Close and re-open the project to get the new dataprovider to appear.

-- F6 to run main project. F5 will run the project in Debug mode.

 



(2006-12-10 17:27:00.0) | Permalink | | digg this | del.icio.us | technorati | simpy


archives
links
referers