You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Veeraraghavan <ra...@yahoo.com> on 2013/07/19 13:38:27 UTC

CXF-JAXRS in service mix is throwing exception com.sun.xml.internal.bind.namespacePrefixMapper" must be an instance of type com.sun.xml.internal.bind.marshaller.NamespacePrefixMapper, not org.apache.cxf.common.jaxb.NamespaceMapper

Hi,

I have written a CXF-JAXRS bundle. When the service is invoked for the first
time, it gives the proper JSON response. However, when I consume the same
service again, it is throwing the below exception.

*Caused by: javax.xml.bind.PropertyException: property
"com.sun.xml.internal.bind.namespacePrefixMapper" must be an instance of
type com.sun.xml.internal.bind.marshaller.NamespacePrefixMapper, not
org.apache.cxf.common.jaxb.NamespaceMapper*

Can some one help here?

Thanks



--
View this message in context: http://servicemix.396122.n5.nabble.com/CXF-JAXRS-in-service-mix-is-throwing-exception-com-sun-xml-internal-bind-namespacePrefixMapper-must-r-tp5717337.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Re: CXF-JAXRS in service mix is throwing exception com.sun.xml.internal.bind.namespacePrefixMapper" must be an instance of type com.sun.xml.internal.bind.marshaller.NamespacePrefixMapper, not org.apache.cxf.common.jaxb.NamespaceMapper

Posted by Gert Vanthienen <ge...@gmail.com>.
L.S.,


It sounds like you have more than one instance of the same class
floating around in the container or something like that.  Could you
have a look at the bundle headers and contents and check that that
imports those classes and does not have a copy of them inside the
bundle itself?  Also, could you check that you only have one version
of CXF and the JAXB API installed in the container (using osgi:list |
grep -i jaxb)?


Regards,

Gert


On Fri, Jul 19, 2013 at 1:38 PM, Veeraraghavan <ra...@yahoo.com> wrote:
> Hi,
>
> I have written a CXF-JAXRS bundle. When the service is invoked for the first
> time, it gives the proper JSON response. However, when I consume the same
> service again, it is throwing the below exception.
>
> *Caused by: javax.xml.bind.PropertyException: property
> "com.sun.xml.internal.bind.namespacePrefixMapper" must be an instance of
> type com.sun.xml.internal.bind.marshaller.NamespacePrefixMapper, not
> org.apache.cxf.common.jaxb.NamespaceMapper*
>
> Can some one help here?
>
> Thanks
>
>
>
> --
> View this message in context: http://servicemix.396122.n5.nabble.com/CXF-JAXRS-in-service-mix-is-throwing-exception-com-sun-xml-internal-bind-namespacePrefixMapper-must-r-tp5717337.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.