我正在處理傳統應用程序,並且收到了嘗試解析xml提要的異常。基於異常,我認爲它是一個缺少的jar(我們使用maven,但有一些依賴問題)。谷歌沒有發現任何有用的東西。以下是堆棧跟蹤:JAXB解組異常無法找到適用於媒體類型的JAXBContextFinder:text/html; charset =「UTF-8」
org.jboss.resteasy.plugins.providers.jaxb.JAXBUnmarshalException: Could not find JAXBContextFinder for media type: text/html;charset="UTF-8"
at org.jboss.resteasy.plugins.providers.jaxb.AbstractJAXBProvider.findJAXBContext(AbstractJAXBProvider.java:49)
at org.jboss.resteasy.plugins.providers.jaxb.AbstractJAXBProvider.readFrom(AbstractJAXBProvider.java:95)
at org.jboss.resteasy.core.interception.MessageBodyReaderContextImpl.proceed(MessageBodyReaderContextImpl.java:105)
at org.jboss.resteasy.plugins.interceptors.encoding.GZIPDecodingInterceptor.read(GZIPDecodingInterceptor.java:61)
at org.jboss.resteasy.core.interception.MessageBodyReaderContextImpl.proceed(MessageBodyReaderContextImpl.java:108)
at org.jboss.resteasy.client.core.BaseClientResponse.readFrom(BaseClientResponse.java:398)
at org.jboss.resteasy.client.core.BaseClientResponse.getEntity(BaseClientResponse.java:346)
at org.jboss.resteasy.client.core.BaseClientResponse.getEntity(BaseClientResponse.java:319)
at org.jboss.resteasy.client.core.extractors.BodyEntityExtractor.extractEntity(BodyEntityExtractor.java:54)
at org.jboss.resteasy.client.core.ClientInvoker.invoke(ClientInvoker.java:114)
at org.jboss.resteasy.client.core.ClientProxy.invoke(ClientProxy.java:72)
看看這個http://blog.2partsmagic.com/2009/04/resolving-could-not-find-jaxbcontextfinder-for-media-type-texthtml/,可能對你有用。 – kunal