-->
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.  [ 2 posts ] 
Author Message
 Post subject: EJB3: persistence.xml seems to "get lost" in eclip
PostPosted: Sun Sep 18, 2005 10:53 am 
Beginner
Beginner

Joined: Thu Sep 01, 2005 10:09 am
Posts: 39
I'm getting started with EJB3. I have a little demo that starts up fine when run as an Standalone J2SE App. When I try to start up the same when running as an eclipse plugin I get the Exception shown below. I assume that the META-INF/persistence.xml file isn't found at all. I tried jaring the META-INF and putting it an the classpath, I also tried to put the META.INF right alog with the plugin binaries. Any Ideas ? Where can I find the javax.persistence sources so I con inspect it better ? I guess its a eclipse classloader problem. Any help/hint would be very appreciated. Plain Hibernate works fine inside an eclipse plugin for me. I did that before.

Thomas
Hibernate version:
3.1beta3
Entity Manager beta 2

Mapping documents:
persistence xml
<?xml version="1.0" encoding="UTF-8"?>
<entity-manager>
<name>paris</name>
<class>eiswind.paris.domain.Category</class>
<properties>
<property name ="hibernate.connection.url" value="jdbc:postgresql:paris"/>
<property name ="hibernate.dialect" value="org.hibernate.dialect.PostgreSQLDialect"/>
<property name ="hibernate.connection.driver_class" value="org.postgresql.Driver"/>
<property name ="hibernate.connection.username" value="thomas"/>
<property name ="hibernate.connection.password" value=""/>
</properties>
</entity-manager>

Full stack trace of any exception that occurs:
javax.persistence.PersistenceException: No Persistence provider for EntityManager named paris
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:41)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:27)
at eiswind.paris.application.Application.run(Application.java:25)
at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:226)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:376)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:163)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:334)
at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
at org.eclipse.core.launcher.Main.run(Main.java:973)
at org.eclipse.core.launcher.Main.main(Main.java:948)
Name and version of the database you are using:
PostgreSQL 7.3


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 19, 2005 5:20 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Persistence class is available in CVS HibernateExt/ejb-api

_________________
Emmanuel


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

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.