tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vincenzo D'Amore <>
Subject How can I configure Apache CXF ignoreNamespaces in TomEE+?
Date Sun, 11 Jan 2015 13:23:45 GMT
Hi All,

I have create a simple RESTful service but when I tried to return json I have this error:

    java.lang.IllegalStateException: Invalid JSON namespace

Looking at TomEE+ 1.7.1 I saw behind jax-rs implementation there is Apache CXF 2.6.4, so I
tried to configure property ignoreNamespaces = true.

Unfortunately, I haven't found any documentation on TomEE, and looking at Apache CXF documentation
if I want set ignoreNamespaces = true I should set it into `beans.xml`

    <property name="ignoreNamespaces" value="true"/>

Writing something like:

        <ref bean="jsonProvider"/>
    <bean id="jsonProvider" class="org.apache.cxf.jaxrs.provider.json.JSONProvider">
       <property name="ignoreNamespaces" value="true"/>
       <property name="namespaceMap" ref="jsonNamespaceMap"/>

But in this case I got a different error during the TomEE boot:

`Caused by: javax.xml.bind.UnmarshalException: unexpected element (uri:"",
local:"server"). Expected elements are <{}decorators>,<{}interceptors>,<{}alternatives>`

What do you think, should I continue configure cfx or try to use a different implementation
View raw message