users@jaxb.java.net

Re: JAXB issue: java.security.Permission does not have a no-arg default constructor.

From: Kenny MacLeod <kennym_at_kizoom.com>
Date: Tue, 29 Jul 2008 23:28:44 +0100

You'd need to come up with a way of encoding this into the XML string.
The adapter would turn the Permission into its string representation,
and vice versa. Not trivial, unless you only need to support a very
limited set of Permission types.

Arul Dhesiaseelan wrote:
> Thanks for pointing to the sample.
>
> In this case, Permission is an abstract class. So, how would I treat
> abstract classes in XmlJavaTypeAdapter?
>
> -Arul
>
> Malachi de Ælfweald wrote:
>> Have you tried using the XmlJavaTypeAdapter?
>>
>> http://weblogs.java.net/blog/kohsuke/archive/2005/09/using_jaxb_20s.html
>>
>> On Tue, Jul 29, 2008 at 7:46 AM, Arul Dhesiaseelan <arul_at_fluxcorp.com
>> <mailto:arul_at_fluxcorp.com>> wrote:
>>
>> Hello JAXB users,
>>
>> I am getting the following error at JAXB runtime.
>>
>> Caused by:
>> com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 1 counts
>> of IllegalAnnotationExceptions
>> java.security.Permission does not have a no-arg default constructor.
>> this problem is related to the following location:
>> at java.security.Permission
>>
>> My interface has the following methods:
>>
>> public Set<Permission> getPermissions();
>> public void setPermissions(Set<Permission> permissions);
>>
>> How do I fix this in JAXB runtime as I do not have control over
>> annotating java.security.* classes?
>>
>> Appreciate any help.
>>
>> Thank you,
>> Arul
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
>> <mailto:users-unsubscribe_at_jaxb.dev.java.net>
>> For additional commands, e-mail: users-help_at_jaxb.dev.java.net
>> <mailto:users-help_at_jaxb.dev.java.net>
>>
>>
>>
>> ________________________________
>> Scanned by MessageLabs for Flux
>> ________________________________
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
> For additional commands, e-mail: users-help_at_jaxb.dev.java.net
>