Unable to Create a Space Using a Custom Blueprint Template
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
Unable to create a space using a custom Blueprint template, and com.ctc.wstx.exc.WstxParsingException occurs in the logs.
Environment
Confluence Server and Data Center.
Diagnosis
This below error (or similar) occurs in atlassian-confluence.log when a non-well-formed custom Blueprint template is used while creating a space:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
2023-05-24 10:37:33,130 ERROR [http-nio-20102-exec-7 url: /confluence/rest/create-dialog/1.0/space-blueprint/create-space; user: testuser] [atlassian.event.internal.AsynchronousAbleEventDispatcher] lambda$null$0 There was an exception thrown trying to dispatch event [com.atlassian.confluence.impl.content.DefaultContentEntityManager$$Lambda$5479/0x00000008044bec40@44dd5f33] from the invoker [com.atlassian.event.internal.ComparableListenerInvoker@2c41a1f9]
-- url: /confluence/rest/create-dialog/1.0/space-blueprint/create-space | userName: testuser | referer: https://test.confluence.com/confluence/refined/admin/organizer.action | traceId: bf8efa6a0889d226
java.lang.RuntimeException: com.ctc.wstx.exc.WstxParsingException: Unexpected close tag </xml>; expected </ac:structured-macro>.
at [row,col \{unknown-source}]: [11,224]. Listener: com.atlassian.confluence.impl.content.links.LinkManagerEventListener event: com.atlassian.confluence.impl.content.DefaultContentEntityManager$$Lambda$5479/0x00000008044bec40
at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:53)
at com.atlassian.confluence.event.ConfluenceListenerHandlersConfiguration$TimedListenerInvoker.invoke(ConfluenceListenerHandlersConfiguration.java:96)
at com.atlassian.event.internal.ComparableListenerInvoker.invoke(ComparableListenerInvoker.java:48)
...
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.RuntimeException: com.ctc.wstx.exc.WstxParsingException: Unexpected close tag </xml>; expected </ac:structured-macro>.
at [row,col \{unknown-source}]: [11,224]
at org.codehaus.stax2.ri.evt.Stax2FilteredEventReader.hasNext(Stax2FilteredEventReader.java:60)
at com.atlassian.confluence.content.render.xhtml.XmlFragmentEventReader.hasNext(XmlFragmentEventReader.java:42)
...
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:42)
... 445 more
Caused by: com.ctc.wstx.exc.WstxParsingException: Unexpected close tag </xml>; expected </ac:structured-macro>.
at [row,col \{unknown-source}]: [11,224]
at com.ctc.wstx.sr.StreamScanner.constructWfcException(StreamScanner.java:634)
The above sample error message indicates that there is an issue with parsing the XML content when creating a space on Confluence. The error specifically mentions an unexpected EOF (end of file) at line 11, column 225, and it indicates that the parser was expecting a close tag for the element.
Cause
The Custom Blueprint template doesn't have a well-formed XML structure due to some syntax issues.
Solution
Make sure that all opening tags have corresponding closing tags, and that there are no typos or misplaced tags. You can use a syntax checker like the one here: XML Validator.
Was this helpful?