> java.lang.**IllegalStateException: Failed to create EntityManagerFactory for persistence unit 'de.aeits_TapestryWeb_war_1.0-**SNAPSHOTPU'
there should be "Caused by:" part of this stacktrace -- can you share that too? > From my understanding of the docu, i only have to add the persistence class to the entities package, right? Right, but you don't even have to put your entities to the "entities" package provided that you specify your persisted classes in your persistence.xml. Which you actually did, but you also have this line in there: <exclude-unlisted-classes>**false</exclude-unlisted-**classes> which is not necessary if you specified full list of persisted classes there. I'd say more, that having this exclude-unlisted-**classes=false may increase start-up time for your application significantly. On Fri, Oct 11, 2013 at 3:41 PM, Andreas Ernst <a...@ae-online.de> wrote: > Am 11.10.13 13:20, schrieb Dmitry Gusev: > > Try removing @Inject and only keep @PersistenceContext for the >> EntityManager field ? :) >> > > Sure :) > > public class Customers { > > > @PersistenceContext(unitName = "de.aeits_TapestryWeb_war_1.0-** > SNAPSHOTPU") > private EntityManager entityManager; > > @Log > public List<Customers> getCustomers() { > return entityManager.**createNamedQuery("Customer.** > findAll").getResultList(); > } > } > > java.lang.**IllegalStateException: Failed to create EntityManagerFactory > for persistence unit 'de.aeits_TapestryWeb_war_1.0-**SNAPSHOTPU' > at org.apache.tapestry5.internal.**jpa.EntityManagerSourceImpl.** > createEntityManagerFactory(**EntityManagerSourceImpl.java:**212) > at org.apache.tapestry5.internal.**jpa.EntityManagerSourceImpl.** > getEntityManagerFactory(**EntityManagerSourceImpl.java:**185) > at org.apache.tapestry5.internal.**jpa.EntityManagerSourceImpl.** > create(**EntityManagerSourceImpl.java:**276) > at $EntityManagerSource_**132c0b3869f9a87d.create(**Unknown > Source) > > > From my understanding of the docu, i only have to add the persistence > class to the entities package, right? > > Add the dependency to the pom: > > <dependency> > <groupId>org.apache.tapestry</**groupId> > <artifactId>tapestry-jpa</**artifactId> > <version>5.3.7</version> > </dependency> > > And just create a tml and the class like above. > > > -- > ae | Andreas Ernst | IT Spektrum > Postfach 5, 65612 Beselich > Schupbacher Str. 32, 65614 Beselich, Germany > Tel: +49-6484-91002 Fax: +49-6484-91003 > a...@ae-online.de | www.ae-online.de > www.tachyon-online.de > > ------------------------------**------------------------------**--------- > To unsubscribe, e-mail: > users-unsubscribe@tapestry.**apache.org<users-unsubscr...@tapestry.apache.org> > For additional commands, e-mail: users-h...@tapestry.apache.org > > -- Dmitry Gusev AnjLab Team http://anjlab.com