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

Blank page when accessing dashboard after upgrade or site import failure - global description does not exist

      Rendering the logo on any page in Confluence relies on the global description existing. If you don't have a global description in your database, trying to access any page will just return a blank page and leave the following error in the logs:

      2008-11-17 17:26:49,468 ERROR [[ACTIVE] ExecuteThread: '0' for queue:
       'weblogic.kernel.Default (self-tuning)'] [confluence.util.velocity.VelocityUtils] getRenderedTemplate 
      Error occurred rendering template: /decorators/main.vmd
       -- url: /confluence/dashboard.action | userName: admin
      
      org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getAttachment' 
      in  class $Proxy49 threw exception java.lang.IllegalArgumentException: Content entity object 
      should not be null @ /decorators/main.vmd[3,33]
      	at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:286)
      	...
      	at org.apache.velocity.runtime.directive.VelocimacroProxy.render(VelocimacroProxy.java:194)
              ...
      	at org.apache.velocity.Template.merge(Template.java:254)
      	at com.atlassian.confluence.util.velocity.VelocityUtils.
      getRenderedTemplateWithoutSwallowingErrors(VelocityUtils.java:58)
      	at com.atlassian.confluence.util.velocity.VelocityUtils.getRenderedTemplate(VelocityUtils.java:36)
      	at com.atlassian.confluence.util.profiling.ProfilingPageFilter.
      applyDecoratorUsingVelocity(ProfilingPageFilter.java:133)
      	...
      Caused by: java.lang.IllegalArgumentException: Content entity object should not be null
      	at org.springframework.util.Assert.notNull(Assert.java:112)
      	at com.atlassian.confluence.pages.persistence.dao.hibernate.AbstractHibernateAttachmentDao.
      getLatestVersionsOfAttachments(AbstractHibernateAttachmentDao.java:78)
      	at com.atlassian.confluence.pages.DefaultAttachmentManager.
      getLatestVersionsOfAttachments(DefaultAttachmentManager.java:63)
      	at com.atlassian.confluence.pages.AbstractAttachmentManager.
      getAttachment(AbstractAttachmentManager.java:51)
      	at com.atlassian.confluence.pages.AbstractAttachmentManager.
      getAttachment(AbstractAttachmentManager.java:32)
      

            [CONFSERVER-13767] Blank page when accessing dashboard after upgrade or site import failure - global description does not exist

            Roy Hartono [Atlassian] added a comment - - edited

            To create the Global Description content manually, you need to run this in your own database:

            select * from content where contenttype = 'GLOBALDESCRIPTION';
            

            If it returns an empty set, run an insert statement like the following:

            insert into content(contentid, contenttype, version, creationdate, lastmoddate, content_status)  values (999999, 'GLOBALDESCRIPTION', 1, '2009-01-01 00:00:00', '2009-01-01 00:00:00', 'current');
            

            Where 999999 is a unique content id in your database, set it to any number high enough to be unique.

            Roy Hartono [Atlassian] added a comment - - edited To create the Global Description content manually, you need to run this in your own database: select * from content where contenttype = 'GLOBALDESCRIPTION' ; If it returns an empty set, run an insert statement like the following: insert into content(contentid, contenttype, version, creationdate, lastmoddate, content_status) values (999999, 'GLOBALDESCRIPTION' , 1, '2009-01-01 00:00:00' , '2009-01-01 00:00:00' , 'current' ); Where 999999 is a unique content id in your database, set it to any number high enough to be unique.

            Jeremy Largman added a comment - - edited

            Several of the support tickets raised have been attributed to improper upgrade procedures. Make sure you're following http://confluence.atlassian.com/display/DOC/Upgrading+Confluence.

            One specific cause is setting up a working upgraded install and then substituting a db from an older version. In this case the upgrade job will not kick in and Confluence may throw this error. Notice the note on the upgrade page:

            Confluence runs the upgrade task based on a comparison between build numbers in the confluence-install directory and the confluence.cfg.xml file in the confluence-home directory. The database does not know its own version. Therefore, you cannot restore an sql dump from an old version after the upgrade task has run.

            If this is the case, you're better off re-running the upgrade task properly than you are patching the issue with SQL or a vm file. Leaving the database in an not-upgraded state can be problematic for other reasons.

            Jeremy Largman added a comment - - edited Several of the support tickets raised have been attributed to improper upgrade procedures. Make sure you're following http://confluence.atlassian.com/display/DOC/Upgrading+Confluence . One specific cause is setting up a working upgraded install and then substituting a db from an older version. In this case the upgrade job will not kick in and Confluence may throw this error. Notice the note on the upgrade page: Confluence runs the upgrade task based on a comparison between build numbers in the confluence-install directory and the confluence.cfg.xml file in the confluence-home directory. The database does not know its own version. Therefore, you cannot restore an sql dump from an old version after the upgrade task has run. If this is the case, you're better off re-running the upgrade task properly than you are patching the issue with SQL or a vm file. Leaving the database in an not-upgraded state can be problematic for other reasons.

            Stuart, please raise a support case at https://support.atlassian.com and we'll try to help you out with this.

            Matt Ryall added a comment - Stuart, please raise a support case at https://support.atlassian.com and we'll try to help you out with this.

            This issue seems to only partially be fixed in 2.10. The Logo isn't breaking pages anymore but when I try to change the logo I get:

            java.lang.IllegalArgumentException: Content entity object should not be null
            	at org.springframework.util.Assert.notNull(Assert.java:112)
            	at com.atlassian.confluence.pages.persistence.dao.hibernate.AbstractHibernateAttachmentDao.getLatestVersionsOfAttachments(AbstractHibernateAttachmentDao.java:78)
            	at com.atlassian.confluence.pages.DefaultAttachmentManager.getLatestVersionsOfAttachments(DefaultAttachmentManager.java:63)
            	at com.atlassian.confluence.pages.AbstractAttachmentManager.getAttachment(AbstractAttachmentManager.java:51)
            	at com.atlassian.confluence.pages.AbstractAttachmentManager.getAttachment(AbstractAttachmentManager.java:32)
            	at com.atlassian.confluence.pages.DelegatorAttachmentManager.getAttachment(DelegatorAttachmentManager.java:83)
            	at sun.reflect.GeneratedMethodAccessor420.invoke(Unknown Source)
            	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            	at java.lang.reflect.Method.invoke(Method.java:597)
            

            Stuart Gilberd added a comment - This issue seems to only partially be fixed in 2.10. The Logo isn't breaking pages anymore but when I try to change the logo I get: java.lang.IllegalArgumentException: Content entity object should not be null at org.springframework.util.Assert.notNull(Assert.java:112) at com.atlassian.confluence.pages.persistence.dao.hibernate.AbstractHibernateAttachmentDao.getLatestVersionsOfAttachments(AbstractHibernateAttachmentDao.java:78) at com.atlassian.confluence.pages.DefaultAttachmentManager.getLatestVersionsOfAttachments(DefaultAttachmentManager.java:63) at com.atlassian.confluence.pages.AbstractAttachmentManager.getAttachment(AbstractAttachmentManager.java:51) at com.atlassian.confluence.pages.AbstractAttachmentManager.getAttachment(AbstractAttachmentManager.java:32) at com.atlassian.confluence.pages.DelegatorAttachmentManager.getAttachment(DelegatorAttachmentManager.java:83) at sun.reflect.GeneratedMethodAccessor420.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597)

            Back to Fix Version 2.10. I read the changesets wrong - sorry.

            Paul Curren added a comment - Back to Fix Version 2.10. I read the changesets wrong - sorry.

            Corrected the 'Fix Version'. This isn't actually in 2.10 - it's in the 3.0 trunk branch.

            Paul Curren added a comment - Corrected the 'Fix Version'. This isn't actually in 2.10 - it's in the 3.0 trunk branch.

            If you're having this issue after an upgrade, it means your upgrade failed and will need to be manually corrected.

            Please raise a support case at https://support.atlassian.com, and include a link to this issue.

            Support team: to fix this problem manually, you will need to either patch the macros.vm file as done in this fix, or manually create a global description object via SQL.

            Matt Ryall added a comment - If you're having this issue after an upgrade, it means your upgrade failed and will need to be manually corrected. Please raise a support case at https://support.atlassian.com , and include a link to this issue. Support team: to fix this problem manually, you will need to either patch the macros.vm file as done in this fix, or manually create a global description object via SQL.

            Gum Shoes added a comment - - edited

            I get the same error trying to upgrade from 2.8.2 to 2.9.2 (Oracle 10g).

            2008-11-19 16:02:27,015 INFO [main] [com.atlassian.confluence.lifecycle] init Confluence is ready to serve
            2008-11-19 16:02:53,924 ERROR [http-8888-1] [confluence.util.velocity.VelocityUtils] getRenderedTemplate Error occurred rendering template: /decorators/main.vmd
             -- url: /c/dashboard.action | userName: anonymous
            org.apache.velocity.exception.MethodInvocationException: 
            Invocation of method 'getAttachment' in  class $Proxy18 threw exception java.lang.IllegalArgumentException: Content entity object @ /decor
            ators/main.vmd[3,33]
                    at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:286)
            

            Gum Shoes added a comment - - edited I get the same error trying to upgrade from 2.8.2 to 2.9.2 (Oracle 10g). 2008-11-19 16:02:27,015 INFO [main] [com.atlassian.confluence.lifecycle] init Confluence is ready to serve 2008-11-19 16:02:53,924 ERROR [http-8888-1] [confluence.util.velocity.VelocityUtils] getRenderedTemplate Error occurred rendering template: /decorators/main.vmd -- url: /c/dashboard.action | userName: anonymous org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getAttachment' in class $Proxy18 threw exception java.lang.IllegalArgumentException: Content entity object @ /decor ators/main.vmd[3,33] at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:286)

            Matt Ryall added a comment -

            Skipping technical review. Anatoli isn't in today, and this is just a minor change. We need to get it closed off before the next milestone release.

            Matt Ryall added a comment - Skipping technical review. Anatoli isn't in today, and this is just a minor change. We need to get it closed off before the next milestone release.

            Matt Ryall added a comment -

            Anatoli, do you have any ideas on how we could test this?

            Matt Ryall added a comment - Anatoli, do you have any ideas on how we could test this?

              matt@atlassian.com Matt Ryall
              matt@atlassian.com Matt Ryall
              Affected customers:
              0 This affects my team
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: