org.eclipse.gemini.jpa.test.common fails to build because of DataSourceFactory [message #941617] |
Fri, 12 October 2012 18:04  |
Eclipse User |
|
|
|
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
|
|
|
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   |
Eclipse User |
|
|
|
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
|
|
|
|
Powered by
FUDForum. Page generated in 0.03131 seconds