Note that there are some explanatory texts on larger screens.

plurals
  1. POWith derby/jpa/tomcat, the database is always already booted
    text
    copied!<p>I'm trying to use jpa with tomcat, with Derby. But I get this message : <em>Caused by: ERROR XSDB6: Another instance of Derby may have already booted the database</em>.</p> <p>My persistence.xml is something like that :</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;persistence version="2.1" xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd"&gt; &lt;persistence-unit name="contribs" transaction-type="RESOURCE_LOCAL"&gt; &lt;provider&gt;org.eclipse.persistence.jpa.PersistenceProvider&lt;/provider&gt; &lt;exclude-unlisted-classes&gt;false&lt;/exclude-unlisted-classes&gt; &lt;properties&gt; &lt;property name="javax.persistence.jdbc.url" value="jdbc:derby:~/contribs;create=true"/&gt; &lt;property name="javax.persistence.jdbc.password" value="sa"/&gt; &lt;property name="javax.persistence.jdbc.driver" value="org.apache.derby.jdbc.EmbeddedDriver"/&gt; &lt;property name="javax.persistence.jdbc.user" value="sa"/&gt; &lt;property name="eclipselink.ddl-generation" value="create-tables"/&gt; &lt;/properties&gt; &lt;/persistence-unit&gt; &lt;/persistence&gt; </code></pre> <p>I use a <em>ServletContextListener</em>, annotated with <em>@WebListener()</em>. </p> <p>On <em>contextInitialized</em> I get a <em>EntityManagerFactory</em> and an <em>EntityManager</em>, and I close all on <em>contextDestroyed</em>.</p> <p>I see with log tomcat call twice my ServletContextListener (I don't understand why), and the second time I get the error message.</p> <p>Also I use Netbeans.</p> <p>How can I resolve that ? Thanks.</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