Only whitespace content allowed before start tag when trying to view project within JIRA Software
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
Symptoms
Trying to while a particular project within JIRA Software results in a huge stack trace dump in the browser.
The following appears in the atlassian-jira.log
:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
2012-06-21 15:30:59,960 http-443-24 ERROR jira 930x1724x1 1g1zmie xxx.xxx.xxx.xxx /secure/VersionBoard.jspa [com.atlassian.velocity.DefaultVelocityManager] MethodInvocationException occurred getting message body from Velocity: com.thoughtworks.xstream.io.StreamException: : only whitespace content allowed before start tag and not ! (position: START_DOCUMENT seen !... @1:1)
com.thoughtworks.xstream.io.StreamException: : only whitespace content allowed before start tag and not ! (position: START_DOCUMENT seen !... @1:1)
at com.thoughtworks.xstream.io.xml.XppReader.next(XppReader.java:83)
at com.thoughtworks.xstream.io.xml.XppReader.read(XppReader.java:135)
at com.thoughtworks.xstream.io.xml.XppReader.moveDown(XppReader.java:94)
at com.thoughtworks.xstream.io.xml.XppReader.<init>(XppReader.java:31)
at com.thoughtworks.xstream.io.xml.XppDriver.createReader(XppDriver.java:22)
at com.thoughtworks.xstream.XStream.fromXML(XStream.java:505)
at com.thoughtworks.xstream.XStream.fromXML(XStream.java:496)
at com.pyxis.greenhopper.jira.configurations.UserBoardsPreferences.loadFromDatabase(UserBoardsPreferences.java:347)
at com.pyxis.greenhopper.jira.configurations.UserBoardsPreferences.<init>(UserBoardsPreferences.java:65)
at com.atlassian.greenhopper.service.configuration.UserBoardsPreferencesServiceImpl.getUserPreferences(UserBoardsPreferencesServiceImpl.java:52)
at com.atlassian.greenhopper.service.configuration.UserBoardsPreferencesServiceImpl.getPreferences(UserBoardsPreferencesServiceImpl.java:39)
at com.pyxis.greenhopper.jira.boards.context.DefaultBoardContext.getPreferences(DefaultBoardContext.java:204)
at com.pyxis.greenhopper.jira.configurations.context.ContextImpl.<init>(ContextImpl.java:55)
at com.pyxis.greenhopper.jira.configurations.context.DefaultContext.<init>(DefaultContext.java:14)
at com.pyxis.greenhopper.jira.configurations.context.Contexts.getDefaultContext(Contexts.java:136)
at com.pyxis.greenhopper.jira.configurations.context.Contexts.get(Contexts.java:28)
at com.pyxis.greenhopper.jira.configurations.UserBoardSettings.getSelectedContext(UserBoardSettings.java:112)
at com.pyxis.greenhopper.jira.boards.context.DefaultBoardContext.getSelectedContext(DefaultBoardContext.java:319)
...
Caused by: org.xmlpull.v1.XmlPullParserException: only whitespace content allowed before start tag and not ! (position: START_DOCUMENT seen !... @1:1)
at org.xmlpull.mxp1.MXParser.parseProlog(MXParser.java:1487)
at org.xmlpull.mxp1.MXParser.nextImpl(MXParser.java:1363)
at org.xmlpull.mxp1.MXParser.next(MXParser.java:1061)
at com.thoughtworks.xstream.io.xml.XppReader.next(XppReader.java:81)
... 194 more
Cause
JIRA Software's configurations are stored as XML within the database. With that, if the XML is invalid, it can result in the above.
For example, a normal entry may look like this:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
id | propertyvalue
------------------------
10399 | <map>
: <entry>
: <string>GH_gh.issue.releasedVersionHistoryField</string>
: <string>customfield_10006</string>
: </entry>
: <entry>
: <string>FIX_VERSION_SYNCHER</string>
: <boolean>false</boolean>
: </entry>
: <entry>
: <string>gh.configuration.rapidboard.scrum</string>
: <boolean>true</boolean>
: </entry>
: </map>
Problematic entry:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
id | propertyvalue
------------------------
10399 | ![CDATA[<map>
: <entry>
: <string>GH_gh.issue.releasedVersionHistoryField</string>
: <string>customfield_10006</string>
: </entry>
: <entry>
: <string>FIX_VERSION_SYNCHER</string>
: <boolean>false</boolean>
: </entry>
: <entry>
: <string>gh.configuration.rapidboard.scrum</string>
: <boolean>true</boolean>
: </entry>
: </map>]]
Workaround
Remove the problematic entry from both the propertyentry and propertytext tables.
Back up your data first.
Resolution
Back up your data first.
Only attempt this if you are comfortable with database administration.
Identify the problematic XML:
Identify the Project's ID:
1
select * from project;
Identify the Project's configurations (this may return quite a few results):
1
select * from propertytext where ID in (select ID from propertyentry where property_key = 'GREENHOPPER%XXXXX');
With the list of results, check the XML data. Note that this may return a large list of results
Once the problematic XML is found, update the entry with the proper format
Was this helpful?