You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by "Pieper, Aaron (SAIC)" <Pi...@Pragmatics.com> on 2008/05/20 17:12:17 UTC
CXF 2.1 incompatible with jaxb-impl 2.1.6?
I'm encountering the following exception using CXF 2.1 with JAXB-impl
2.1.6:
Caused by: java.lang.NullPointerException
at java.util.Calendar.setTime(Calendar.java:1032)
at
org.apache.cxf.tools.common.DataTypeAdapter.printDateTime(DataTypeAdapte
r.java:52)
at gen.jdnets.ds.Adapter2.marshal(Adapter2.java:17)
at gen.jdnets.ds.Adapter2.marshal(Adapter2.java:7)
at
com.sun.xml.bind.v2.runtime.reflect.AdaptedAccessor.get(AdaptedAccessor.
java:31)
... 52 more
The same problem exists all the way back to jaxb-impl v2.1, but the
problem goes away if I regress to jaxb-impl 2.0.3. Should I report this
in JIRA? I read that CXF 2.1 was supposed to be compatible with JAXB
2.1.
- Aaron
RE: CXF 2.1 incompatible with jaxb-impl 2.1.6?
Posted by Glen Mazza <gl...@verizon.net>.
Link [3] within [1] below is where JAXB bugs can be entered. You might
want to try Metro to determine if this is a CXF or a JAXB bug, if the
bug occurs also with Metro that would indicate the latter. The Maven
build file here[2] allows one to generate SOAP Clients/Web Service
Providers with Metro instead of CXF just by using the -PMetro setting.
Hopefully I can find some time later on to look at this myself.
Glen
[1] http://www.nabble.com/-ANN--JAXB-2.1.7-is-released-p17216140.html
[2] http://www.jroller.com/gmazza/date/20080417#WFstep3
2008-05-21 Pieper, Aaron (SAIC) wrote:
> I was able to create a small sample which demonstrates the bug. I've
> submitted it into JIRA.
>
> https://issues.apache.org/jira/browse/CXF-1602
>
> It only happens if you have multiple schema types mapped to the same
> java type. It may be a bug with jaxb-impl and not CXF, I don't know
> enough about the JAXB spec to say whether or not this behavior is
> compliant with the spec.
>
> - Aaron
>
> -----Original Message-----
> From: Daniel Kulp [mailto:dkulp@apache.org]
> Sent: Tuesday, May 20, 2008 12:11 PM
> To: users@cxf.apache.org
> Subject: Re: CXF 2.1 incompatible with jaxb-impl 2.1.6?
>
>
>
> Is there any way you can create a small sample project that
> demonstrates this?
>
> This might be a bug in the DataTypeAdapter code somehow, but I'm not
> really sure how that's possible as the code there is VERY simple.
>
> It looks like jaxb is sending a null into
> public static String printDateTime(Date dt)
> and I'm not sure why it would be doing that. An example would be a
> huge help.
>
> Dan
>
>
> On May 20, 2008, at 11:12 AM, Pieper, Aaron (SAIC) wrote:
>
> > I'm encountering the following exception using CXF 2.1 with JAXB-impl
> > 2.1.6:
> >
> >
> >
> > Caused by: java.lang.NullPointerException
> >
> > at java.util.Calendar.setTime(Calendar.java:1032)
> >
> > at
> > org
> > .apache.cxf.tools.common.DataTypeAdapter.printDateTime(DataTypeAdapte
> > r.java:52)
> >
> > at gen.jdnets.ds.Adapter2.marshal(Adapter2.java:17)
> >
> > at gen.jdnets.ds.Adapter2.marshal(Adapter2.java:7)
> >
> > at
> > com
> > .sun.xml.bind.v2.runtime.reflect.AdaptedAccessor.get(AdaptedAccessor.
> > java:31)
> >
> > ... 52 more
> >
> >
> >
> > The same problem exists all the way back to jaxb-impl v2.1, but the
> > problem goes away if I regress to jaxb-impl 2.0.3. Should I report
> > this
> > in JIRA? I read that CXF 2.1 was supposed to be compatible with JAXB
> > 2.1.
> >
> >
> >
> > - Aaron
> >
>
> ---
> Daniel Kulp
> dkulp@apache.org
> http://www.dankulp.com/blog
>
>
>
>
RE: CXF 2.1 incompatible with jaxb-impl 2.1.6?
Posted by "Pieper, Aaron (SAIC)" <Pi...@Pragmatics.com>.
I was able to create a small sample which demonstrates the bug. I've
submitted it into JIRA.
https://issues.apache.org/jira/browse/CXF-1602
It only happens if you have multiple schema types mapped to the same
java type. It may be a bug with jaxb-impl and not CXF, I don't know
enough about the JAXB spec to say whether or not this behavior is
compliant with the spec.
- Aaron
-----Original Message-----
From: Daniel Kulp [mailto:dkulp@apache.org]
Sent: Tuesday, May 20, 2008 12:11 PM
To: users@cxf.apache.org
Subject: Re: CXF 2.1 incompatible with jaxb-impl 2.1.6?
Is there any way you can create a small sample project that
demonstrates this?
This might be a bug in the DataTypeAdapter code somehow, but I'm not
really sure how that's possible as the code there is VERY simple.
It looks like jaxb is sending a null into
public static String printDateTime(Date dt)
and I'm not sure why it would be doing that. An example would be a
huge help.
Dan
On May 20, 2008, at 11:12 AM, Pieper, Aaron (SAIC) wrote:
> I'm encountering the following exception using CXF 2.1 with JAXB-impl
> 2.1.6:
>
>
>
> Caused by: java.lang.NullPointerException
>
> at java.util.Calendar.setTime(Calendar.java:1032)
>
> at
> org
> .apache.cxf.tools.common.DataTypeAdapter.printDateTime(DataTypeAdapte
> r.java:52)
>
> at gen.jdnets.ds.Adapter2.marshal(Adapter2.java:17)
>
> at gen.jdnets.ds.Adapter2.marshal(Adapter2.java:7)
>
> at
> com
> .sun.xml.bind.v2.runtime.reflect.AdaptedAccessor.get(AdaptedAccessor.
> java:31)
>
> ... 52 more
>
>
>
> The same problem exists all the way back to jaxb-impl v2.1, but the
> problem goes away if I regress to jaxb-impl 2.0.3. Should I report
> this
> in JIRA? I read that CXF 2.1 was supposed to be compatible with JAXB
> 2.1.
>
>
>
> - Aaron
>
---
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog
Re: CXF 2.1 incompatible with jaxb-impl 2.1.6?
Posted by Daniel Kulp <dk...@apache.org>.
Is there any way you can create a small sample project that
demonstrates this?
This might be a bug in the DataTypeAdapter code somehow, but I'm not
really sure how that's possible as the code there is VERY simple.
It looks like jaxb is sending a null into
public static String printDateTime(Date dt)
and I'm not sure why it would be doing that. An example would be a
huge help.
Dan
On May 20, 2008, at 11:12 AM, Pieper, Aaron (SAIC) wrote:
> I'm encountering the following exception using CXF 2.1 with JAXB-impl
> 2.1.6:
>
>
>
> Caused by: java.lang.NullPointerException
>
> at java.util.Calendar.setTime(Calendar.java:1032)
>
> at
> org
> .apache.cxf.tools.common.DataTypeAdapter.printDateTime(DataTypeAdapte
> r.java:52)
>
> at gen.jdnets.ds.Adapter2.marshal(Adapter2.java:17)
>
> at gen.jdnets.ds.Adapter2.marshal(Adapter2.java:7)
>
> at
> com
> .sun.xml.bind.v2.runtime.reflect.AdaptedAccessor.get(AdaptedAccessor.
> java:31)
>
> ... 52 more
>
>
>
> The same problem exists all the way back to jaxb-impl v2.1, but the
> problem goes away if I regress to jaxb-impl 2.0.3. Should I report
> this
> in JIRA? I read that CXF 2.1 was supposed to be compatible with JAXB
> 2.1.
>
>
>
> - Aaron
>
---
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog