Uploaded image for project: 'JIRA Components'
  1. JIRA Components
  2. JIRA-76

Jira macro doesn't work with some versions of Jira returning a DOCTYPE

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 10.1.2
    • 8.6.5
    • API
    • None
    • Unknown
    • N/A
    • N/A

    Description

      Jira macro fails with this error

      when displaying issues from a jira server v9.12.18.

      The full exception is:

      Failed to execute the JIRA macro. Cause: [DOCTYPE is disallowed when the feature "http://apache.org/xml/features/disallow-doctype-decl" set to true.]. Click on this message for details.
      
      org.xwiki.rendering.macro.MacroExecutionException: Failed to retrieve JIRA data from [redacted] for JQL [issueKey in (redacted)]
       at wiki:xwiki//org.xwiki.contrib.jira.macro.internal.source.AbstractJIRADataSource.getXMLDocument(AbstractJIRADataSource.java:87)
       at wiki:xwiki//org.xwiki.contrib.jira.macro.internal.source.ListJIRADataSource.getData(ListJIRADataSource.java:78)
       at wiki:xwiki//org.xwiki.contrib.jira.macro.internal.JIRAMacro.execute(JIRAMacro.java:88)
       at wiki:xwiki//org.xwiki.contrib.jira.config.internal.AsyncJIRAMacro.executeCodeMacro(AsyncJIRAMacro.java:99)
       at wiki:xwiki//org.xwiki.contrib.jira.config.internal.JIRABlockAsyncRenderer.execute(JIRABlockAsyncRenderer.java:116)
       at org.xwiki.rendering.async.internal.block.AbstractBlockAsyncRenderer.render(AbstractBlockAsyncRenderer.java:157)
       at org.xwiki.rendering.async.internal.block.AbstractBlockAsyncRenderer.render(AbstractBlockAsyncRenderer.java:54)
       at org.xwiki.rendering.async.internal.DefaultAsyncRendererExecutor.syncRender(DefaultAsyncRendererExecutor.java:290)
       at org.xwiki.rendering.async.internal.DefaultAsyncRendererExecutor.render(DefaultAsyncRendererExecutor.java:267)
       at org.xwiki.rendering.async.internal.block.DefaultBlockAsyncRendererExecutor.execute(DefaultBlockAsyncRendererExecutor.java:125)
       at wiki:xwiki//org.xwiki.contrib.jira.config.internal.AsyncJIRAMacro.execute(AsyncJIRAMacro.java:88)
       at wiki:xwiki//org.xwiki.contrib.jira.config.internal.AsyncJIRAMacro.execute(AsyncJIRAMacro.java:52)
       at org.xwiki.rendering.internal.transformation.macro.MacroTransformation.transform(MacroTransformation.java:311)
       at org.xwiki.rendering.internal.transformation.DefaultRenderingContext.transformInContext(DefaultRenderingContext.java:183)
       at org.xwiki.rendering.internal.transformation.DefaultTransformationManager.performTransformations(DefaultTransformationManager.java:88)
       at org.xwiki.display.internal.DocumentContentAsyncExecutor.executeInCurrentExecutionContext(DocumentContentAsyncExecutor.java:396)
       at org.xwiki.display.internal.DocumentContentAsyncExecutor.execute(DocumentContentAsyncExecutor.java:269)
       at org.xwiki.display.internal.DocumentContentAsyncRenderer.execute(DocumentContentAsyncRenderer.java:112)
       at org.xwiki.rendering.async.internal.block.AbstractBlockAsyncRenderer.render(AbstractBlockAsyncRenderer.java:157)
       at org.xwiki.rendering.async.internal.block.AbstractBlockAsyncRenderer.render(AbstractBlockAsyncRenderer.java:54)
       at org.xwiki.rendering.async.internal.DefaultAsyncRendererExecutor.syncRender(DefaultAsyncRendererExecutor.java:290)
       at org.xwiki.rendering.async.internal.DefaultAsyncRendererExecutor.render(DefaultAsyncRendererExecutor.java:267)
       at org.xwiki.rendering.async.internal.block.DefaultBlockAsyncRendererExecutor.execute(DefaultBlockAsyncRendererExecutor.java:125)
       at org.xwiki.display.internal.DocumentContentDisplayer.display(DocumentContentDisplayer.java:67)
       at org.xwiki.display.internal.DocumentContentDisplayer.display(DocumentContentDisplayer.java:43)
       at org.xwiki.display.internal.DefaultDocumentDisplayer.display(DefaultDocumentDisplayer.java:96)
       at org.xwiki.display.internal.DefaultDocumentDisplayer.display(DefaultDocumentDisplayer.java:39)
       at org.xwiki.sheet.internal.SheetDocumentDisplayer.display(SheetDocumentDisplayer.java:123)
       at org.xwiki.sheet.internal.SheetDocumentDisplayer.display(SheetDocumentDisplayer.java:52)
       at org.xwiki.display.internal.ConfiguredDocumentDisplayer.display(ConfiguredDocumentDisplayer.java:68)
       at org.xwiki.display.internal.ConfiguredDocumentDisplayer.display(ConfiguredDocumentDisplayer.java:42)
       at com.xpn.xwiki.doc.XWikiDocument.display(XWikiDocument.java:1389)
       at com.xpn.xwiki.doc.XWikiDocument.getRenderedContent(XWikiDocument.java:1712)
       at com.xpn.xwiki.doc.XWikiDocument.getRenderedContent(XWikiDocument.java:1622)
       at com.xpn.xwiki.doc.XWikiDocument.getRenderedContent(XWikiDocument.java:1576)
       at com.xpn.xwiki.api.Document.getRenderedContent(Document.java:860)
       at com.xpn.xwiki.api.Document.getRenderedContentRestricted(Document.java:846)
       at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
       at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
       at java.base/java.lang.reflect.Method.invoke(Method.java:569)
       at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.doInvoke(UberspectImpl.java:571)
       at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:554)
       at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:221)
       at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:368)
       at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:492)
       at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:147)
       at org.apache.velocity.runtime.directive.VelocimacroProxy.render(VelocimacroProxy.java:218)
       at org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacro.java:331)
       at org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacro.java:261)
       at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:304)
       at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:147)
       at org.apache.velocity.runtime.directive.Foreach.renderBlock(Foreach.java:309)
       at org.apache.velocity.runtime.directive.Foreach.render(Foreach.java:279)
       at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:304)
       at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:147)
       at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:171)
       at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:147)
       at org.apache.velocity.runtime.directive.VelocimacroProxy.render(VelocimacroProxy.java:218)
       at org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacro.java:331)
       at org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacro.java:261)
       at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:304)
       at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:147)
       at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:171)
       at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:147)
       at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:439)
       at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:190)
       at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:439)
       at org.apache.velocity.Template.merge(Template.java:358)
       at org.apache.velocity.Template.merge(Template.java:262)
       at org.xwiki.velocity.internal.InternalVelocityEngine.evaluate(InternalVelocityEngine.java:225)
       at com.xpn.xwiki.internal.template.VelocityTemplateEvaluator.evaluateContent(VelocityTemplateEvaluator.java:105)
       at com.xpn.xwiki.internal.template.TemplateAsyncRenderer.evaluateContent(TemplateAsyncRenderer.java:219)
       at com.xpn.xwiki.internal.template.TemplateAsyncRenderer.renderVelocity(TemplateAsyncRenderer.java:174)
       at com.xpn.xwiki.internal.template.TemplateAsyncRenderer.render(TemplateAsyncRenderer.java:135)
       at com.xpn.xwiki.internal.template.TemplateAsyncRenderer.render(TemplateAsyncRenderer.java:54)
       at org.xwiki.rendering.async.internal.DefaultAsyncRendererExecutor.lambda$syncRender$0(DefaultAsyncRendererExecutor.java:284)
       at com.xpn.xwiki.internal.security.authorization.DefaultAuthorExecutor.call(DefaultAuthorExecutor.java:98)
       at org.xwiki.rendering.async.internal.DefaultAsyncRendererExecutor.syncRender(DefaultAsyncRendererExecutor.java:284)
       at org.xwiki.rendering.async.internal.DefaultAsyncRendererExecutor.render(DefaultAsyncRendererExecutor.java:267)
       at org.xwiki.rendering.async.internal.block.DefaultBlockAsyncRendererExecutor.render(DefaultBlockAsyncRendererExecutor.java:154)
       at com.xpn.xwiki.internal.template.InternalTemplateManager.render(InternalTemplateManager.java:904)
       at com.xpn.xwiki.internal.template.InternalTemplateManager.renderFromSkin(InternalTemplateManager.java:866)
       at com.xpn.xwiki.internal.template.InternalTemplateManager.render(InternalTemplateManager.java:853)
       at com.xpn.xwiki.internal.template.InternalTemplateManager.renderNoException(InternalTemplateManager.java:808)
       at com.xpn.xwiki.internal.template.InternalTemplateManager.renderNoException(InternalTemplateManager.java:800)
       at com.xpn.xwiki.internal.template.DefaultTemplateManager.renderNoException(DefaultTemplateManager.java:79)
       at com.xpn.xwiki.internal.template.DefaultTemplateManager.renderNoException(DefaultTemplateManager.java:73)
       at org.xwiki.template.script.TemplateScriptService.render(TemplateScriptService.java:54)
       at jdk.internal.reflect.GeneratedMethodAccessor277.invoke(Unknown Source)
       at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
       at java.base/java.lang.reflect.Method.invoke(Method.java:569)
       at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.doInvoke(UberspectImpl.java:571)
       at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:554)
       at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:221)
       at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:368)
       at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:492)
       at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:147)
       at org.apache.velocity.runtime.directive.VelocimacroProxy.render(VelocimacroProxy.java:218)
       at org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacro.java:331)
       at org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacro.java:261)
       at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:304)
       at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:147)
       at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:171)
       at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:439)
       at org.apache.velocity.Template.merge(Template.java:358)
       at org.apache.velocity.Template.merge(Template.java:262)
       at org.xwiki.velocity.internal.InternalVelocityEngine.evaluate(InternalVelocityEngine.java:225)
       at com.xpn.xwiki.internal.template.VelocityTemplateEvaluator.evaluateContent(VelocityTemplateEvaluator.java:105)
       at com.xpn.xwiki.internal.template.TemplateAsyncRenderer.evaluateContent(TemplateAsyncRenderer.java:219)
       at com.xpn.xwiki.internal.template.TemplateAsyncRenderer.renderVelocity(TemplateAsyncRenderer.java:174)
       at com.xpn.xwiki.internal.template.TemplateAsyncRenderer.render(TemplateAsyncRenderer.java:135)
       at com.xpn.xwiki.internal.template.TemplateAsyncRenderer.render(TemplateAsyncRenderer.java:54)
       at org.xwiki.rendering.async.internal.DefaultAsyncRendererExecutor.lambda$syncRender$0(DefaultAsyncRendererExecutor.java:284)
       at com.xpn.xwiki.internal.security.authorization.DefaultAuthorExecutor.call(DefaultAuthorExecutor.java:98)
       at org.xwiki.rendering.async.internal.DefaultAsyncRendererExecutor.syncRender(DefaultAsyncRendererExecutor.java:284)
       at org.xwiki.rendering.async.internal.DefaultAsyncRendererExecutor.render(DefaultAsyncRendererExecutor.java:267)
       at org.xwiki.rendering.async.internal.block.DefaultBlockAsyncRendererExecutor.render(DefaultBlockAsyncRendererExecutor.java:154)
       at com.xpn.xwiki.internal.template.InternalTemplateManager.render(InternalTemplateManager.java:904)
       at com.xpn.xwiki.internal.template.InternalTemplateManager.renderFromSkin(InternalTemplateManager.java:866)
       at com.xpn.xwiki.internal.template.InternalTemplateManager.renderFromSkin(InternalTemplateManager.java:846)
       at com.xpn.xwiki.internal.template.InternalTemplateManager.render(InternalTemplateManager.java:832)
       at com.xpn.xwiki.internal.template.DefaultTemplateManager.render(DefaultTemplateManager.java:91)
       at com.xpn.xwiki.internal.template.DefaultTemplateManager.render(DefaultTemplateManager.java:85)
       at com.xpn.xwiki.XWiki.evaluateTemplate(XWiki.java:2564)
       at com.xpn.xwiki.web.Utils.parseTemplate(Utils.java:180)
       at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:651)
       at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:339)
       at com.xpn.xwiki.web.LegacyActionServlet.service(LegacyActionServlet.java:108)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:733)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
       at com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:122)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
       at org.xwiki.wysiwyg.filter.ConversionFilter.doFilter(ConversionFilter.java:61)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
       at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
       at org.xwiki.container.servlet.filters.internal.SetHTTPHeaderFilter.doFilter(SetHTTPHeaderFilter.java:63)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
       at org.xwiki.resource.servlet.RoutingFilter.doFilter(RoutingFilter.java:132)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
       at org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:208)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
       at org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:117)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)
       at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:542)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:143)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
       at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:687)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
       at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:764)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:354)
       at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:382)
       at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
       at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:888)
       at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1684)
       at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
       at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
       at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
       at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
       at java.base/java.lang.Thread.run(Thread.java:840)
      Caused by: java.lang.RuntimeException: org.jdom2.input.JDOMParseException: Error on line 1: DOCTYPE is disallowed when the feature "http://apache.org/xml/features/disallow-doctype-decl" set to true.
       at wiki:xwiki//org.xwiki.contrib.jira.macro.internal.HTTPJIRAFetcher.lambda$fetch$0(HTTPJIRAFetcher.java:79)
       at wiki:xwiki//org.xwiki.contrib.jira.macro.internal.HTTPJIRAFetcher.performRequest(HTTPJIRAFetcher.java:125)
       at wiki:xwiki//org.xwiki.contrib.jira.macro.internal.HTTPJIRAFetcher.fetch(HTTPJIRAFetcher.java:75)
       at wiki:xwiki//org.xwiki.contrib.jira.macro.internal.source.AbstractJIRADataSource.getXMLDocument(AbstractJIRADataSource.java:85)
       ... 170 more
      Caused by: org.jdom2.input.JDOMParseException: Error on line 1: DOCTYPE is disallowed when the feature "http://apache.org/xml/features/disallow-doctype-decl" set to true.
       at org.jdom2.input.sax.SAXBuilderEngine.build(SAXBuilderEngine.java:234)
       at org.jdom2.input.sax.SAXBuilderEngine.build(SAXBuilderEngine.java:253)
       at org.jdom2.input.SAXBuilder.build(SAXBuilder.java:1079)
       at wiki:xwiki//org.xwiki.contrib.jira.macro.internal.HTTPJIRAFetcher.lambda$fetch$0(HTTPJIRAFetcher.java:77)
       ... 173 more
      Caused by: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 10; DOCTYPE is disallowed when the feature "http://apache.org/xml/features/disallow-doctype-decl" set to true.
       at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
       at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
       at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
       at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
       at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
       at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown Source)
       at org.apache.xerces.impl.XMLDocumentScannerImpl$PrologDispatcher.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.XML11Configuration.parse(Unknown Source)
       at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
       at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
       at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
       at org.jdom2.input.sax.SAXBuilderEngine.build(SAXBuilderEngine.java:217)
       ... 176 more
      

      Attachments

        Issue Links

          Activity

            People

              vmassol Vincent Massol
              lucaa Anca Luca
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: