我無法從解析的Atom Feed獲取條目。我從Web服務獲取這些提要。事情是代碼工作絕對好,在我的本地服務器,但是當我部署它在我的開發盒我得到FOMUnsupportedTextTypeException
例外。 當我檢查生成的Atom feed中的差異時,發現feed xml中的變化很小。下面 是我local
飼料FOMUnsupportedTextTypeException - 從Atom feed刪除type =「Text/Html」屬性
<atom:entry>
<atom:id>e0f7f5e7-a5f3-4a2e-a87d-d8def2b6bc2c</atom:id>
<atom:title">Locations</atom:title>
<atom:author>
<atom:uri>uid=wpsadmin,o=defaultWIMFileBasedRealm</atom:uri>
<atom:name>wpsadmin</atom:name>
</atom:author>
,在這裏我dev
框中生成XML。
<atom:entry>
<atom:id>e0f7f5e7-a5f3-4a2e-a87d-d8def2b6bc2c</atom:id>
<atom:title type="text/html">Locations</atom:title>
<atom:author>
<atom:uri>uid=wpsadmin,o=defaultWIMFileBasedRealm</atom:uri>
<atom:name>wpsadmin</atom:name>
</atom:author>
唯一的區別是在type="text/html"
atom:title
我使用阿布德拉解析器來解析原子和在本地和DEV使用IBM門戶8。
我在這個代碼得到錯誤
Document<Feed> doc = response.getDocument();
Feed feed = (Feed) doc.getRoot();
for (Entry entry : feed.getEntries()) { //exception at this line
例外是FOMUnsupportedTextTypeException
以下是完整的異常詳細信息
[3/28/13 8:15:22:630 CDT] 0000041f servlet E com.ibm.ws.webcontainer.servlet.ServletWrapper service SRVE0068E: An exception was thrown by one of the service methods of the servlet [/jsp/html/searchWCM.jsp] in application [APA_SearchWCM]. Exception created : [org.apache.abdera.parser.stax.FOMUnsupportedTextTypeException: Unsupported Text Type: text/html
at org.apache.abdera.parser.stax.FOMBuilder.getTextType(FOMBuilder.java:66)
at org.apache.abdera.parser.stax.FOMFactory.createElement(FOMFactory.java:558)
at org.apache.abdera.parser.stax.FOMBuilder.constructNode(FOMBuilder.java:108)
at org.apache.axiom.om.impl.builder.StAXOMBuilder.createOMElement(StAXOMBuilder.java:430)
at org.apache.axiom.om.impl.builder.StAXOMBuilder.createNextOMElement(StAXOMBuilder.java:298)
at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:223)
at org.apache.abdera.parser.stax.FOMBuilder.next(FOMBuilder.java:93)
at org.apache.axiom.om.impl.llom.OMContainerHelper.buildNext(OMContainerHelper.java:164)
at org.apache.axiom.om.impl.llom.OMNodeHelper.getNextOMSibling(OMNodeHelper.java:40)
at org.apache.axiom.om.impl.llom.OMNodeImpl.getNextOMSibling(OMNodeImpl.java:106)
at org.apache.axiom.om.impl.traverse.OMChildrenIterator.getNextNode(OMChildrenIterator.java:36)
at org.apache.axiom.om.impl.traverse.OMAbstractIterator.hasNext(OMAbstractIterator.java:69)
at org.apache.axiom.om.impl.traverse.OMFilterIterator.hasNext(OMFilterIterator.java:54)
at org.apache.abdera.parser.stax.util.FOMElementIteratorWrapper.hasNext(FOMElementIteratorWrapper.java:37)
at org.apache.abdera.parser.stax.util.FOMList.buffer(FOMList.java:62)
at org.apache.abdera.parser.stax.util.FOMList.get(FOMList.java:71)
at org.apache.abdera.parser.stax.util.FOMList$BufferIterator.next(FOMList.java:197)
at org.apache.abdera.parser.stax.FOMFeed.getEntry(FOMFeed.java:208)
at com.ibm.searchwcm.SearchAndFilter.getSearchResultFromServer(SearchAndFilter.java:279)
at com.ibm.searchwcm.SearchAndFilter.getSearchResult(SearchAndFilter.java:115)
at com.ibm._jsp._searchWCM._jspService(_searchWCM.java:204)
at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:99)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1224)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:774)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:456)
at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
at com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest(GenericServletWrapper.java:122)
at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.handleRequest(AbstractJSPExtensionServletWrapper.java:205)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.invokeTarget(WebAppFilterChain.java:136)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:79)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:928)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1025)
可有人告訴我如何從atom:title
刪除type="text/html"
屬性?
在您的問題中,網上唯一對'FOMUnsupportedTextHtmlType'的引用。你能包括完整的例外名稱嗎? – Joe 2013-03-28 11:57:05
嘿喬,我已經更新了我的問題。它的'FOMUnsupportedTextTypeException' – 2013-03-28 13:19:54