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

PDF generation failed when the page content titles with the same name

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.9.1252
    • Fix Version/s: 1.0 B1
    • Component/s: {Unused} Wiki features
    • Labels:
      None
    • Environment:
      RedHat 4 - Linux 2.6.9
      JDK JRockit 1.5.0_6
      Tomcat 5.5.17
      JAVA_OPTS="-server -Dfile.encoding=UTF-8"
      The encoding is UTF-8 (web.xml, xwiki.cfg, velocity.properties)
    • keywords:
      pdf xmlfo
    • Similar issues:

      Description

      When I have the following content in my Wiki page :
      1 Test
      1.1 First
      1.1 Second

      1 2nd Test
      1.1 First
      1.1 Third

      If I tried to generate the PDF from that page, I could open the file since it would be empty.

      I have the following error message:
      line 5 column 1 - Warning: <html> has XML attribute "xml:lang"
      [ERROR] Logger not set
      [WARNING] Screen logger not set - Using ConsoleLogger.
      [INFO] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser
      [INFO] building formatting object tree
      [INFO] setting up fonts
      [ERROR] property - "xml:lang" is not implemented yet.
      [INFO] [1]
      14:37:59,223 WARN http-8080-Processor25 http://www2.objectweb.org:8080/xwiki/bin/pdf/Main/Test XWikiAction:execute:185 - Uncaught exception: Error number 12002 in 12: Exception while exporting PDF
      Wrapped Exception: null:17:260 The id "HFirst" already exists in this document
      com.xpn.xwiki.XWikiException: Error number 12002 in 12: Exception while exporting PDF
      Wrapped Exception: null:17:260 The id "HFirst" already exists in this document
      at com.xpn.xwiki.pdf.impl.PdfExportImpl.exportXMLFO(PdfExportImpl.java:107)
      at com.xpn.xwiki.pdf.impl.PdfExportImpl.exportXHtml(PdfExportImpl.java:87)
      at com.xpn.xwiki.pdf.impl.PdfExportImpl.exportHtml(PdfExportImpl.java:115)
      at com.xpn.xwiki.pdf.impl.PdfExportImpl.export(PdfExportImpl.java:129)
      at com.xpn.xwiki.pdf.impl.PdfExportImpl.exportToPDF(PdfExportImpl.java:119)
      at com.xpn.xwiki.web.PDFAction.render(PDFAction.java:45)
      at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:146)
      at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
      at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
      at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
      at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:127)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
      at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
      at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
      at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
      at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
      at java.lang.Thread.run(Thread.java:595)

      Wrapped Exception:

      org.apache.fop.apps.FOPException: null:17:260 The id "HFirst" already exists in this document
      at org.apache.fop.datatypes.IDReferences.createID(IDReferences.java:119)
      at org.apache.fop.fo.FObjMixed.layout(FObjMixed.java:116)
      at org.apache.fop.fo.flow.Block.layout(Block.java:257)
      at org.apache.fop.fo.flow.Block.layout(Block.java:257)
      at org.apache.fop.fo.flow.Block.layout(Block.java:257)
      at org.apache.fop.fo.flow.AbstractFlow.layout(AbstractFlow.java:154)
      at org.apache.fop.fo.flow.AbstractFlow.layout(AbstractFlow.java:110)
      at org.apache.fop.fo.pagination.PageSequence.makePage(PageSequence.java:400)
      at org.apache.fop.fo.pagination.PageSequence.format(PageSequence.java:338)
      at org.apache.fop.apps.StreamRenderer.render(StreamRenderer.java:262)
      at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:223)
      at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
      at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(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.XML11Configuration.parse(Unknown Source)
      at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
      at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
      at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
      at org.apache.fop.apps.Driver.render(Driver.java:498)
      at org.apache.fop.apps.Driver.run(Driver.java:565)
      at com.xpn.xwiki.pdf.impl.PdfExportImpl.exportXMLFO(PdfExportImpl.java:105)
      at com.xpn.xwiki.pdf.impl.PdfExportImpl.exportXHtml(PdfExportImpl.java:87)
      at com.xpn.xwiki.pdf.impl.PdfExportImpl.exportHtml(PdfExportImpl.java:115)
      at com.xpn.xwiki.pdf.impl.PdfExportImpl.export(PdfExportImpl.java:129)
      at com.xpn.xwiki.pdf.impl.PdfExportImpl.exportToPDF(PdfExportImpl.java:119)
      at com.xpn.xwiki.web.PDFAction.render(PDFAction.java:45)
      at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:146)
      at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
      at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
      at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
      at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:127)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
      at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
      at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
      at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
      at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
      at java.lang.Thread.run(Thread.java:595)
      com.xpn.xwiki.XWikiException: Error number 12002 in 12: Exception while exporting PDF
      Wrapped Exception: null:17:260 The id "HFirst" already exists in this document
      at com.xpn.xwiki.pdf.impl.PdfExportImpl.exportXMLFO(PdfExportImpl.java:107)
      at com.xpn.xwiki.pdf.impl.PdfExportImpl.exportXHtml(PdfExportImpl.java:87)
      at com.xpn.xwiki.pdf.impl.PdfExportImpl.exportHtml(PdfExportImpl.java:115)
      at com.xpn.xwiki.pdf.impl.PdfExportImpl.export(PdfExportImpl.java:129)
      at com.xpn.xwiki.pdf.impl.PdfExportImpl.exportToPDF(PdfExportImpl.java:119)
      at com.xpn.xwiki.web.PDFAction.render(PDFAction.java:45)
      at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:146)
      at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
      at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
      at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
      at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:127)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
      at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
      at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
      at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
      at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
      at java.lang.Thread.run(Thread.java:595)

      Wrapped Exception:

      org.apache.fop.apps.FOPException: null:17:260 The id "HFirst" already exists in this document
      at org.apache.fop.datatypes.IDReferences.createID(IDReferences.java:119)
      at org.apache.fop.fo.FObjMixed.layout(FObjMixed.java:116)
      at org.apache.fop.fo.flow.Block.layout(Block.java:257)
      at org.apache.fop.fo.flow.Block.layout(Block.java:257)
      at org.apache.fop.fo.flow.Block.layout(Block.java:257)
      at org.apache.fop.fo.flow.AbstractFlow.layout(AbstractFlow.java:154)
      at org.apache.fop.fo.flow.AbstractFlow.layout(AbstractFlow.java:110)
      at org.apache.fop.fo.pagination.PageSequence.makePage(PageSequence.java:400)
      at org.apache.fop.fo.pagination.PageSequence.format(PageSequence.java:338)
      at org.apache.fop.apps.StreamRenderer.render(StreamRenderer.java:262)
      at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:223)
      at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
      at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(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.XML11Configuration.parse(Unknown Source)
      at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
      at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
      at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
      at org.apache.fop.apps.Driver.render(Driver.java:498)
      at org.apache.fop.apps.Driver.run(Driver.java:565)
      at com.xpn.xwiki.pdf.impl.PdfExportImpl.exportXMLFO(PdfExportImpl.java:105)
      at com.xpn.xwiki.pdf.impl.PdfExportImpl.exportXHtml(PdfExportImpl.java:87)
      at com.xpn.xwiki.pdf.impl.PdfExportImpl.exportHtml(PdfExportImpl.java:115)
      at com.xpn.xwiki.pdf.impl.PdfExportImpl.export(PdfExportImpl.java:129)
      at com.xpn.xwiki.pdf.impl.PdfExportImpl.exportToPDF(PdfExportImpl.java:119)
      at com.xpn.xwiki.web.PDFAction.render(PDFAction.java:45)
      at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:146)
      at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
      at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
      at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
      at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:127)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
      at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
      at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
      at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
      at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
      at java.lang.Thread.run(Thread.java:595)
      java.lang.IllegalStateException: "getOutputStream()" a déjà été appelé pour cette réponse
      at org.apache.catalina.connector.Response.getWriter(Response.java:599)
      at org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFacade.java:195)
      at com.xpn.xwiki.web.XWikiServletResponse.getWriter(XWikiServletResponse.java:97)
      at com.xpn.xwiki.web.Utils.parseTemplate(Utils.java:117)
      at com.xpn.xwiki.web.Utils.parseTemplate(Utils.java:52)
      at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:187)
      at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
      at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
      at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
      at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:127)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
      at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
      at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
      at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
      at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
      at java.lang.Thread.run(Thread.java:595)

        Attachments

          Activity

            People

            • Assignee:
              jeremi jeremi Joslin
              Reporter:
              moghrabi Xavier MOGHRABI
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Date of First Response: