Note that there are some explanatory texts on larger screens.

plurals
  1. POafter assembling jar - No Persistence provider for EntityManager named
    primarykey
    data
    text
    <p>im developing a standalone application and it works fine when starting it from my ide(intellij idea), but after creating an uberjar and start the application from it javax.persistence.spi.PersistenceProvider is thrown saying "No Persistence provider for EntityManager named testPU"</p> <p>here is my persistence.xml which is placed under meta-inf directory:</p> <blockquote> <pre><code> &lt;persistence-unit name="testPU" transaction-type="RESOURCE_LOCAL"&gt; &lt;provider&gt;org.hibernate.ejb.HibernatePersistence&lt;/provider&gt; &lt;class&gt;test.model.Configuration&lt;/class&gt; &lt;properties&gt; &lt;property name="hibernate.connection.username" value="root"/&gt; &lt;property name="hibernate.connection.driver_class" value="com.mysql.jdbc.Driver"/&gt; &lt;property name="hibernate.connection.password" value="root"/&gt; &lt;property name="hibernate.connection.url" value="jdbc:mysql://localhost:3306/test"/&gt; &lt;property name="hibernate.show_sql" value="true"/&gt; &lt;property name="hibernate.dialect" value="org.hibernate.dialect.MySQLInnoDBDialect"/&gt; &lt;property name="hibernate.c3p0.timeout" value="300"/&gt; &lt;property name="hibernate.hbm2ddl.auto" value="update"/&gt; &lt;/properties&gt; &lt;/persistence-unit&gt; </code></pre> <p></p> </blockquote> <p>and here is how im creating the entity manager factory:</p> <blockquote> <p>emf = Persistence.createEntityManagerFactory("testPU");</p> </blockquote> <p>im using maven and tried the assembly plug-in with the default configuration fot it, i dont have much experience with assembling jars and i dont know if im missing something, so if u have any ideas ill be glad to hear them</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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