Even when I think I would not use dot instead of slash, I think there
is something in the spec open to interpretation.

3.9 reads

The following sections define the factors that influence the runtime
class loading and then define the exact search order the Framework
must follow when a class or resource is loaded.


And then 3.9.1 (entitled "Bundle Class Path") reads

The dot ('.' \u002E) container path is a synonym for slash ('\') or
the root of a container. [...]


Now, this is in a section that in about to introduce the concept of
bundle class path (so it is not clear that this applies in other
contexts outside of of a bundle class path definition), but at the
same time it talks about "container path" (that would imply that this
is more generic and involves al resource resolutions).
At the end of the day, I think Richard is right and a slash should be
used to conform to a more strict interpretation, but at the same time
I cannot say that what Equinox does is wrong by understanding path in
the more relaxed interpretation.

-lucas

On Apr 16, 2012, at 11:35 PM, Michael Van Geertruy
<[email protected]> wrote:

> What's saddest about this is the Equinox is supposed to be the reference 
> implementation of the spec. The fact that this bug exists is, in itself, 
> highly problematic.
>
> On 4/16/2012 3:33 PM, Richard S. Hall wrote:
>> 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
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to