Converting a Java project to a JPA project

Use this procedure to convert an existing Java project to a JPA project.

  1. From the Navigator or Project explorer, right-click the Java project and then select Configure > Convert to JPA Project. The Project Facets page of the Modify Faceted Project wizard appears.

    Modify Faceted Project Page


  2. Change the Configuration to Default JPA Configuration.

  3. Click Next. The Java source page appears (see Figure: The Java Source Page).

  4. Click Add Folder to add existing Java source files to the project and click Next. The JPA Facet page appears.

    JPA Facet Page


  5. Complete the fields on the JPA Facet page to specify your vender-specific platform, JPA implementation library, and database connection.

    Click Manage libraries to create or update your JPA user libraries. Click Download libraries to obtain additional JPA implementation libraries.

    If Dali derives the incorrect schema, select Override the Default Schema for Connection. Using this option, you can select a development time schema for defaults and validation.

    If you clear the Create mapping file (orm.xml) option (which is selected by default), you can later add a mapping file to the project using the Create ORM Mapping File wizard.

  6. Click Finish.

The Dali OR Mapping Tool adds the JPA implementation libraries to your project and creates the necessary orm.xml and perisistence.xml files.

Related reference

Related tasks

Related concepts