It worked. I initially thought it would be a separate provider but since exception was JaxbException assumed it was built into same provider
Thanks for quick response. - Swarup On 8/4/2011 11:40 AM, Sergey Beryozkin-5 [via CXF] wrote: > Hi > You need to set both JAXBElementProvider and JSONProvider - that > should fix it > Cheers. Sergey > > On Thu, Aug 4, 2011 at 4:17 PM, swarupe04 <[hidden email] > </user/SendEmail.jtp?type=node&node=4666753&i=0>> wrote: > > > Hi, > > > > I'm using CXF 2.4 and I was able to find that xml format works when I > > defined the alternative (to avoid XmlSeeAlso) but fails with > simillar error > > for json type ?_type=json. > > > > JAXBException occurred : class com.axxx.yyy.Artist nor any of its super > > class is known to this context.. > > > > <bean id="jaxb" > class="org.apache.cxf.jaxrs.provider.JAXBElementProvider"> > > <property name="singleJaxbContext" value="true"/> > > <property name="extraClass"> > > <list> > > <value>com.xxx.yyy.Artist</value> > > > > > > Is it missing the feature for json? > > > > > > > > -- > > View this message in context: > http://cxf.547215.n5.nabble.com/XmlSeeAlso-alternative-JaxbElementProvider-extraClass-doesn-t-work-for-json-serialization-tp4666684p4666684.html > > Sent from the cxf-user mailing list archive at Nabble.com. > > > > > > -- > Sergey Beryozkin > > http://sberyozkin.blogspot.com > Talend - http://www.talend.com > > > ------------------------------------------------------------------------ > If you reply to this email, your message will be added to the > discussion below: > http://cxf.547215.n5.nabble.com/XmlSeeAlso-alternative-JaxbElementProvider-extraClass-doesn-t-work-for-json-serialization-tp4666684p4666753.html > > > To unsubscribe from XmlSeeAlso alternative > JaxbElementProvider:extraClass doesn't work for json serialization, > click here > <http://cxf.547215.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4666684&code=ZXN3YXJ1cEBhb2wuY29tfDQ2NjY2ODR8LTEyMzk5NjMxMTQ=>. > > -- View this message in context: http://cxf.547215.n5.nabble.com/XmlSeeAlso-alternative-JaxbElementProvider-extraClass-doesn-t-work-for-json-serialization-tp4666684p4666997.html Sent from the cxf-user mailing list archive at Nabble.com.
