Lance-

The instructions are in error. I'll update them shortly.

Instead of the "persistence-api-1.0.jar" jar, you should use the "geronimo-jpa_3.0_spec-1.0.jar". Let us know if you have any problems with that.


On Oct 5, 2007, at 7:59 AM, Lance J. Andersen wrote:

I am not sure if this is a typo in the quick start instructions, but there is a reference to openjpa-x.x.x/lib/persistence- api-1.0.jar which is not in the download of openjpa-1.0.0

What jars must i include for a standalone SE program as there are quite a few in the lib directory or can i just get away with openjpa.jar?

Regards
Lance



     Getting Started with OpenJPA in Netbeans

  1. Download the OpenJPA binary release from the downloads
     <http://openjpa.apache.org/downloads.html> page and unpack it by
     double-clicking it.
2. Launch Netbeans (this sample was tested with Netbeans 5.5, but any
     recent version should work).
  3. Select the *File* menu and select *New Project*.
  4. On the *New Project* page, select Category:*General*
     Projects:*Java Project with Existing Ant Script*, then click the
     *Next* button.
  5. Press the *Browse* button next to the *Location* field, and
     navigate to the unpacked OpenJPA directory
  6. Press the *Browse* button next to the *Build Script* field, and
     navigate to the unpacked OpenJPA directory through *examples*,
     then *hellojpa*, and select the *build.xml* file and press the
     *Open* button.
7. Type a name for the project, press *Set as Main Project* and press
     the *Next* button on the wizard.
  8. Press *Next* to accept the *Build and Run Actions*.
  9. On the *Source Package Folders* page, press *Add Folder*, select
     the *examples* folder, and press *Next*.
 10. On the *Java Sources Classpath* page, press *Add JAR/Folder* and
     select the openjpa-x.x.x/lib/persistence-api-1.0.jar which
     contains the JPA API classes which is used to compile against.
 11. Press *Finish*
 12. A new project will open, containing the OpenJPA jar and the
     examples source files.
 13. On the *Package Explorer*, expand the top-level folder, then the
     *examples* folder, then *hellojpa*.
 14. Navigate to the *build.xml* file in the *hellojpa* folder (note
     that there is also a *build.xml* file in the parent folder, which
     should not be used). Right-click the *build.xml* file, and select
     the *Run Target* sub-menu, then select *run*.
 15. The database will be initialized (using the stand-alone Derby
database, which is included with the OpenJPA distribution) and the
     *Main.java* class will be run. In the *Console*, you should see
     the text /Hello Persistence!/.
 16. Congratulations! You have run your first sample program using
     OpenJPA. Examine the *Main.java* example program, as well as the
     *Message.java* entity class, play with them by adding fields and
     working on new persistence operations. Have fun!


Reply via email to