PAULWEB18 / vaadin-appfoundation

Automatically exported from code.google.com/p/vaadin-appfoundation
0 stars 0 forks source link

No Persistence provider for EntityManager named default #2

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
I simply just followed the "Get started quickly" guide. I followed it exactly 
and 
seems to have problem with the facadefactory. I don't understand it really, 
since 
the persistence.xml is in the classpath so it shouldn't be any problems.

javax.persistence.PersistenceException: No Persistence provider for 
EntityManager 
named default

I have tried to change the name to something else then default, but it just 
seems 
that there is a problem to get the persistence.xml file or something :(

I can't really give more info since I just followed the guide completely. What 
could it be?

Original issue reported on code.google.com by hjall...@gmail.com on 29 Apr 2010 at 7:56

GoogleCodeExporter commented 8 years ago
Just to make sure, the configuration file is located at 
src/META-INF/persistence.xml
and NOT for example in WebContent/META-INF/persistence.xml? It's the META-INF 
folder
which needs to be in the classpath, not the persistence.xml file directly. 
Another
reason could be that you don't have all the necessary jar files in WEB-INF/lib. 
You
can take a look at the jar files I have in the example application
http://code.google.com/p/vaadin-appfoundation/source/browse/?repo=example#hg/Web
Content/WEB-INF/lib

The files related to the persistence module are: eclipselink.jar,
javax.persistence_1.0.0.jar, javax.persistence_2.0_preview.jar and hsqldb.jar 
but its
just the database driver.

Original comment by kimp...@gmail.com on 30 Apr 2010 at 4:20

GoogleCodeExporter commented 8 years ago
Yeah, I have the persistence.xml in src/META-INF/persistence.xml. I do also 
have all 
the files you mention (here is all libs actually): 

appfoundation.jar
eclipselink.jar
eclipselink-jpa-modelgen_2.0.2.v20100323-r6872.jar
hsqldb.jar
javax.persistence_1.0.0.jar
javax.persistence_2.0.0.v201002051058.jar
vaadin-6.2.7.jar
xom-1.2.5.jar

Do you have any other idea of what it could be?:| 

Original comment by hjall...@gmail.com on 30 Apr 2010 at 9:28

GoogleCodeExporter commented 8 years ago
Somehow I did exactly the same thing again (without modelgen) and manually 
added 
pretty much everything to buildpath. Now it works! :) Thanks!

Original comment by hjall...@gmail.com on 13 May 2010 at 9:44

GoogleCodeExporter commented 8 years ago

Original comment by kimp...@gmail.com on 2 Jun 2010 at 4:19