Home » Eclipse Projects » Eclipse Platform » Access restriction problem when using Java 6
Access restriction problem when using Java 6 [message #332651] |
Mon, 03 November 2008 17:58 |
|
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
--
Joel Rosi-Schwartz
Etish Limited [http://www.etish.org]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^...^
/ o,o \ The proud parents of Useme & ORMF
|) ::: (| Open Requirements Management Framework
====w=w==== [http://www.eclipse.org/ormf/]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
Re: Access restriction problem when using Java 6 [message #332670 is a reply to message #332651] |
Tue, 04 November 2008 15:09 |
|
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@Etish.org> 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
Achim Lörke
|
|
|
Re: Access restriction problem when using Java 6 [message #332674 is a reply to message #332670] |
Tue, 04 November 2008 15:50 |
|
Achim,
Thanks for that, but this does not seem to help. Michael, as Achim has
already been through this, possibly he can take a look at your JAXB and
fileaccess plug-ins to see if he has any idea.
I am going to pass this back to you Michael, as it does not make sense for
me to be focusing on this at the moment. Let me know if I can assist though.
Joel
On 04/11/2008 15:09, in article 4pn0h4pnuu94r5nl7gelpa2b29etd3odfs@4ax.com,
"Achim Lörke" <Achim.Loerke@bredex.de> wrote:
> 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@Etish.org> 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
|
|
|
Re: Access restriction problem when using Java 6 [message #332675 is a reply to message #332674] |
Tue, 04 November 2008 16:22 |
Eclipse User |
|
|
|
Originally posted by: zx.code9.com
Joel Rosi-Schwartz wrote:
> Achim,
>
> Thanks for that, but this does not seem to help. Michael, as Achim has
> already been through this, possibly he can take a look at your JAXB and
> fileaccess plug-ins to see if he has any idea.
>
> I am going to pass this back to you Michael, as it does not make sense for
> me to be focusing on this at the moment. Let me know if I can assist though.
Joel, feel free to find me on Skype and we can chat about this problem a
bit. I think the solution is to just add access rules to the JRE
container and your problem will be solved in both cases.
Cheers,
~ Chris
|
|
|
Goto Forum:
Current Time: Fri Dec 13 02:52:40 GMT 2024
Powered by FUDForum. Page generated in 0.03055 seconds
|