Reputation: 51
The Eclipse Indigo SR1 (on windows XP) has File/new/JPA project template etc. I see
some 9 persistence .jar-s under eclipse/Plugins directory( i did download of Eclipse
and
unzipped the eclipse , then ran it) . yet project/java build path/libraries shows none
of the JPA jar files.It shows just the Jre library .
When i try to compose a JPA entity class
all the JPA annotations are unresolved .Tried Help/install new softwarefrom Eclipselink
repository.It was completed ok but did not change anything .Instead I now have double
versions plugins under eclipse/Plugins - so I uninstalled the EclipseLink .
The cure was to download Eclipselink zip file , unzip it somewhereand add some
externals jar persistance jars from there to the java build path/libraries .
But that seems not the correct solution.
Also : when I right click project name /JPA tools /generate Tables from entities . it says : "This is not supported by the generic platform" . The other way : generate entities from tables works but not good for me . Under the JPA tools I see only 3 options (also: 'make persistent'). Should'nt I see more ?
Any advice what was wrong in the install /setup process?
EclipseLink site says to do download eclipselink.zip for Eclipse EE
, unzip and set the ECLIPSLINK_HOME environment to point to it - that does nothing to
the project 'java build path/libraries'.
Anyhow that does not seem the solution if JPA is integral part of the Indigo SR1 (or
not)?
Upvotes: 2
Views: 3720
Reputation: 171
In the New JPA Project wizard you can select your JPA implementation. I'd recommend setting the platform to EclipseLink (see 2 below ) and then you can either select a user defined library in the list box (if you have any defined) or you can download a version of EclipseLink using the download icon to the right of the list box and a user library will be defined for you. You can define a user library comprised of the EclipseLink plugins from the Eclipse plugins folder but it may be better to explicitly select a specific version for your project as the version in the plugins will change with future releases of Eclipse.
When you are in the New JPA Project wizard, select one of the EclipseLink versions as your platform--this will enable DDL generation as this is delegated to the runtime. You can also set this after the project is created on the JPA section of the project properties.
Upvotes: 2