[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform] Re: Access restriction problem when using Java 6

Hi Joel,

one hint: as of Eclipse/Equinox 3.3 the javax package is no longer
accessible by default. You have to add someting like 
"Import-Package: javax.xml.bind.<your-package>"
to the MANIFEST.MF in your bundle.

I can't find the bunch of URL we've collected when we where hit by
this problem, but there are quite a few. Just look for something
containing "strict mode equinox" or "boot delegation" on your favorite
search engine.

Achim


On Mon, 03 Nov 2008 17:58:18 +0000, Joel Rosi-Schwartz
<Joel.Rosi-Schwartz@xxxxxxxxx> wrote:

>Hi,
>
>I am getting access restrictions errors against JAXB (javax.xml.bind...)
>classes when using Java 6; all is fine with Java 5. I have a wrapped library
>bundle for JAXB that with Java 5 fulfils the dependency. But since JAXB is
>bundled with Java 6 and javax.xml.bind is not on the rt.jar access rules as
>"accessible" the errors appear; even though the wrapped bundle is still the
>dictated dependency.
>
>This seems an odd way for Eclipse to handle the situation, is it typical, is
>this a bug or am I simply doing something dumb?
>
>Btw, I know that I can shut off the errors in the compiler settings, but
>that is quite coarse grained and cover up real problems. And yes I could
>down grade the errors to warnings and than add
>@SuppressWarnings("restriction"), but that would require going through 1000+
>warnings and this would all be lost the next time I processed with JAXB.
>
>Any suggestions?
>
>Thanks,
>Joel

Achim
-- 
Achim Lörke

Eclipse-Stammtisch in the Braunschweig, Germany area:
http://www.bredex.de/de/news/events.html