users@jaxb.java.net

Re: JAXB 2.2.6 and Java 7

From: Holger Brands <holger.brands_at_googlemail.com>
Date: Wed, 9 Jan 2013 14:43:46 +0100

Thanks for the quick reply.

So, if I understand correctly, in Java 7 the JAXB *API* will be stable.
When bundling the latest 2.2.x JAXB release with our application on Java 7,
we only have to add the jaxb-impl.jar to the classpath
and don't have to use the endorsed-mechanism, right?

But, things are more complicated:
first, our app is distributed via Java Webstart;
second, our app needs to run on Java 6 and Java 7 for a period of time.
(not all customers can upgrade directly to Java 7)

So we have three options:

a) ship the latest 2.2.x JAXB on Java 6 and Java 7
b) ship "the known to run" 2.1.x JAXB on Java 6 and Java 7
c) ship 2.1.x JAXB on Java 6 and the latest 2.2.x JAXB on Java 7

I'd favour a), but I fear we would have to use the endorsed-mechanism to
overwrite JAXB 2.1 API with JAXB 2.2 API on Java 6.
Making manual changes on the client machine is a no go, so any tips on how
to do this "the easy way" with Java Webstart?

b) has probably the analog problem of overwriting JAXB 2.2 API with JAXB
2.1 API on Java 7.
c) would be ok, if the two JAXB requirements are expressable in a single
JNLP file, any clues or tips?

With regard to the XmlAdapter marshalling / unmarshalling problem I try to
make a testcase, because we have problems
with nested unmarshalling which we didn't observe with JAXB 2.1.

Thanks,
Holger

2013/1/9 Iaroslav Savytskyi <iaroslav.savytskyi_at_oracle.com>

> Hi,
>
> First of all I would recommend you to use the latest JAXB release
> regardless of JDK version. New JDK7 updates will contain only updated 2.2.4
> branch. In JDK8 you could expect to have newer JAXB version. Nevertheless
> if you need any help with usage of standalone JAXB - let me know.
>
> Regarding usage of marshalling / unmarshalling within XmlAdapter I don't
> expect any problems with this.
>
> Best regards.
> --
> Yarda
>
>
>
> On 09/01/13 10:38, Holger Brands wrote:
>
>> Hello,
>>
>> we are testing migration from Java 6 to Java 7 and stumbled upon some JAXB
>> issues.
>>
>> Trying to use the default JAXB versions of the JRE, we would be upgrading
>> from
>> JAXB 2.1.10 (Java 6 update 35)
>> to
>> JAXB 2.2.4-2 (Java 7 update 10)
>>
>> We noticed some problems with JAXB 2.2.4-2 one of which seems to be fixed
>> with
>> JAXB version 2.2.6 (may be related to issue JAXB-900).
>>
>> My question is:
>> Do you know if and when JAXB 2.2.6 is going to be included as default in
>> an
>> upcoming Java 7 update?
>> How long will that take to be released?
>>
>> We have another issue that's not resolved in JAXB 2.2.4-2 or JAXB 2.2.6,
>> but works with JAXB 2.1.10.
>> I will report another mail for that.
>> But here is one additional question related to that issue:
>>
>> Is it allowed for a XmlAdapter in its unmarshall method to start another
>> JAXB unmarshall operation
>> and return that result as the result of the XmlAdapter-unmarshall method?
>> (Imagine a XmlAdapter getting a String input and unmarshalling an object
>> graph via JAXB from it)
>>
>> Thanks,
>> Holger
>>
>>