Eclipse - How to fix error "No persistence.xml file found in project" JPA issue

Error "No persistence.xml file found in project" in Eclipse.

Aim: Create a new project GWT+App engine+Maven

Steps to create this:

  1. Google eclipse plugin: select "New Web Application Project".
  2. set the name etc.
  3. right-click on the project > Configure > Convert to Maven...
  4. Fix jdoconfig.xml file: xsi has the wrong value. see Validating jdoconfig with incorrect url

Then I get the above error.

The file exists at scr/META-INF/persistence.xml and also war/WEB-INF/classes/META-INF/persistence.xml But is not being found.

Notes: I installed plugins m2e, m2e-wtp and google eclipse plugin

Answers


If you are using eclipse. Try right clicking the Project File -> Build Path -> Configure Build Path

Step 1: Add the folder META-INF to the build path

Step 2: Right click the Project File -> Maven -> Update Project


Need Your Help

HTML - prevent auto-fill or auto-completion of fields (FF, IE, IPad)

html ipad security internet-explorer firefox

in Firefox-preferences you can select if passwords should be stored and if fields should be auto-filled. If I visit the site of my bank I wondered how it is handled that I won't be asked if I want to

Array Looping Structure

c++ arrays loops

I have been trying to loop a series of answers that match in two arrays. The code runs through the loop each time and outputs the first 20 questions, but won't go on to the next set to check those