On 4/22/10 10:06 AM, Richard S. Hall wrote:
> On 4/22/10 10:01, [email protected] wrote:
>> Hi,
>>
>>
>>
>> I have deployed Perf4j as a non-OSGi jar exported via
>> "org.osgi.framework.system.packages.extra". Perf4j has a dependency on
>> org.slf4j.Logger, which I have deployed as a bundle (as there are other
>> bundles dependent on this SLF4j version). During runtime, I get
>> ClassNotFoundException.
>>
>>
>>
>> How is the wiring between non-OSGi jar& bundles handled?
>>
>> How do we deal with a situation where a package A is needed by both
>> non-OSGI& OSGi bundle deployed on Apache Felix?
>>
>
> Packages on the class path cannot "import" from bundles. You will need
> to add any needed packages to the class path too and export them using
> system.packages.extra as well if you want them to be shared among the
> class path packages and the deployed bundles.
Although in this case, if SLF4J isn't part of the exported API, then it
need not be exported, right? In other words, if you have:
package foo.bar;
import org.slf4j.*;
public class MyClass {
private Logger logger = LoggerFactory.getLogger(MyClass.class);
public void doSomething() {
// ...
}
}
Then you can export foo.bar without exporting org.slf4j.
Justin
>
> -> richard
>
>>
>>
>> Thanks,
>>
>> Prakash
>>
>>
>>
>
> ---------------------------------------------------------------------
> 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]