users@jaxb.java.net

Re: JAXB 2.2.6 and Java 7

From: Holger Brands <holger.brands_at_googlemail.com>
Date: Thu, 10 Jan 2013 10:11:35 +0100

Ok, I created issues

http://java.net/jira/browse/JAXB-937
and
http://java.net/jira/browse/JAXB-938

JAXB-937 demonstrates the nested unmarshalling issue.
JAXB-938 demonstrates marshalling problem of object graph with @XmlID and
@XmlIDRef.

Both issues occur on JAXB version included in Java 7 update 10.
Both issues do not occur on JAXB version included in Java 6 update 35.

JAXB-938 does also not occur in JAXB 2.2.6. (May be related to fixed
JAXB-900.)

As I could not attach a file to JIRA I attach it here.

Feedback welcome.

Thanks,
Holger


2013/1/9 Holger Brands <holger.brands_at_googlemail.com>

> Thanks for the link, I didn't know about it.
> I think we hit JAXB-900, any chance to backport this to 2.2.4-4?
> To be sure I try to make another test case...
>
> With regard to JAXB in WebStart:
> We sign our deployed resources and our JNLP contains
>
> <security>
> <all-permissions/>
> </security>
>
> This should do it, if your customers accept this.
>
>
> Thanks,
> Holger
>
> 2013/1/9 Iaroslav Savytskyi <iaroslav.savytskyi_at_oracle.com>
>
>> Here is our roadmap:
>>
>> http://java.net/projects/**metro/pages/Roadmap<http://java.net/projects/metro/pages/Roadmap>
>>
>> As you see we are going to do bugfixing 2.2.4-4 release for JDK7. So may
>> be it will be good idea to use JDK build-in JAXB versions (2.1.x for JDK6
>> and 2.2.4-x for JDK7). Because I don't know the way how to use endorsed
>> mechanism in WebStart.
>>
>> By the way, don't you face any security problems while using JAXB in
>> WebStart. I have impression that it's not possible to use it unless
>> changing security permissions on users machine. Would be nice if you could
>> break this myth.
>>
>> In any case just report all you problems with 2.2.4-x and we will try to
>> fix them before 2.2.4-4 release.
>>
>> Thanks a lot in advance.
>> --
>> Yarda
>>
>>
>> On 09/01/13 14:43, Holger Brands wrote:
>>
>>> 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@**oracle.com<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
>>>>>
>>>>>
>>>>>
>>>
>