Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Hibernate javax.persistence.Persistence in RCP
Hibernate javax.persistence.Persistence in RCP [message #460540] Thu, 21 December 2006 14:47 Go to next message
Eclipse UserFriend
Hi,

I'm having issues getting Hibernate to work with the Persistence-API.
The problem is not classloading because all JARs needed by hibernate are
part of the application.

The problem is that when trying to run the application it seems as if
Hibernate doesn't find the persistance.xml-File located in
META-INF/persistence.xml. Does anybody ever got this work in RCP. I
searched the web but most problems seem to be related to class-loading.

--------------8<--------------
> 20:36:49,593 INFO Environment:584 - using JDK 1.4 java.sql.Timestamp handling
> javax.persistence.PersistenceException: No Persistence provider for EntityManager named hello
> at javax.persistence.Persistence.createEntityManagerFactory(Per sistence.java:55)
> at javax.persistence.Persistence.createEntityManagerFactory(Per sistence.java:33)
> at at.bestsolution.dataforms.test.data.DatasourceDispatcher.<init >(DatasourceDispatcher.java:35)
--------------8<--------------

Tom
Re: Hibernate javax.persistence.Persistence in RCP [message #460548 is a reply to message #460540] Thu, 21 December 2006 15:35 Go to previous messageGo to next message
Eclipse UserFriend
Hi Tom,

I had a similar problem with JBsss and Hibernate.
The solution was to create an EntityManagerFactory as well as an
EntityManager.

Charlie


Tom Schindl wrote:
> Hi,
>
> I'm having issues getting Hibernate to work with the Persistence-API.
> The problem is not classloading because all JARs needed by hibernate are
> part of the application.
>
> The problem is that when trying to run the application it seems as if
> Hibernate doesn't find the persistance.xml-File located in
> META-INF/persistence.xml. Does anybody ever got this work in RCP. I
> searched the web but most problems seem to be related to class-loading.
>
> --------------8<--------------
>
>> 20:36:49,593 INFO Environment:584 - using JDK 1.4 java.sql.Timestamp
>> handling
>> javax.persistence.PersistenceException: No Persistence provider for
>> EntityManager named hello
>> at
>> javax.persistence.Persistence.createEntityManagerFactory(Per sistence.java:55)
>>
>> at
>> javax.persistence.Persistence.createEntityManagerFactory(Per sistence.java:33)
>>
>> at
>> at.bestsolution.dataforms.test.data.DatasourceDispatcher.<init >(DatasourceDispatcher.java:35)
>>
>
> --------------8<--------------
>
> Tom
Re: Hibernate javax.persistence.Persistence in RCP [message #460556 is a reply to message #460548] Thu, 21 December 2006 16:56 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

found it out myself. The problem was that I missed the
hibernate-enitymanager.jar!

Tom

Charle Kelly schrieb:
> Hi Tom,
>
> I had a similar problem with JBsss and Hibernate.
> The solution was to create an EntityManagerFactory as well as an
> EntityManager.
>
> Charlie
>
>
> Tom Schindl wrote:
>> Hi,
>>
>> I'm having issues getting Hibernate to work with the Persistence-API.
>> The problem is not classloading because all JARs needed by hibernate
>> are part of the application.
>>
>> The problem is that when trying to run the application it seems as if
>> Hibernate doesn't find the persistance.xml-File located in
>> META-INF/persistence.xml. Does anybody ever got this work in RCP. I
>> searched the web but most problems seem to be related to class-loading.
>>
>> --------------8<--------------
>>
>>> 20:36:49,593 INFO Environment:584 - using JDK 1.4 java.sql.Timestamp
>>> handling
>>> javax.persistence.PersistenceException: No Persistence provider for
>>> EntityManager named hello
>>> at
>>> javax.persistence.Persistence.createEntityManagerFactory(Per sistence.java:55)
>>>
>>> at
>>> javax.persistence.Persistence.createEntityManagerFactory(Per sistence.java:33)
>>>
>>> at
>>> at.bestsolution.dataforms.test.data.DatasourceDispatcher.<init >(DatasourceDispatcher.java:35)
>>>
>>
>> --------------8<--------------
>>
>> Tom
Re: Hibernate javax.persistence.Persistence in RCP [message #463854 is a reply to message #460548] Fri, 16 February 2007 17:34 Go to previous message
Eclipse UserFriend
I have the same issue when using Toplink in my Java SE eclipse RCP
applications.

I do have the following code where I create the EntityManagerFactory in
addition to the EntityManager.

emf = Persistence.createEntityManagerFactory("mydb");
em = emf.createEntityManager();

I'd appreciate any help with this.

Thanks
-sud

Charle Kelly wrote:
> Hi Tom,
>
> I had a similar problem with JBsss and Hibernate.
> The solution was to create an EntityManagerFactory as well as an
> EntityManager.
>
> Charlie
>
>
> Tom Schindl wrote:
>> Hi,
>>
>> I'm having issues getting Hibernate to work with the Persistence-API.
>> The problem is not classloading because all JARs needed by hibernate
>> are part of the application.
>>
>> The problem is that when trying to run the application it seems as if
>> Hibernate doesn't find the persistance.xml-File located in
>> META-INF/persistence.xml. Does anybody ever got this work in RCP. I
>> searched the web but most problems seem to be related to class-loading.
>>
>> --------------8<--------------
>>
>>> 20:36:49,593 INFO Environment:584 - using JDK 1.4 java.sql.Timestamp
>>> handling
>>> javax.persistence.PersistenceException: No Persistence provider for
>>> EntityManager named hello
>>> at
>>> javax.persistence.Persistence.createEntityManagerFactory(Per sistence.java:55)
>>>
>>> at
>>> javax.persistence.Persistence.createEntityManagerFactory(Per sistence.java:33)
>>>
>>> at
>>> at.bestsolution.dataforms.test.data.DatasourceDispatcher.<init >(DatasourceDispatcher.java:35)
>>>
>>
>> --------------8<--------------
>>
>> Tom
Previous Topic:3.3M5 Equinox launcher on Mac OS X
Next Topic:Creating Team Repository Provider that delegates to other Providers
Goto Forum:
  


Current Time: Fri Mar 21 20:40:44 EDT 2025

Powered by FUDForum. Page generated in 0.03833 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top