yes, since version 2.0 i decided to have DynamicImport-Package = * as
default.
This should work in most situations when keeping in mind the fact that the
test probe bundle is just the entry for exam. You should not put stuff in
your test probe that should reside in their own, carefully crafted bundles.
There is still the option to overwrite those defaults.

On Wed, Aug 24, 2011 at 9:37 AM, Harald Wellmann <[email protected]>wrote:

> Somewhat weird, yes...
>
> The OSGi spec is a little vague about the semantics of optional package
> resolution. It just states that a framework is free to ignore this
> dependency.
>
> In my projects, I've also seen cases where a package imported with
> resolution:=optional did not resolve, but everything worked fine after
> removing the "optional" directive.
>
> As a user, you would expect "optional" to mean "drop this if and only if
> there is no other way to satisfy all dependencies", whereas the spec seems
> to imply "the framework may drop this depencdency to make its life easier
> (and the user's life harder)".
>
> I'm not familiar with the internals of Pax Exam 1.x. From what I've seen in
> Pax Exam 2.2.0, the problem should not occur, since the probes are built
> with "DynamicImport-Package: *" by default. I've never seen any optional
> resolutions.
>
> Hope that helps,
> Harald
>
> Am 24.08.2011 16:18, schrieb Samuel Cox:
>
>  Hi,
>>
>> I'm using Pax Exam1 in an attempt at testing OSGi services exposed in Fuse
>> 4.3.
>>
>> When I don't use TinyBundles, I get a NoClassDefFoundError with a
>> cause of ClassNotFoundException for a class representing my service
>> interface.  When I examine the probe's Import-Package header, I see
>> that it has the package providing this service listed as optional.
>> I've also printed out all the bundles and the services they provide.
>> The bundle providing the service starts successfully and the service
>> is listed.
>>
>> If I use TinyBundle to alter the probe's Import-Package header such
>> that the resolution:=optional is removed from the package providing
>> the service, I don't get the NoClassDefFoundError.
>>
>> Does this seem weird?
>>
>>
> ______________________________**_________________
> general mailing list
> [email protected]
> http://lists.ops4j.org/**mailman/listinfo/general<http://lists.ops4j.org/mailman/listinfo/general>
>



-- 
Toni Menzel Source <http://tonimenzel.com>
_______________________________________________
general mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/general

Reply via email to