On 4/16/12 15:10 , Michiel Vermandel wrote:
Hi,
I am experimenting with Felix and Gemini JPA.
I encounter an issue when I
use<exclude-unlisted-classes>false</exclude-unlisted-classes> in the
persinstence.xml.
The Gemini JPA example then produces a nullpointer exception.
java.lang.NullPointerException
at
org.eclipse.gemini.jpa.provider.BundleArchive.getEntries(BundleArchive.java:87)
In the BunldeArchive.getEntries they use the current bundle to get all .class
entries in this way:
entries = bundle.findEntries(".","*.class", true);
If I try that myself - for example in the start method of the bundles
activator, this statement produces a null object.
however
entries = bundle.findEntries("/","*.class", true);
produces a enumerator with all class files.
Could it be that Eclipse Equinox produces a valid entries list with findEntries("." and
Felix requires findEntries("/" ?
Looks like that is the case. The spec says this:
10.1.6.13 public Enumeration<URL> findEntries ( String path , String
filePattern , boolean recurse )
path - The path name in which to look. The path is always relative to
the root of this bundle and may begin with "/". A path value of "/"
indicates the root of this bundle.
It looks like the Gemini guys rely on non-standard behavior provided by
Equinox, at least according to my interpretation of the spec. Perhaps
you should file a bug against Gemini and ask them to use "/".
-> richard
Any ideas how to solve this?
Thanks a lot!
-----------------
http://www.codessentials.com - Your essential software, for free!
Follow us at http://twitter.com/#!/Codessentials