Connection Jira cloud instance fails for jira macro

Hi all,

I have a local xwiki installation and installed the Jira macro and the Jira Administration extensions.

In the extension, I have defined the desired jira instance (cloud version).

I have set id (“main”), username and password. I am (probably) having trouble setting the propert URL. I have tried

as well as

but when using the macro like below, I get an error message:

{{jira id="main"}}

The message reads

Failed to execute the JIRA macro. Cause: [Content is not allowed in prolog.]. Click on this message for details.

I assume either the URL is wrong (credentials are correct) or I need to enable some settings within the Jira cloud instance?

What am I missing?

Thank you in advance
best regards!

Hi, could you click on the message as mentioned and provide the details?

You could also open your browser dev tools and find the URL called on your jira instance and open a browser tab and paste that URL to see what’s the problem. And report it here with the URL that’s been generated.



clicking on the message does not do anything, strangely?

Also, in the network tab of my dev tools I cannot find a call to *, which I would expect if the call was made client-side, right?

Perhaps there’s some other misconfiguration problem?

Thank you for your help!

if you get “Content is not allowed in prolog” then it means the URL has been called IMO. Also you should be able to click for sure. Inspect the HTML DOM with your browser dev tool to see the details.


Is this an ajax call or is it loaded server-side, I wonder, as I cannot find a request made from my browser. However: while the message is not clickable, you are right, it’s in the dom (project and site names changed of course):

org.xwiki.rendering.macro.MacroExecutionException: Failed to retrieve JIRA data from [] for JQL [issueKey in (MYPROJECT-13070)]
	at org.xwiki.contrib.jira.macro.internal.source.AbstractJIRADataSource.getXMLDocument(
	at org.xwiki.contrib.jira.macro.internal.source.ListJIRADataSource.getData(
	at org.xwiki.contrib.jira.macro.internal.JIRAMacro.execute(
	at org.xwiki.contrib.jira.config.internal.AsyncJIRAMacro.executeCodeMacro(
	at org.xwiki.contrib.jira.config.internal.JIRABlockAsyncRenderer.execute(
	at org.xwiki.rendering.async.internal.block.AbstractBlockAsyncRenderer.render(
	at org.xwiki.rendering.async.internal.block.AbstractBlockAsyncRenderer.render(
	at org.xwiki.rendering.async.internal.AsyncRendererJob.runInternal(
	at org.xwiki.job.AbstractJob.runInContext(
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(
	at java.base/java.util.concurrent.ThreadPoolExecutor$
	at java.base/
Caused by: org.jdom2.input.JDOMParseException: Error on line 1: Content is not allowed in prolog.
	at org.xwiki.contrib.jira.macro.internal.source.HTTPJIRAFetcher.retrieveRemoteDocument(
	at org.xwiki.contrib.jira.macro.internal.source.HTTPJIRAFetcher.fetch(
	at org.xwiki.contrib.jira.macro.internal.source.AbstractJIRADataSource.getXMLDocument(
	... 12 more
Caused by: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.
	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)
	... 17 more

Server side. The stack trace doesn’t help much, it just says that the XML returned by your JIRA instance for that URL doesn’t contain valid XML. There’s probably an error. Maybe your instance is not public and you need to provide credentials, etc.

So you need to find the URL but indeed it doesn’t show up in the browser network tab since it’s not a client side request but one done server side…

I checked the source code and the URL is: in (MYPROJECT-13070)

Can you try opening it in your browser to see what you get?

Exactly, the site is hosted directly by atlassian and cannot be accessed without user credentials. When logging in to the site with the same credentials I apply in the Jira Administration module, I initially got a

XSRF Security Token Missing


Upon “Retry operation” (which seems to regenerate the token) I receive an rss xml file which probably is what the module expects to be delivered.

Apparently some kind of access configuration issue then.

Sorry for getting back so late, but I was on vacation.

I thought form token checking for Jira could be disabled, but apparently this is no longer true since Jira 5.X. So the problem still persists for accessing Jira tasks from within xWiki

I am surely not the only one using the cloud hosted version of Jira, so any ideas of what I may be missing?


hmm I don’t see any existing jira issue regarding this at Loading...

Maybe you could report a new issue with the max details in the description and links to the jira documentation explaining how authentication should be done by jira clients?


I am using a cloud version of Jira as well and im getting a similar error.

Any updates on this? I can’t seem to find any relevant issues in Jira.


I unfortunately did not find the time yet to gather the information to setup the JIRA task for this.

Unfortunately therefore up until now this is still not functional for me.

For the Jira cloud, an API token is needed instead of the password, in the password field of the XWiki Jira config from the administration section. The token can be created from Atlassian account.

Hope it helps,