Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » How to see persistence.xml in RCP Plug-in using JPA
How to see persistence.xml in RCP Plug-in using JPA [message #463284] Wed, 07 February 2007 19:15 Go to next message
Eclipse UserFriend
Originally posted by: dknotts.co.brazos.tx.us

I am getting the following error when I am using JPA in an Eclipse
plug-in project:

"The persistence unit with name [mydata] does not exist."

The "mydata" persistence unit is defined in the persistence.xml, but it
appears that the program can't see the persistence.xml file. I have the
file stored in "project name/src/META-INF".

How can I get the plug-in to see the persistence.xml file?

Thanks,
Derek
Re: How to see persistence.xml in RCP Plug-in using JPA [message #464941 is a reply to message #463284] Tue, 20 March 2007 21:00 Go to previous message
Ted Pricer is currently offline Ted PricerFriend
Messages: 7
Registered: July 2009
Junior Member
I was able to get this working by setting up a buddy policy between my
plugins. I am using toplink essentials as my JPA implementation.

I have three plugins:
MyAppPlugin (my RCP app)
MyJpaLibrariesPlugin (toplink libraries)
MyDomainPlugin (my entities, and my META-INF/plugins.xml file)

The jpa libraries need to interrogate the MyDomainPlugin classpath for
the "META-INF/persistence.xml" file. In order for the classloader used
by MyJpaLibrariesPlugin to see them you need to setup the buddy policy.

specifically, I had to add:
"Eclipse-BuddyPolicy: registered"
to MyJpaLibrariesPlugin/META-INF/MANIFEST.MF

and
"Eclipse-RegisterBuddy: com.dwight.database"
to MyDomainPlugin/META-INF/MANIFEST.MF

I hope that helps.
Previous Topic:InvocationTargetException
Next Topic:Feature Based Product
Goto Forum:
  


Current Time: Sat Sep 21 01:12:59 GMT 2024

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

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

Back to the top