com.atlassian.confluence.content.render.xhtml.XhtmlParsingException: The XML content could not be parsed. There is a problem at line 1, column 709. Parser message: Unexpected character ' ' (code 32) (missing name?) at [row,col {unknown-source}]: [1,709]

Atlassian JIRA | Adam Laskowski | 4 years ago
  1. 0

    If a user has a character in their profile description, the XML parser for Team Calendars will throw this error message during the nightly or manually-triggered indexing tasks: {code} 2013-03-26 16:42:00,034 ERROR [scheduler_Worker-2] [confluence.extra.calendar3.DefaultEmbeddedSubCalendarsParser] getEmbeddedSubCalendarIds Unable to parse sub-calendars embedded in userinfo: admin v.3 (327681) com.atlassian.confluence.content.render.xhtml.XhtmlParsingException: The XML content could not be parsed. There is a problem at line 1, column 709. Parser message: Unexpected character ' ' (code 32) (missing name?) at [row,col {unknown-source}]: [1,709] at com.atlassian.confluence.content.render.xhtml.StaxUtils.convertToXhtmlException(StaxUtils.java:327) at com.atlassian.confluence.content.render.xhtml.storage.StorageXhtmlTransformer.transform(StorageXhtmlTransformer.java:49) at com.atlassian.confluence.content.render.xhtml.DefaultXhtmlContent.handleMacroDefinitions(DefaultXhtmlContent.java:213) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.atlassian.plugin.osgi.hostcomponents.impl.DefaultComponentRegistrar$ContextClassLoaderSettingInvocationHandler.invoke(DefaultComponentRegistrar.java:129) at com.sun.proxy.$Proxy240.handleMacroDefinitions(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) {code} I used an ampersand in my testing, but other characters can cause the error as well. When I look at the description body stored in the database, the XHTML content is *not* escaped in any way, which I think breaks the XML parser that Team Calendars is using. This is my example userinfo: {code} bodycontentid | body | contentid | bodytypeid ---------------+------------------+-----------+------------ 1703938 | Hello & goodbye. | 1671170 | 0 1703937 | | 1671169 | 0 {code}

    Atlassian JIRA | 4 years ago | Adam Laskowski [Atlassian]
    com.atlassian.confluence.content.render.xhtml.XhtmlParsingException: The XML content could not be parsed. There is a problem at line 1, column 709. Parser message: Unexpected character ' ' (code 32) (missing name?) at [row,col {unknown-source}]: [1,709]
  2. 0

    If a user has a character in their profile description, the XML parser for Team Calendars will throw this error message during the nightly or manually-triggered indexing tasks: {code} 2013-03-26 16:42:00,034 ERROR [scheduler_Worker-2] [confluence.extra.calendar3.DefaultEmbeddedSubCalendarsParser] getEmbeddedSubCalendarIds Unable to parse sub-calendars embedded in userinfo: admin v.3 (327681) com.atlassian.confluence.content.render.xhtml.XhtmlParsingException: The XML content could not be parsed. There is a problem at line 1, column 709. Parser message: Unexpected character ' ' (code 32) (missing name?) at [row,col {unknown-source}]: [1,709] at com.atlassian.confluence.content.render.xhtml.StaxUtils.convertToXhtmlException(StaxUtils.java:327) at com.atlassian.confluence.content.render.xhtml.storage.StorageXhtmlTransformer.transform(StorageXhtmlTransformer.java:49) at com.atlassian.confluence.content.render.xhtml.DefaultXhtmlContent.handleMacroDefinitions(DefaultXhtmlContent.java:213) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.atlassian.plugin.osgi.hostcomponents.impl.DefaultComponentRegistrar$ContextClassLoaderSettingInvocationHandler.invoke(DefaultComponentRegistrar.java:129) at com.sun.proxy.$Proxy240.handleMacroDefinitions(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) {code} I used an ampersand in my testing, but other characters can cause the error as well. When I look at the description body stored in the database, the XHTML content is *not* escaped in any way, which I think breaks the XML parser that Team Calendars is using. This is my example userinfo: {code} bodycontentid | body | contentid | bodytypeid ---------------+------------------+-----------+------------ 1703938 | Hello & goodbye. | 1671170 | 0 1703937 | | 1671169 | 0 {code}

    Atlassian JIRA | 4 years ago | Adam Laskowski
    com.atlassian.confluence.content.render.xhtml.XhtmlParsingException: The XML content could not be parsed. There is a problem at line 1, column 709. Parser message: Unexpected character ' ' (code 32) (missing name?) at [row,col {unknown-source}]: [1,709]
  3. 0

    When a page properties macro includes an @mention, then the @mention will be included in the page properties report. However, if the @mention is then followed by an & symbol, the page properties report does not display the expected. !mention-should-display.png|thumbnail! Instead, there is a displayed error: {noformat} Error: The XML content could not be parsed. There is a problem at line 1, column 869. Parser message: Unexpected character ' ' (code 32) (missing name?) at [row,col {unknown-source}]: [1,869] {noformat} ...and 480 lines of exception logging (see attached) that starts: {noformat} 2015-03-30 11:29:00,482 ERROR [http-bio-8090-exec-122] [content.render.xhtml.DefaultRenderer] render Error rendering content for view: The XML content could not be parsed. There is a problem at line 1, column 868. Parser message: Unexpected character ' ' (code 32) (missing name?) at [row,col {unknown-source}]: [1,868] -- referer: http://confluence.foo.bar.com/dashboard.action | url: /display/XXX/Report+Page | userName: userx | action: viewpage | page: 19993228 com.atlassian.confluence.content.render.xhtml.XhtmlParsingException: The XML content could not be parsed. There is a problem at line 1, column 868. Parser message: Unexpected character ' ' (code 32) (missing name?) at [row,col {unknown-source}]: [1,868] at com.atlassian.confluence.content.render.xhtml.StaxUtils.convertToXhtmlException(StaxUtils.java:473) at com.atlassian.confluence.content.render.xhtml.storage.StorageXhtmlTransformer.transform(StorageXhtmlTransformer.java:50) at com.atlassian.confluence.content.render.xhtml.TransformerChain.transform(TransformerChain.java:41) at com.atlassian.confluence.content.render.xhtml.PluggableTransformerChain.transform(PluggableTransformerChain.java:51) {noformat} h4.To Replicate # Create a page using page properties macro with label test-mention # Within the page properties macro, have a field "user" with content that is an @mention for "userx", followed by text "& team" # Create a page using page properties report macro # Edit the page properties report macro to use label "test-mention" and display the field "user" # The resulting report displays column "user" with error "Error: The XML content could not be parsed." h4.Expected behaviour Instead of the error, expect: "@userx & team" h5.Note Not sure if this is a problem with Confluence base rendering, with @mentions, or is specific to the macros tested.

    Atlassian JIRA | 2 years ago | Mark Symons
    com.atlassian.confluence.content.render.xhtml.XhtmlParsingException: The XML content could not be parsed. There is a problem at line 1, column 868. Parser message: Unexpected character ' ' (code 32) (missing name?) at [row,col {unknown-source}]: [1,868]
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    When a page properties macro includes an @mention or date macro, then this will be included in the page properties report. However, if the @mention or date macro is then followed or preceded by an & symbol, the page properties report does not display these as expected. !mention-should-display.png|thumbnail! Instead, there is a displayed error: {noformat} Error: The XML content could not be parsed. There is a problem at line 1, column 869. Parser message: Unexpected character ' ' (code 32) (missing name?) at [row,col {unknown-source}]: [1,869] {noformat} ...and 480 lines of exception logging (see attached) that starts: {noformat} 2015-03-30 11:29:00,482 ERROR [http-bio-8090-exec-122] [content.render.xhtml.DefaultRenderer] render Error rendering content for view: The XML content could not be parsed. There is a problem at line 1, column 868. Parser message: Unexpected character ' ' (code 32) (missing name?) at [row,col {unknown-source}]: [1,868] -- referer: http://confluence.foo.bar.com/dashboard.action | url: /display/XXX/Report+Page | userName: userx | action: viewpage | page: 19993228 com.atlassian.confluence.content.render.xhtml.XhtmlParsingException: The XML content could not be parsed. There is a problem at line 1, column 868. Parser message: Unexpected character ' ' (code 32) (missing name?) at [row,col {unknown-source}]: [1,868] at com.atlassian.confluence.content.render.xhtml.StaxUtils.convertToXhtmlException(StaxUtils.java:473) at com.atlassian.confluence.content.render.xhtml.storage.StorageXhtmlTransformer.transform(StorageXhtmlTransformer.java:50) at com.atlassian.confluence.content.render.xhtml.TransformerChain.transform(TransformerChain.java:41) at com.atlassian.confluence.content.render.xhtml.PluggableTransformerChain.transform(PluggableTransformerChain.java:51) {noformat} h4.To Replicate # Create a page using page properties macro with label test-mention # Within the page properties macro, have a field "user" with content that is an @mention for "userx" (or a date macro), followed by text "& team" # Create a page using page properties report macro # Edit the page properties report macro to use label "test-mention" and display the field "user" # The resulting report displays column "user" with error "Error: The XML content could not be parsed." h4.Expected behaviour Instead of the error, expect: "@userx & team" or date macro & team h5.Note Not sure if this is a problem with Confluence base rendering, with @mentions, or is specific to the macros tested.

    Atlassian JIRA | 2 years ago | Mark Symons
    com.atlassian.confluence.content.render.xhtml.XhtmlParsingException: The XML content could not be parsed. There is a problem at line 1, column 868. Parser message: Unexpected character ' ' (code 32) (missing name?) at [row,col {unknown-source}]: [1,868]

    Root Cause Analysis

    1. com.atlassian.confluence.content.render.xhtml.XhtmlParsingException

      The XML content could not be parsed. There is a problem at line 1, column 709. Parser message: Unexpected character ' ' (code 32) (missing name?) at [row,col {unknown-source}]: [1,709]

      at com.atlassian.confluence.content.render.xhtml.StaxUtils.convertToXhtmlException()
    2. com.atlassian.confluence
      DefaultXhtmlContent.handleMacroDefinitions
      1. com.atlassian.confluence.content.render.xhtml.StaxUtils.convertToXhtmlException(StaxUtils.java:327)
      2. com.atlassian.confluence.content.render.xhtml.storage.StorageXhtmlTransformer.transform(StorageXhtmlTransformer.java:49)
      3. com.atlassian.confluence.content.render.xhtml.DefaultXhtmlContent.handleMacroDefinitions(DefaultXhtmlContent.java:213)
      3 frames
    3. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:597)
      4 frames
    4. com.atlassian.plugin
      DefaultComponentRegistrar$ContextClassLoaderSettingInvocationHandler.invoke
      1. com.atlassian.plugin.osgi.hostcomponents.impl.DefaultComponentRegistrar$ContextClassLoaderSettingInvocationHandler.invoke(DefaultComponentRegistrar.java:129)
      1 frame
    5. com.sun.proxy
      $Proxy240.handleMacroDefinitions
      1. com.sun.proxy.$Proxy240.handleMacroDefinitions(Unknown Source)
      1 frame
    6. Java RT
      NativeMethodAccessorImpl.invoke0
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      1 frame