2009/5/20 Will Horn <[email protected]>

>
> I have a case where the generated manifest is missing an import-package
> that
> seems to be necessary.  The reason I think it is necessary is that Eclipse
> PDE gives me an "access restriction" error in the code.
>

Hi Will,

Eclipse/PDE can sometimes incorrectly mark code as inaccessible, when in
pure OSGi it is accessible:

   https://bugs.eclipse.org/bugs/show_bug.cgi?id=180629
   https://bugs.eclipse.org/bugs/show_bug.cgi?id=122915

so the "gold-standard" test is to compile your code outside of Eclipse and
run it on plain Equinox, Felix,
or some other OSGi framework (shameless plug...
http://paxrunner.ops4j.orgcan help you with this ;)

if you get an unresolved constraint when running this code in a plain OSGi
container then please open
a new issue on JIRA and attach a testcase (preferably buildable with no
missing dependencies / code)

if however your code runs fine on pure OSGi then you've stumbled across the
JDT/PDE bug - in which
case you may decide to manually add the import via the <Import-Package>
instruction as a workaround

unfortunately there doesn't seem to have been any progress towards fixing
bug 122915 since 2006 :(

-- 
Cheers, Stuart

I tried pure Bnd:
>
> java -jar bnd-0.0.313.jar print util-1.5.0.jar
>
> and it also misses the import.  I've attached the jar, and the error is on
> line 157 of
>
> http://code.marketcetera.org/root/trunk/source/util/src/main/java/org/marketcetera/util/auth/SpringContext.java
> this file .
> http://www.nabble.com/file/p23623628/util-1.5.0.jar util-1.5.0.jar
>
> The code:
>
> ((PropertyPlaceholderConfigurer)context.getBean
>         (CONFIGURER_BEAN_NAME)).setProperties(properties);
>
> indirectly uses org.springframework.core.io.support.PropertyLoaderSupport,
> but Bnd does not discover that package.
>
> I can work around it by manually adding that import-package.
>
> Am I making a mistake?  Should I report this somewhere?
>
> Thanks,
> Will
>
> --
> View this message in context:
> http://www.nabble.com/-maven-bundle-plugin--possible-bug-in-Bnd--tp23623628p23623628.html
> Sent from the Apache Felix - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>

Reply via email to