Adding the latest EclipseLink version to a Netbeans project?

独自空忆成欢 提交于 2019-12-05 06:35:21

问题


I am developing JSF applicationi with JPA using EclipseLink as the persistence provider using Netbeans. The default version of EclipseLink is 2.0 with Netbeans 7.1, but I badly need the new addition of create-or-extend-tables for eclipselink.ddl-generation which was introduced with 2.4 http://wiki.eclipse.org/EclipseLink/DesignDocs/368365. So I want to add EclipseLink 2.4 to my existing netbeans project, but failed. I followed How do you use EclipseLink 2.3 as persistence provider in NB 7? , but there was no success.

I downloaded the EclipseLink 2.4.0 Installer Zip (28 MB) from http://www.eclipse.org/eclipselink/downloads/index.php. There were several jar files in few folders after I unzip it, but I added only the eclipselink.jar file (with out a version number, which was found in jlib folder) to the Netbeans project libraries.

I tried to add a New Library under persistence.xml also, still failed.

I manually added the code

<property name="eclipselink.ddl-generation" value="create-or-extend-tables" />

to persistence.xml file, but tables are deleted, but not created.

How can I add the latest EclipseLink version to a Netbeans project?


回答1:


This is how i got lucky

  1. Download the eclipselink 2.4
  2. In Netbeans 7 remove the previous eclipselink jars from Project > Properties : Libraries
  3. Add the new eclipselink.jar as "compile" library and eclipse-jpa-modelgen as "processor".

You will find these libraries in eclipselink/jlib and eclipselink/jlib/jpa

-- persistence.xml

value="create-or-extend-tables"



来源:https://stackoverflow.com/questions/11276576/adding-the-latest-eclipselink-version-to-a-netbeans-project

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!