Eclipse RCP + EclipseLink

441 views
Skip to first unread message

hazzad hazzad

unread,
Jan 31, 2011, 6:17:15 AM1/31/11
to vogella
Hi,

I try to use Eclipse RCP together with EclipseLink. I also followed
the tutorial at http://www.vogella.de/articles/JavaPersistenceAPI/article.html.
It's really no deal to create an java class with a main using
Eclipselink and run it as application. But as soon as I try to do this
under RCP in a view - just used the plain sample application with a
view example - I end up in:

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

What ever I import or do, the result is more or less the same. So far
I think it has something to do with the class loader under rcp, but my
knowledge is not good enough to verify that. I would appreciate if one
could extend the above tutorial for an simple eclipse rcp application
with a plain view.

My code always blows up when I try to create the EntityManagerFactory
instance at :

.....
EntityManagerFactory emf;
emf =
Persistence.createEntityManagerFactory("UTLMGR_MF");
......

The identical code works for an java class with a main, running as
application...?

Many Thanks.

Lars Vogel

unread,
Jan 31, 2011, 5:19:38 PM1/31/11
to vog...@googlegroups.com
Hi,

please see: http://www.vogella.de/faq.html

Best regards, Lars

2011/1/31 hazzad hazzad <haz...@googlemail.com>:

> --
> You received this message because you are subscribed to the Google Groups "vogella" group.
> To post to this group, send email to vog...@googlegroups.com.
> To unsubscribe from this group, send email to vogella+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/vogella?hl=en.
>
>

--
Lars
http://www.vogella.de - Tutorials about Java, Eclipse and Web programming
http://www.twitter.com/vogella - Lars on Twitter

hazzad hazzad

unread,
Feb 1, 2011, 3:20:38 AM2/1/11
to vogella
Thanks Lars,

I found a more valuable answer in this thread
http://www.eclipse.org/forums/index.php?t=msg&goto=541155& - in case
someone has the same problem and is looking for the solution.

On Jan 31, 11:19 pm, Lars Vogel <lars.vo...@googlemail.com> wrote:
> Hi,
>
> please see:http://www.vogella.de/faq.html
>
> Best regards, Lars
>
> 2011/1/31 hazzad hazzad <hazz...@googlemail.com>:
>
>
>
> > Hi,
>
> > I try to use Eclipse RCP together with EclipseLink. I also followed
> > the tutorial athttp://www.vogella.de/articles/JavaPersistenceAPI/article.html.
> Larshttp://www.vogella.de- Tutorials about Java, Eclipse and Web programminghttp://www.twitter.com/vogella- Lars on Twitter
Reply all
Reply to author
Forward
0 new messages