You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Benson Margulies <bi...@basistech.com> on 2007/10/18 15:36:37 UTC

JAXB and serialVersionID

I was surprised to see that JAXB schematizes the private static final
long serialVersionUID from my exception class. Is there some special
case for these, in spite of being private?


RE: JAXB and serialVersionID

Posted by Benson Margulies <bi...@basistech.com>.
Commit coming soon, but shouldn't this code be respecting bean-nature
and dealing with getFoo() and isFoo() and such?

> -----Original Message-----
> From: Daniel Kulp [mailto:dkulp@apache.org]
> Sent: Thursday, October 18, 2007 10:27 AM
> To: cxf-user@incubator.apache.org
> Cc: Benson Margulies
> Subject: Re: JAXB and serialVersionID
> 
> On Thursday 18 October 2007, Benson Margulies wrote:
> > I was surprised to see that JAXB schematizes the private static
final
> > long serialVersionUID from my exception class. Is there some special
> > case for these, in spite of being private?
> 
> It's probably not JAXB.   JAXB cannot handle exceptions directly.   We
> pull the faultInfo out of it if it exists and pass that to JAXB.   If
> there ISN'T a faultInfo thing, we map it ourselves.   See line 276 or
so
> of JAXBSchemaInitializer.   Looking at it, we map all the declared
> fields.   We don't check if the fields are static/final things.    You
> could update that and see if it helps.   If so, commit it.   :-)
> 
> --
> J. Daniel Kulp
> Principal Engineer
> IONA
> P: 781-902-8727    C: 508-380-7194
> daniel.kulp@iona.com
> http://www.dankulp.com/blog

RE: JAXB and serialVersionID

Posted by Benson Margulies <bi...@basistech.com>.
Got it.

> -----Original Message-----
> From: Daniel Kulp [mailto:dkulp@apache.org]
> Sent: Thursday, October 18, 2007 10:27 AM
> To: cxf-user@incubator.apache.org
> Cc: Benson Margulies
> Subject: Re: JAXB and serialVersionID
> 
> On Thursday 18 October 2007, Benson Margulies wrote:
> > I was surprised to see that JAXB schematizes the private static
final
> > long serialVersionUID from my exception class. Is there some special
> > case for these, in spite of being private?
> 
> It's probably not JAXB.   JAXB cannot handle exceptions directly.   We
> pull the faultInfo out of it if it exists and pass that to JAXB.   If
> there ISN'T a faultInfo thing, we map it ourselves.   See line 276 or
so
> of JAXBSchemaInitializer.   Looking at it, we map all the declared
> fields.   We don't check if the fields are static/final things.    You
> could update that and see if it helps.   If so, commit it.   :-)
> 
> --
> J. Daniel Kulp
> Principal Engineer
> IONA
> P: 781-902-8727    C: 508-380-7194
> daniel.kulp@iona.com
> http://www.dankulp.com/blog

Re: JAXB and serialVersionID

Posted by Daniel Kulp <dk...@apache.org>.
On Thursday 18 October 2007, Benson Margulies wrote:
> I was surprised to see that JAXB schematizes the private static final
> long serialVersionUID from my exception class. Is there some special
> case for these, in spite of being private?

It's probably not JAXB.   JAXB cannot handle exceptions directly.   We 
pull the faultInfo out of it if it exists and pass that to JAXB.   If 
there ISN'T a faultInfo thing, we map it ourselves.   See line 276 or so 
of JAXBSchemaInitializer.   Looking at it, we map all the declared 
fields.   We don't check if the fields are static/final things.    You 
could update that and see if it helps.   If so, commit it.   :-)

-- 
J. Daniel Kulp
Principal Engineer
IONA
P: 781-902-8727    C: 508-380-7194
daniel.kulp@iona.com
http://www.dankulp.com/blog