Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-24282

Exception upon opening "Browse -> Spacedirectory" in Browse is not fixed by the upgrade.

    XMLWordPrintable

Details

    Description

      Problem description

      This error occurs for new installations of 4.0.3 where, in the setup wizard, the user has opted to install the demo space. And under certain circumstances which the error is caused by a malformed row in the table bodycontent.

      However it is not fixed on upgrade, the error remains.

      Here are the steps that you can take to reproduce this bug :

      1. Install a clean instance of Confluence 4.0.3. (Installed by following the setup wizard, and set user management to 'Manage Users and Groups within Confluence')
      2. Access Browse>Space Directory and there will be an error. The stack trace is as follows :
      org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getBodyAsString' in  class com.atlassian.confluence.spaces.SpaceDescription$$EnhancerByCGLIB$$f653be5e threw exception java.lang.UnsupportedOperationException: The body of this ContentEntityObject ('') was 'BodyType:XHTML' but was expected to be 'BodyType:WIKI' at /templates/spacedirectory.vm[line 62, column 71]
      	at org.apache.velocity.runtime.parser.node.ASTMethod.handleInvocationException(ASTMethod.java:337)
      	at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:284)
      	at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:262)
      ...	
      Caused by: java.lang.UnsupportedOperationException: The body of this ContentEntityObject ('') was 'BodyType:XHTML' but was expected to be 'BodyType:WIKI'
      	at com.atlassian.confluence.core.ContentEntityObject.getBodyContent(ContentEntityObject.java:169)
      	at com.atlassian.confluence.core.ContentEntityObject.getBodyAsString(ContentEntityObject.java:206)
      	at com.atlassian.confluence.core.ContentEntityObject$$FastClassByCGLIB$$96df24d5.invoke(<generated>)
      	at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
      	at net.sf.hibernate.proxy.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:108)
      	at com.atlassian.confluence.spaces.SpaceDescription$$EnhancerByCGLIB$$f653be5e.getBodyAsString(<generated>)
      	... 197 more
      

      Workaround

      1. Open this URL in your browser: <Confluence-URL>/admin/force-upgrade.action
      2. Select changeSpaceDescriptionsBodyTypeUpgradeTask in the Upgrade task to run dropdown list.
      3. Choose Force Upgrade.

      Hope This helps!

      Attachments

        Issue Links

          Activity

            People

              igerges Issac Gerges (Inactive)
              cschedler Carlos Alberto Feijo Schedler [Atlassian]
              Votes:
              3 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: