These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Emil, javax.persistence.PersistenceException
PostPosted: Fri Jun 29, 2007 11:22 am 
Beginner
Beginner

Joined: Fri Jun 29, 2007 11:12 am
Posts: 25
Hello, I am on page 76 of Java Persistence with Hibernate
and I got this exception when trying to run

Hello World app. :

Exception in thread "main" javax.persistence.PersistenceException: No Persistence provider for EntityManager named helloworld
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:55)
at hello.HelloWorld.main(HelloWorld.java:16)


I have placed my persistence.xml in etc/META-INF

here is the content of a file

<persistence 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/ ... ce_1_0.xsd"
version="1.0">

<persistence-unit name="helloworld">
<properties>
<property name="hibernate.ejb.cfgfile"
value="hibernate.cfg.xml"/>
</properties>
</persistence-unit>

</persistence>


and when i specify a programmatic configuration, i get the same exception anyway ...


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.