Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Gemini » org.eclipse.gemini.jpa.test.common fails to build because of DataSourceFactory(org.osgi.DataSourceFactory appears to be missing and TestActivator can't compile)
org.eclipse.gemini.jpa.test.common fails to build because of DataSourceFactory [message #941617] Fri, 12 October 2012 18:04 Go to next message
Jay Billings is currently offline Jay BillingsFriend
Messages: 54
Registered: July 2011
Member
Hello!

I am trying to build some junit tests around JPA classes in an OSGi plug-in. I want to thoroughly test the database interactions in Hudson regularly to catch regressions. I am hoping to use org.eclipse.gemini.jpa.test.common so that I can extend the TestActivator and avoid having to write my own.

I cloned the git repository and loaded the project into Eclipse. I modified my target to match the test.common target (correct versions). However, there is an error when Eclipse tries to build TestActivator.java:

"DataSourceFactory cannot be resolved to a type"

I haven't changed anything about the project. Just imported it. I have exact same MANIFEST.MF file with the import-package line for org.osgi.service.jdbc.

My target contains org.eclipse.osgi (3.7.2) and osgi.enterprise (4.2).

Have any of you encountered this error before? Any suggestions?

On the other hand, I don't think I need the DSF. Is it possible that I could run my tests without it?

Thanks in advance,
Jay


Jay Jay Billings
Oak Ridge National Laboratory
Twitter: @jayjaybillings
Re: org.eclipse.gemini.jpa.test.common fails to build because of DataSourceFactory [message #941752 is a reply to message #941617] Fri, 12 October 2012 20:47 Go to previous messageGo to next message
Michael Keith is currently offline Michael KeithFriend
Messages: 243
Registered: July 2009
Senior Member
Hi Jay,

I do occasionally have problems with PDE and it not being able to find the packages. Sometimes it just needs to be given a swift kick...
If I recall correctly, though, one of the causes in the past of a package import apparently gone AWOL is if multiple sources provide the same version. I know that hurt me on one occasion, not sure if it breaks all the time, though. If the osgi.enterprise jar is already being provided by PDE then that is a possibility (remove your own from the platform and see if it helps).

As far as being able to test without the DSF, you can do that if you only need the EMF. IF you need to test against the EMFBuilder then you will need to ensure that the DSF is posted before you try to create an EMF from the EMFBuilder.

HTH,
-Mike
Re: org.eclipse.gemini.jpa.test.common fails to build because of DataSourceFactory [message #943400 is a reply to message #941752] Sun, 14 October 2012 12:56 Go to previous message
Jay Billings is currently offline Jay BillingsFriend
Messages: 54
Registered: July 2011
Member
Thanks Mike! In the end I decided to just reproduce what I needed based on the package.

Jay


Jay Jay Billings
Oak Ridge National Laboratory
Twitter: @jayjaybillings
Previous Topic:Gemini JPA in Apache Karaf
Next Topic:Blueprint: Namespace trouble
Goto Forum:
  


Current Time: Thu Apr 25 01:43:48 GMT 2024

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

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

Back to the top