Which CXF version is it ?

Thanks, Sergey
On 07/02/14 17:28, Graeme Dougal wrote:
Thanks

Have configured jaxbprovider as follows

<bean id="jaxbProvider"
class="org.apache.cxf.jaxrs.provider.JAXBElementProvider">
       <property name="singleJaxbContext" value="true"/>
       <property name="extraClass">
          <list>
            <value>...package....AccountDTO</value>
          </list>
       </property>
</bean>

but still get same error

json provider is configured as
<bean id="jsonProvider"
class="org.apache.cxf.jaxrs.provider.json.JSONProvider">
     <property name="dropRootElement" value="false"/>
     <property name="supportUnwrapped" value="true" />
         <property name="ignoreNamespaces" value="true" />
     </bean>

Cheers
Graeme


On Fri, Feb 7, 2014 at 5:02 PM, Sergey Beryozkin <[email protected]>wrote:

Hi

On 07/02/14 16:11, Graeme Dougal wrote:

Hi

Getting the following exception when trying to return an object structure
as follows..

I have a Page<T> object that is constructed as Page<AccountDTO> the Page
class contains a List<T> representing the items in the page.  Meaning I
can
use Page<T> to represent any type

When trying to return this from a cxf rest end point I get the error
message

class AccountDTO nor any of its super class is known to this context

Any ideas ?

  JAXB provider does not build the context dynamically, so try using
jaxb.index, ObjectFactory, or JAXBElementProvider.extraClass property to
list the additional classes

Cheers, Sergey






--
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/

Blog: http://sberyozkin.blogspot.com

Reply via email to