Teach you how to solve problems that cannot create a JPA project.

Source: Internet
Author: User

Teach you how to solve problems that cannot create a JPA project.

Original podcast. If you need to reprint it, please indicate the source. Address: http://www.cnblogs.com/crawl/p/7703803.html

Certificate ----------------------------------------------------------------------------------------------------------------------------------------------------------

A large number of code examples are provided in the notes. It should be noted that most of the code examples are the code I typed and tested. If you have any shortcomings, please correct me ~

If you have any questions or need to share the data tools in this series, please contact qingqing_crawl@163.com

Certificate -----------------------------------------------------------------------------------------------------------------------------------------------------------

When creating a JPA project, you may encounter the following problems: the error message requires at least one user library. How can this problem be solved? Continue to look down.

 

1. Download the export selink 2.5.2 Installer Zip (38 MB) resource from the https://www.eclipse.org/eclipselink/downloads/, download and unzip it to a directory, and LZ unzip it to the E: \ OpenSource_New \ export selink directory.

2. Create a dynamic WEB Project, right-click the Project, select properties, click "Project Facets" in the column on the left, andSelectedSelect the JPA version 2.0 option.

3. Click the "Further configuration required..." link below to open a new dialog box for configuring JPA Facet.

4. select EclipseLink 2.4.x/2.5.x as platform and click "Manager Libraries" (a button) on the right. A dialog box is displayed. In the New dialog box, click "New ", then, a dialog box is displayed, asking us to enter the library name, "Export selink 2.5.2", and click OK.

5. Click "Add External JARs..." to Add eclipselink. jar. the LZ is located under the E: \ OpenSource_New \ eclipselink \ jlib folder.

6. Add the two jar packages of javax. persistence. * In the E: \ OpenSource_New \ export selink \ jlib \ jpa folder, And click Apply And Colse.

7. Select the generated library And click the OK button at the lower end to close the Apply And Colse dialog box for adding the library. To solve this problem, you can delete the created dynamic WEB project.

8. Create a JPA project for testing.

Bytes ---------------------------------------------------------------------------------------------------------------------------

Related podcast connection:

JPA + SpringData can be used to operate databases in this simple way-learn more about JPA-1

JPA + SpringData can be used to operate databases in this simple way-learn more about JPA-2

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.