Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-5594

"Error: Could not parse xhtml office content." on importing Office Document

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.5 RC1
    • Fix Version/s: 2.5, 2.6 RC1
    • Component/s: {Unused} Rendering 2.0
    • Labels:
      None
    • Environment:
    • keywords:
      parse, office, import
    • Difficulty:
      Unknown
    • Similar issues:

      Description

      I am receiving "Could not parse xhtml office content." on importing a new doc via Import feature from WYSIWYG editor or via Add Page from Office Document. So all I do is basically choose the file, set it to filter the styles and then upload it. In WYSIWYG I am even shown a proper looking Import but I can not get to the wiki code and previewing or saving fails. The server log shows something like this:

      2010-10-19 08:59:23,686 http://de-w-0156852/resources/js/xwiki/wysiwyg/xwe/HTMLConverter.gwtrpc ERROR converter.DefaultHTMLConverter - Failed to parse input source
      org.xwiki.rendering.parser.ParseException: Failed to parse input source
      at org.xwiki.rendering.internal.parser.wikimodel.AbstractWikiModelParser.parse(AbstractWikiModelParser.java:142)
      at org.xwiki.rendering.internal.parser.wikimodel.AbstractWikiModelParser.parse(AbstractWikiModelParser.java:97)
      at com.xpn.xwiki.wysiwyg.server.internal.converter.DefaultHTMLConverter.fromHTML(DefaultHTMLConverter.java:101)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:562)
      at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:544)
      at com.xpn.xwiki.wysiwyg.server.XWikiRemoteServiceServlet.processCall(XWikiRemoteServiceServlet.java:54)
      at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:224)
      at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      at com.xpn.xwiki.wysiwyg.server.filter.XWikiContextInitializationFilter.doFilter(XWikiContextInitializationFilter.java:87)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:242)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      at com.xpn.xwiki.plugin.webdav.XWikiDavFilter.doFilter(XWikiDavFilter.java:68)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:242)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      at org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:218)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:242)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      at org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:112)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:242)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:201)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:163)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:108)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:401)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:242)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:267)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:245)
      at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:260)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)
      Caused by: org.wikimodel.wem.WikiParserException: java.lang.ArrayIndexOutOfBoundsException: 1
      at org.wikimodel.wem.xhtml.XhtmlParser.parse(XhtmlParser.java:107)
      at org.xwiki.rendering.internal.parser.wikimodel.AbstractWikiModelParser.parse(AbstractWikiModelParser.java:140)
      ... 40 more
      Caused by: java.lang.ArrayIndexOutOfBoundsException: 1
      at org.xwiki.rendering.internal.parser.wikimodel.xhtml.XHTMLMarkerResourceReferenceParser.parse(XHTMLMarkerResourceReferenceParser.java:53)
      at org.xwiki.rendering.internal.parser.wikimodel.xhtml.XWikiCommentHandler.handleImageCommentStop(XWikiCommentHandler.java:180)
      at org.xwiki.rendering.internal.parser.wikimodel.xhtml.XWikiCommentHandler.onComment(XWikiCommentHandler.java:103)
      at org.wikimodel.wem.xhtml.impl.XhtmlHandler$TagStack.onComment(XhtmlHandler.java:347)
      at org.wikimodel.wem.xhtml.impl.XhtmlHandler.comment(XhtmlHandler.java:558)
      at org.wikimodel.wem.xhtml.filter.DefaultXMLFilter.comment(DefaultXMLFilter.java:73)
      at org.wikimodel.wem.xhtml.filter.XHTMLWhitespaceXMLFilter.comment(XHTMLWhitespaceXMLFilter.java:250)
      at org.wikimodel.wem.xhtml.filter.DefaultXMLFilter.comment(DefaultXMLFilter.java:73)
      at org.wikimodel.wem.xhtml.filter.AccumulationXMLFilter.comment(AccumulationXMLFilter.java:77)
      at org.wikimodel.wem.xhtml.filter.DefaultXMLFilter.comment(DefaultXMLFilter.java:73)
      at org.wikimodel.wem.xhtml.filter.DTDXMLFilter.comment(DTDXMLFilter.java:78)
      at org.apache.xerces.parsers.AbstractSAXParser.comment(Unknown Source)
      at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanComment(Unknown Source)
      at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
      at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
      at org.apache.xerces.parsers.XML11NonValidatingConfiguration.parse(Unknown Source)
      at org.apache.xerces.parsers.XML11NonValidatingConfiguration.parse(Unknown Source)
      at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
      at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
      at org.xml.sax.helpers.XMLFilterImpl.parse(Unknown Source)
      at org.wikimodel.wem.xhtml.filter.DefaultXMLFilter.parse(DefaultXMLFilter.java:44)
      at org.xml.sax.helpers.XMLFilterImpl.parse(Unknown Source)
      at org.wikimodel.wem.xhtml.filter.DefaultXMLFilter.parse(DefaultXMLFilter.java:44)
      at org.xml.sax.helpers.XMLFilterImpl.parse(Unknown Source)
      at org.wikimodel.wem.xhtml.filter.DefaultXMLFilter.parse(DefaultXMLFilter.java:44)
      at org.wikimodel.wem.xhtml.XhtmlParser.parse(XhtmlParser.java:104)
      ... 41 more
      2010-10-19 08:59:35,136 http://de-w-0156852/bin/preview/Normung/Pr%C3%BCffinger ERROR converter.DefaultHTMLConverter - Failed to parse input source
      org.xwiki.rendering.parser.ParseException: Failed to parse input source
      at org.xwiki.rendering.internal.parser.wikimodel.AbstractWikiModelParser.parse(AbstractWikiModelParser.java:142)
      at org.xwiki.rendering.internal.parser.wikimodel.AbstractWikiModelParser.parse(AbstractWikiModelParser.java:97)
      at com.xpn.xwiki.wysiwyg.server.internal.converter.DefaultHTMLConverter.fromHTML(DefaultHTMLConverter.java:101)
      at com.xpn.xwiki.wysiwyg.server.filter.ConversionFilter.doFilter(ConversionFilter.java:117)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:242)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      at com.xpn.xwiki.plugin.webdav.XWikiDavFilter.doFilter(XWikiDavFilter.java:68)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:242)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      at org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:218)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:242)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      at org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:112)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:242)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:201)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:163)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:108)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:401)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:242)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:267)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:245)
      at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:260)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)
      Caused by: org.wikimodel.wem.WikiParserException: java.lang.ArrayIndexOutOfBoundsException: 1
      at org.wikimodel.wem.xhtml.XhtmlParser.parse(XhtmlParser.java:107)
      at org.xwiki.rendering.internal.parser.wikimodel.AbstractWikiModelParser.parse(AbstractWikiModelParser.java:140)
      ... 27 more
      Caused by: java.lang.ArrayIndexOutOfBoundsException: 1
      at org.xwiki.rendering.internal.parser.wikimodel.xhtml.XHTMLMarkerResourceReferenceParser.parse(XHTMLMarkerResourceReferenceParser.java:53)
      at org.xwiki.rendering.internal.parser.wikimodel.xhtml.XWikiCommentHandler.handleImageCommentStop(XWikiCommentHandler.java:180)
      at org.xwiki.rendering.internal.parser.wikimodel.xhtml.XWikiCommentHandler.onComment(XWikiCommentHandler.java:103)
      at org.wikimodel.wem.xhtml.impl.XhtmlHandler$TagStack.onComment(XhtmlHandler.java:347)
      at org.wikimodel.wem.xhtml.impl.XhtmlHandler.comment(XhtmlHandler.java:558)
      at org.wikimodel.wem.xhtml.filter.DefaultXMLFilter.comment(DefaultXMLFilter.java:73)
      at org.wikimodel.wem.xhtml.filter.XHTMLWhitespaceXMLFilter.comment(XHTMLWhitespaceXMLFilter.java:250)
      at org.wikimodel.wem.xhtml.filter.DefaultXMLFilter.comment(DefaultXMLFilter.java:73)
      at org.wikimodel.wem.xhtml.filter.AccumulationXMLFilter.comment(AccumulationXMLFilter.java:77)
      at org.wikimodel.wem.xhtml.filter.DefaultXMLFilter.comment(DefaultXMLFilter.java:73)
      at org.wikimodel.wem.xhtml.filter.DTDXMLFilter.comment(DTDXMLFilter.java:78)
      at org.apache.xerces.parsers.AbstractSAXParser.comment(Unknown Source)
      at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanComment(Unknown Source)
      at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
      at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
      at org.apache.xerces.parsers.XML11NonValidatingConfiguration.parse(Unknown Source)
      at org.apache.xerces.parsers.XML11NonValidatingConfiguration.parse(Unknown Source)
      at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
      at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
      at org.xml.sax.helpers.XMLFilterImpl.parse(Unknown Source)
      at org.wikimodel.wem.xhtml.filter.DefaultXMLFilter.parse(DefaultXMLFilter.java:44)
      at org.xml.sax.helpers.XMLFilterImpl.parse(Unknown Source)
      at org.wikimodel.wem.xhtml.filter.DefaultXMLFilter.parse(DefaultXMLFilter.java:44)
      at org.xml.sax.helpers.XMLFilterImpl.parse(Unknown Source)
      at org.wikimodel.wem.xhtml.filter.DefaultXMLFilter.parse(DefaultXMLFilter.java:44)
      at org.wikimodel.wem.xhtml.XhtmlParser.parse(XhtmlParser.java:104)
      ... 28 more
      2010-10-19 08:59:35,152 http://de-w-0156852/bin/preview/Normung/Pr%C3%BCffinger ERROR filter.ConversionFilter - Exception while parsing HTML
      java.lang.RuntimeException: Exception while parsing HTML
      at com.xpn.xwiki.wysiwyg.server.internal.converter.DefaultHTMLConverter.fromHTML(DefaultHTMLConverter.java:111)
      at com.xpn.xwiki.wysiwyg.server.filter.ConversionFilter.doFilter(ConversionFilter.java:117)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:242)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      at com.xpn.xwiki.plugin.webdav.XWikiDavFilter.doFilter(XWikiDavFilter.java:68)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:242)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      at org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:218)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:242)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      at org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:112)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:242)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:201)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:163)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:108)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:401)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:242)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:267)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:245)
      at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:260)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)
      Caused by: org.xwiki.rendering.parser.ParseException: Failed to parse input source
      at org.xwiki.rendering.internal.parser.wikimodel.AbstractWikiModelParser.parse(AbstractWikiModelParser.java:142)
      at org.xwiki.rendering.internal.parser.wikimodel.AbstractWikiModelParser.parse(AbstractWikiModelParser.java:97)
      at com.xpn.xwiki.wysiwyg.server.internal.converter.DefaultHTMLConverter.fromHTML(DefaultHTMLConverter.java:101)
      ... 25 more
      Caused by: org.wikimodel.wem.WikiParserException: java.lang.ArrayIndexOutOfBoundsException: 1
      at org.wikimodel.wem.xhtml.XhtmlParser.parse(XhtmlParser.java:107)
      at org.xwiki.rendering.internal.parser.wikimodel.AbstractWikiModelParser.parse(AbstractWikiModelParser.java:140)
      ... 27 more
      Caused by: java.lang.ArrayIndexOutOfBoundsException: 1
      at org.xwiki.rendering.internal.parser.wikimodel.xhtml.XHTMLMarkerResourceReferenceParser.parse(XHTMLMarkerResourceReferenceParser.java:53)
      at org.xwiki.rendering.internal.parser.wikimodel.xhtml.XWikiCommentHandler.handleImageCommentStop(XWikiCommentHandler.java:180)
      at org.xwiki.rendering.internal.parser.wikimodel.xhtml.XWikiCommentHandler.onComment(XWikiCommentHandler.java:103)
      at org.wikimodel.wem.xhtml.impl.XhtmlHandler$TagStack.onComment(XhtmlHandler.java:347)
      at org.wikimodel.wem.xhtml.impl.XhtmlHandler.comment(XhtmlHandler.java:558)
      at org.wikimodel.wem.xhtml.filter.DefaultXMLFilter.comment(DefaultXMLFilter.java:73)
      at org.wikimodel.wem.xhtml.filter.XHTMLWhitespaceXMLFilter.comment(XHTMLWhitespaceXMLFilter.java:250)
      at org.wikimodel.wem.xhtml.filter.DefaultXMLFilter.comment(DefaultXMLFilter.java:73)
      at org.wikimodel.wem.xhtml.filter.AccumulationXMLFilter.comment(AccumulationXMLFilter.java:77)
      at org.wikimodel.wem.xhtml.filter.DefaultXMLFilter.comment(DefaultXMLFilter.java:73)
      at org.wikimodel.wem.xhtml.filter.DTDXMLFilter.comment(DTDXMLFilter.java:78)
      at org.apache.xerces.parsers.AbstractSAXParser.comment(Unknown Source)
      at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanComment(Unknown Source)
      at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
      at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
      at org.apache.xerces.parsers.XML11NonValidatingConfiguration.parse(Unknown Source)
      at org.apache.xerces.parsers.XML11NonValidatingConfiguration.parse(Unknown Source)
      at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
      at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
      at org.xml.sax.helpers.XMLFilterImpl.parse(Unknown Source)
      at org.wikimodel.wem.xhtml.filter.DefaultXMLFilter.parse(DefaultXMLFilter.java:44)
      at org.xml.sax.helpers.XMLFilterImpl.parse(Unknown Source)
      at org.wikimodel.wem.xhtml.filter.DefaultXMLFilter.parse(DefaultXMLFilter.java:44)
      at org.xml.sax.helpers.XMLFilterImpl.parse(Unknown Source)
      at org.wikimodel.wem.xhtml.filter.DefaultXMLFilter.parse(DefaultXMLFilter.java:44)
      at org.wikimodel.wem.xhtml.XhtmlParser.parse(XhtmlParser.java:104)
      ... 28 more

      I'll attach a file that does not work for me. Note that I edited the "EasyDMS" links host for obvious reasons.

        Attachments

          Activity

            People

            • Assignee:
              tmortagne Thomas Mortagne
              Reporter:
              stulle Stulle Ich
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: