Using CXF 2.5.1.
I have an existing REST server that had two controllers with a handful of
simple GET services. In the last few days I added a third controller with a
simple service. I verified that was working, but I'm not sure if I tried the
two existing services at the time.
Today I made some additional minor changes to the third service and verified it
was ok. I then discovered that one of the original two services is now failing
with an error like this (the other original service is fine):
WARNING: javax.xml.bind.JAXBException: class <foo> nor any of its super class
is known to this context.
at
com.sun.xml.bind.v2.runtime.JAXBContextImpl.getBeanInfo(JAXBContextImpl.java:596)
at
com.sun.xml.bind.v2.runtime.XMLSerializer.childAsRoot(XMLSerializer.java:482)
at
com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:315)
As far as I can tell, nothing obvious has changed in that controller or the
classes that it uses. I verified that class "foo" hasn't changed and is still
in the deployed WAR file. I turned on "-verbose:class" and when my test ran I
found the "Loaded" message for that specific class.
My controllers are very simple. The controller method in question just returns
an instance of "foo".
What might I be doing wrong? Remember that this service has been working fine.
I haven't changed it. I must have changed something associated with it that
is causing an unexpected side effect.