Note that there are some explanatory texts on larger screens.

plurals
  1. POEclipse does not recognize content of persistence.xml
    text
    copied!<p>Im getting the following error in eclipse:</p> <p>The persistence.xml file does not have recognized content.</p> <p>My persistence.xml file works great in my application but eclipse keeps giving me this error. I got this after moving the file and updating my project configuration with m2eclipse. I did not change the file itself. Anyone knows how to solve this?</p> <p>persistence.xml:</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"&gt; &lt;persistence-unit name="localDB" transaction-type="RESOURCE_LOCAL"&gt; &lt;provider&gt;org.apache.openjpa.persistence.PersistenceProviderImpl&lt;/provider&gt; &lt;class&gt;package.Users&lt;/class&gt; &lt;properties&gt; &lt;!-- enable warnings for debugging --&gt; &lt;property name="openjpa.Log" value="DefaultLevel=TRACE, Runtime=INFO, Tool=INFO, SQL=TRACE"/&gt; &lt;!-- connection properties --&gt; &lt;property name="openjpa.ConnectionURL" value="jdbc:mysql://localhost/test"/&gt; &lt;property name="openjpa.ConnectionDriverName" value="com.mysql.jdbc.Driver"/&gt; &lt;property name="openjpa.ConnectionUserName" value="root"/&gt; &lt;property name="openjpa.ConnectionPassword" value=""/&gt; &lt;/properties&gt; &lt;/persistence-unit&gt; &lt;/persistence&gt; </code></pre> <p><strong>Update</strong></p> <p>Looks like a bug in m2eclipse in combination with jpa.</p> <p><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=251323" rel="noreferrer">https://bugs.eclipse.org/bugs/show_bug.cgi?id=251323</a></p> <p>Temporarily solved by setting the option to show it as a warning instead of an error </p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload