Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » Blocking javax.xml.bind in JDK1.6
Blocking javax.xml.bind in JDK1.6 [message #103910] Wed, 16 January 2008 00:49 Go to next message
Bill Kayser is currently offline Bill Kayser
Messages: 11
Registered: July 2009
Junior Member
JDK1.6 now includes the Jaxb libraries, version 2.0. I want to use 2.1.

Is there a way to tell the framework that I want to use my net.java.jaxb
bundle instead of the javax.xml.bind packages provided in the 1.6 JDK?

I can use the net.java.jaxb_2.1.0 bundle when I run on JDK1.5 but the
packages in there get shadowed by the JDK when I run JDK1.6.

I seem to recall running into a similar problem with xerces a while back.

Bill Kayser
Re: Blocking javax.xml.bind in JDK1.6 [message #103958 is a reply to message #103910] Thu, 17 January 2008 10:08 Go to previous messageGo to next message
Eclipse User
Originally posted by: karsten.panier.aysada.org

Bill Kayser wrote:
> JDK1.6 now includes the Jaxb libraries, version 2.0. I want to use 2.1.
>
> Is there a way to tell the framework that I want to use my net.java.jaxb
> bundle instead of the javax.xml.bind packages provided in the 1.6 JDK?
>
> I can use the net.java.jaxb_2.1.0 bundle when I run on JDK1.5 but the
> packages in there get shadowed by the JDK when I run JDK1.6.
>
> I seem to recall running into a similar problem with xerces a while back.
>
> Bill Kayser

Hi,

you can control the usage of jre classes by boot delegation property.
This article explains it:
http://wiki.eclipse.org/index.php/Equinox_Boot_Delegation

karsten
Re: Blocking javax.xml.bind in JDK1.6 [message #104031 is a reply to message #103910] Fri, 18 January 2008 14:59 Go to previous messageGo to next message
Simon Kaegi is currently offline Simon Kaegi
Messages: 381
Registered: July 2009
Senior Member
Hi Bill,

If your bundle requires a specific version of JAXB you shoud state that in
your Import-Package entries:

e.g. javax.xml.bind;version="2.1"

The flip side of this is that your javax.xml.bind 2.1 bundle should also be
exporting the packages with versions.

HTH
-Simon

"Bill Kayser" <eclipse@kayser.org> wrote in message
news:fmjka9$p2h$1@build.eclipse.org...
> JDK1.6 now includes the Jaxb libraries, version 2.0. I want to use 2.1.
>
> Is there a way to tell the framework that I want to use my net.java.jaxb
> bundle instead of the javax.xml.bind packages provided in the 1.6 JDK?
>
> I can use the net.java.jaxb_2.1.0 bundle when I run on JDK1.5 but the
> packages in there get shadowed by the JDK when I run JDK1.6.
>
> I seem to recall running into a similar problem with xerces a while back.
>
> Bill Kayser
Re: Blocking javax.xml.bind in JDK1.6 [message #104344 is a reply to message #104031] Tue, 22 January 2008 20:34 Go to previous messageGo to next message
Bill Kayser is currently offline Bill Kayser
Messages: 11
Registered: July 2009
Junior Member
I tried that and it worked. Would the bootdelegation option work as
well? I had a hard time finding information on that property and since
I already had the package imports working I didn't spend any more time
on it.



Simon Kaegi wrote:
> Hi Bill,
>
> If your bundle requires a specific version of JAXB you shoud state that in
> your Import-Package entries:
>
> e.g. javax.xml.bind;version="2.1"
>
> The flip side of this is that your javax.xml.bind 2.1 bundle should also be
> exporting the packages with versions.
>
> HTH
> -Simon
>
> "Bill Kayser" <eclipse@kayser.org> wrote in message
> news:fmjka9$p2h$1@build.eclipse.org...
>> JDK1.6 now includes the Jaxb libraries, version 2.0. I want to use 2.1.
>>
>> Is there a way to tell the framework that I want to use my net.java.jaxb
>> bundle instead of the javax.xml.bind packages provided in the 1.6 JDK?
>>
>> I can use the net.java.jaxb_2.1.0 bundle when I run on JDK1.5 but the
>> packages in there get shadowed by the JDK when I run JDK1.6.
>>
>> I seem to recall running into a similar problem with xerces a while back.
>>
>> Bill Kayser
>
>
Re: Blocking javax.xml.bind in JDK1.6 [message #104356 is a reply to message #104031] Tue, 22 January 2008 20:34 Go to previous messageGo to next message
Bill Kayser is currently offline Bill Kayser
Messages: 11
Registered: July 2009
Junior Member
I tried that and it worked. Would the bootdelegation option work as
well? I had a hard time finding information on that property and since
I already had the package imports working I didn't spend any more time
on it.



Simon Kaegi wrote:
> Hi Bill,
>
> If your bundle requires a specific version of JAXB you shoud state that in
> your Import-Package entries:
>
> e.g. javax.xml.bind;version="2.1"
>
> The flip side of this is that your javax.xml.bind 2.1 bundle should also be
> exporting the packages with versions.
>
> HTH
> -Simon
>
> "Bill Kayser" <eclipse@kayser.org> wrote in message
> news:fmjka9$p2h$1@build.eclipse.org...
>> JDK1.6 now includes the Jaxb libraries, version 2.0. I want to use 2.1.
>>
>> Is there a way to tell the framework that I want to use my net.java.jaxb
>> bundle instead of the javax.xml.bind packages provided in the 1.6 JDK?
>>
>> I can use the net.java.jaxb_2.1.0 bundle when I run on JDK1.5 but the
>> packages in there get shadowed by the JDK when I run JDK1.6.
>>
>> I seem to recall running into a similar problem with xerces a while back.
>>
>> Bill Kayser
>
>
Re: Blocking javax.xml.bind in JDK1.6 [message #104372 is a reply to message #104356] Wed, 23 January 2008 02:02 Go to previous message
Simon Kaegi is currently offline Simon Kaegi
Messages: 381
Registered: July 2009
Senior Member
That's great.
The approach you have working is what I would suggest.

I'm not sure boot delegation would help you for what you're doing. Even when
it is applicable I view boot delegation as a last resort.

-Simon

"Bill Kayser" <eclipse@kayser.org> wrote in message
news:fn5k1c$tfl$2@build.eclipse.org...
>I tried that and it worked. Would the bootdelegation option work as well?
>I had a hard time finding information on that property and since I already
>had the package imports working I didn't spend any more time on it.
>
>
>
> Simon Kaegi wrote:
>> Hi Bill,
>>
>> If your bundle requires a specific version of JAXB you shoud state that
>> in your Import-Package entries:
>>
>> e.g. javax.xml.bind;version="2.1"
>>
>> The flip side of this is that your javax.xml.bind 2.1 bundle should also
>> be exporting the packages with versions.
>>
>> HTH
>> -Simon
>>
>> "Bill Kayser" <eclipse@kayser.org> wrote in message
>> news:fmjka9$p2h$1@build.eclipse.org...
>>> JDK1.6 now includes the Jaxb libraries, version 2.0. I want to use 2.1.
>>>
>>> Is there a way to tell the framework that I want to use my net.java.jaxb
>>> bundle instead of the javax.xml.bind packages provided in the 1.6 JDK?
>>>
>>> I can use the net.java.jaxb_2.1.0 bundle when I run on JDK1.5 but the
>>> packages in there get shadowed by the JDK when I run JDK1.6.
>>>
>>> I seem to recall running into a similar problem with xerces a while
>>> back.
>>>
>>> Bill Kayser
>>
Previous Topic:equinox.http.registry.servlets and spring as server
Next Topic:declarative services dependency injection questions
Goto Forum:
  


Current Time: Sat Sep 20 13:59:59 GMT 2014

Powered by FUDForum. Page generated in 0.01767 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software