Hi
On 27/03/13 01:27, ronfulkerson wrote:
Sorry... the last message had formatting and some content removed. Please
consider this post:
So I have put together a test case using the Bookstore classes from
systests/jaxrs. These classes are unmodified, but packaged as an OSGi bundle
and accessed via a Camel route. I am not sure this is the exact problem I am
encountering, but it produces the same exception so it will hopefully be a
good place to start.
Please download the test from here
<https://bitbucket.org/ronfulkerson/stash/downloads/cxf-camel-test.zip> .
I deploy using 'mvn install', then from servicemix 'install -s
mvn:cxf-camel-test/cxf-camel-test'. I have tested with servicemix 4.5.0 and
various JDK's (including JDK 1.7.u14).
The exception for this test is thrown after the 'books/xsitype' URL is hit:
$ curl -s -X GET http://localhost:8080/cxf/books/123
{"Book":{"id":123,"name":"CXF in Action"}}
$ curl -s -X GET http://localhost:8080/cxf/books/xsitype
<?xml version="1.0" encoding="UTF-8"
standalone="yes"?><Book><id>999</id><name>SuperBook</name></Book>
$ curl -s -X GET http://localhost:8080/cxf/books/123
JAXBException occurred : 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.
It is interesting to me that the 'books/{id}' URL initially works, but not
after 'books/xsitype' has been accessed.
Thanks for creating this test project. I'm not able to reproduce.
I've built the bundle, only updated the versions to 2.10.4, and then
deployed into our Karaf-based distro (I can link to it offline if you'd
like to test on your own too) and the above sequence of requests works
when the browser or curl is used.
I've spotted this:
http://www.docx4java.org/forums/docx-java-f6/grails-and-docx4j-v2-6-0-t502.html
they talk about exactly the same issue - see the tip in the end -
perhaps that may help
Cheers, Sergey
Again, thank you for your input!
--
View this message in context:
http://cxf.547215.n5.nabble.com/CXF-JSON-Binding-Exception-tp5725065p5725332.html
Sent from the cxf-user mailing list archive at Nabble.com.