JAXB Exception: Class not known to this context

后端 未结 6 1044
-上瘾入骨i
-上瘾入骨i 2020-11-29 04:48

When I call a particular restful service method, which is built using CXF, I get the following error, anyone know why and how to resolve it?

6条回答
  •  孤城傲影
    2020-11-29 05:53

    I had this error because I registered the wrong class in this line of code:

    JAXBContext context = JAXBContext.newInstance(MyRootXmlClass.class);
    

提交回复
热议问题