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
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  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]

    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