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

Error pages when viewing or creating pages or blogs caused by NullPointerException

    • Icon: Bug Bug
    • Resolution: Answered
    • Icon: Medium Medium
    • None
    • 3.0-m9
    • None
    • on eac on 3.0-m9-r2

      while viewing https://extranet.atlassian.com/display/FECRU/Doing+a+Dogfood+Build as mquail, I get the following error

      Cause
      
      java.lang.NullPointerException
          at Unknown location
      Stack Trace:[hide]
      
      java.lang.NullPointerException
      
              
      
      Referer URL
      
      Unknown
      Confluence Application Information
      Build Information
      
      home: /opt/j2ee/domains/atlassian.com/extranet/root/webapps/atlassian-confluence/data
      buildNumber: 1613
      upTime: 4 hours, 2 seconds
      devMode: false
      version: 3.0-m9-r2
      Unique ID: 0x00000120E51EDDAB3FF6163019DD95B90FB8F0B2CDF80B1DC9BE6F866B9E07BC
      Server information
      
      Application Server: Apache Tomcat/5.5.26
      Servlet Version: 2.4
      Database Dialect: net.sf.hibernate.dialect.PostgreSQLDialect
      Database Driver Name: null
      Database Driver Version: 8.2
      Database Name: PostgreSQL
      Database Version: 8.2.7
      Database Transaction Isolation: Read committed Database Latency: 1
      Memory Information
      
      Total Memory: 1007 MB
      Used Memory: 648 MB
      Free Memory: 358 MB
      System Information
      
      favouriteColour: Lemon chiffon
      javaRuntime: Java(TM) SE Runtime Environment
      jvmVersion: 1.0
      operatingSystem: Linux 2.6.9-78.0.17.ELsmp
      fileSystemEncoding: ANSI_X3.4-1968
      javaVm: Java HotSpot(TM) Server VM
      javaVendor: Sun Microsystems Inc.
      userTimezone: America/Chicago
      jvmImplementationVersion: 11.0-b16
      appServer: Apache Tomcat
      date: Sunday, 26 Apr 2009
      time: 20:09:46
      jvmVendor: Sun Microsystems Inc.
      userName: j2ee
      javaVersion: 1.6.0_11
      operatingSystemArchitecture: i386
      Cluster Information
      
      Name: extranet
      Description: TangosolClusterInformation: extranet, listening on 235.54.69.161:32357
      Members:
      - Member(Id=1, Timestamp=2009-04-26 16:02:35.993, Address=172.16.3.10:8088, MachineId=57135, Location=process:21202@atlassian10.managed.conteg)
      - Member(Id=2, Timestamp=2009-04-26 16:09:48.179, Address=172.16.3.11:8088, MachineId=57136, Location=process:20438@atlassian11.managed.conteg)
      Plugins
      
          * Adaptavist Content Formatting Macros (com.adaptavist.confluence.contentFormattingMacros, Version: 1.6.5)
          * Add Content Menu Sections (confluence.menu.add, Version: 1.0)
          * Admin Sections (confluence.sections.admin, Version: 1.0)
          * Advanced Macros (confluence.macros.advanced, Version: 1.6.2)
          * Atlassian Context Navigation Plugin (com.atlassian.navigator, Version: 1.1-confluence-m9)
          * Atlassian UI Plugin (com.atlassian.auiplugin, Version: 1.0.0)
          * Attachment Actions (confluence.sections.attachments, Version: 1.0)
          * Attachment Extractors (com.atlassian.confluence.plugins.attachmentExtractors, Version: 1.0-SNAPSHOT)
          * Balsamiq Mockups (com.balsamiq.confluence.plugins.mockups, Version: 1.5.12)
          * Basic Macros (confluence.macros.basic, Version: 1.4)
          * Blogging Leaderboard (confluence.extra.blogstats, Version: 0.6)
          * Browse Menu Items (confluence.sections.browse, Version: 1.0)
          * Cache Plugin (org.swift.confluence.cache, Version: 3.1.0)
          * Calendar Plugin (confluence.extra.calendar, Version: 2.7)
          * Chart Plugin (confluence.extra.chart, Version: 1.12)
          * Clickr Theme (com.atlassian.confluence.themes.clickr, Version: 2.4)
          * Code Macro (confluence.macros.code, Version: 1.5)
          * Collapsible Rss Plugin (com.atlassian.confluence.plugins.collapsiblerss, Version: 0.8)
          * Comment Action Sections (confluence.comment.action, Version: 1.0)
          * Composition Plugin (net.customware.confluence.plugin.composition, Version: 2.3)
          * Confluence Atlassian Plugin Repository (confluence.repository.client, Version: 2.1.2)
          * Confluence Attachments Plugin (confluence.extra.attachments, Version: 2.13)
          * Confluence Blogging RPC Plugin (com.atlassian.confluence.plugins.xmlrpc.bloggingrpc, Version: 1.2.4)
          * Confluence HTML Macros (confluence.macros.html, Version: 1.5)
          * Confluence PDF Export (com.atlassian.confluence.extra.flyingpdf, Version: 1.0-SNAPSHOT)
          * Confluence Remote API (confluence.extra.confluencerpc, Version: 3.0-m9-r2)
          * Confluence Staff Directory Plugin (com.atlassian.confluence.plugin.staffdirectory, Version: 1.2)
          * Confluence Thread Dump Plugin (com.atlassian.confluence.plugin.threaddump, Version: 1.2)
          * Content Action Menu Sections (confluence.content.action.menu, Version: 1.0)
          * Content Buttons (confluence.sections.page.temp, Version: 1.0)
          * Content Metadata (confluence.sections.content.metadata, Version: 1.0)
          * Contributors Plugin (confluence.authors, Version: 0.8)
          * Core Extractors (confluence.extractors.core, Version: 1.4)
          * Core Listeners (confluence.listeners.core, Version: 1.3)
          * Core Path Converters (confluence.converters.core, Version: 1.0)
          * Core Startup and Shutdown (confluence.lifecycle.core, Version: 1)
          * Dashboard Actions (com.atlassian.confluence.plugins.dashboard-actions, Version: 1.0-rc3)
          * Dashboard Macros (confluence.macros.dashboard, Version: 1.11)
          * Default Theme (com.atlassian.confluence.themes.default, Version: 1.0)
          * Did You Mean Index Building Interface (confluence.sections.admin.indexing, Version: 1.0)
          * Dynamic Task List 2 Plugin (confluence.extra.dynamictasklist2, Version: 3.2)
          * Edit Settings Sections (confluence.sections.settings.edit, Version: 1.0)
          * Editor Actions (confluence.editor.actions, Version: 1.0)
          * Excel Plugin (org.swift.confluence.excel, Version: 3.3.0)
          * Find Email (com.atlassian.confluence.extra, Version: 1.0)
          * Fisheye Plugin (com.atlassian.confluence.extra.fisheye-plugin, Version: 0.3)
          * Flash Plugin (org.swift.confluence.flash, Version: 3.0)
          * Follow list resources (confluence.sections.user.follow.list, Version: 1.0)
          * FreeMind Plugin (com.atlassian.confluence.contrib.freemind, Version: 1.0.2)
          * French language pack (confluence.languages.fr_FR, Version: 1.13)
          * Future Macro (confluence.macros.future, Version: 1.0beta1)
          * German language pack (confluence.languages.de_DE, Version: 1.7)
          * Gliffy Plugin for Confluence (com.gliffy.integration.confluence, Version: 1.5.1_PRE)
          * Global Dashboard Actions (confluence.sections.dashboard.global, Version: 1.0)
          * Global Labels Sections (confluence.sections.labels, Version: 1.0)
          * Global Statistics Plugin (confluence.extra.globalstats, Version: 1.0)
          * Google Calendar Plugin (net.customware.confluence.plugin.google.calendar, Version: 1.3)
          * Google Maps Plugin (com.atlassian.confluence.ext.gmaps, Version: 0.5)
          * GraphViz Plugin (confluence.extra.graphviz, Version: 1.3)
          * IM Presence NG Plugin (confluence.extra.impresence2, Version: 2.4)
          * Information Macros (confluence.extra.information, Version: 1.1)
          * JIRA Macros (confluence.extra.jira, Version: 2.8.7)
          * Layout Macros (confluence.extra.layout, Version: 1.3)
          * Left Navigation Theme (com.atlassian.confluence.themes.leftnavigation, Version: 2.5)
          * Linking Plugin (net.customware.confluence.plugin.linking, Version: 2.6.5)
          * Live Search Macros (confluence.extra.livesearch, Version: 2.9)
          * Logo Path Converter (confluence.converter.logo, Version: 1.0)
          * Lucene Boosting Strategies (confluence.search.lucene.boosting, Version: 1.0)
          * Mail Page Plugin (com.atlassian.confluence.ext.mailpage, Version: 1.6)
          * Metadata Plugin (org.andya.confluence.plugins.metadata, Version: 2.1.0)
          * News Tabs (confluence.sections.news, Version: 1.0)
          * Office Connector plugin (com.atlassian.confluence.extra.officeconnector, Version: 1.5-SNAPSHOT)
          * Page Operations (confluence.sections.page.operations, Version: 1.0)
          * Page Operations Plugin (com.atlassian.confluence.extra.pageops, Version: 1.0)
          * Page Tabs (confluence.sections.page, Version: 1.0)
          * Page Tabs (confluence.search.mappers.lucene, Version: 1.0)
          * Page Tree (com.atlassian.confluence.plugins.pagetree, Version: 1.11)
          * Page View Links (confluence.sections.page.actions, Version: 1.0)
          * Profile Macros (confluence.macros.profile, Version: 1.0)
          * Profile Tabs (confluence.sections.profile, Version: 1.0)
          * RSVP Plugin (com.atlassian.confluence.extra.rsvp, Version: 1.6.1)
          * Run Plugin (org.swift.confluence.run, Version: 0.7)
          * SQL Plugin (org.swift.confluence.sql, Version: 3.3.0)
          * Script Plugin (org.swift.confluence.script, Version: 3.1.1-NG)
          * Search Web Interface (confluence.sections.admin.generalconfig, Version: 1.0)
          * Search Web Interface (confluence.sections.search.view, Version: 1.0)
          * Shared Application Access Layer API (com.atlassian.sal.sal-api-2.0.1, Version: 2.0.1)
          * Shared Application Access Layer Confluence Plugin (com.atlassian.sal.confluence, Version: 2.0.1)
          * Slideshow Plugin (com.atlassian.confluence.ext.slideshow, Version: 0.3)
          * Snippet Plugin (com.atlassian.confluence.extra.snippet, Version: 2.1-SNAPSHOT)
          * Social Bookmarking Plugin (com.atlassian.confluence.plugins.socialbookmarking, Version: 1.2.4)
          * Space Actions Sections (confluence.sections.space.actions, Version: 1.0)
          * Space Admin Sections (confluence.sections.space.admin, Version: 1.0)
          * Space Advanced Sections (confluence.sections.space.advanced, Version: 1.0)
          * Space Browse Sections (confluence.sections.space.browse, Version: 1.0)
          * Space Export Web Interface (confluence.sections.space.export.view, Version: 1.0)
          * Space Item Tabs (confluence.sections.space, Version: 1.0)
          * Space Labels Sections (confluence.sections.space.labels, Version: 1.0)
          * Space Pages Sections (confluence.sections.space.pages, Version: 1.0)
          * System Web Resources (confluence.web.resources, Version: 1.0)
          * Table Plugin (org.swift.confluence.table, Version: 3.3.1)
          * Table of Contents Plugin (org.randombits.confluence.toc, Version: 2.4.10.1)
          * Tabular Metadata (confluence.extra.masterdetail, Version: 2.7)
          * TinyMCE Editor Plugin (com.atlassian.confluence.tinymceplugin, Version: 3.0-m9-r2)
          * UWC Importer Admin Panel (com.atlassian.confluence.plugins.uwc.uwcimporter-adminpanel, Version: 1.1)
          * User Administration (confluence.admin.user, Version: 1.0)
          * User Hover Menu Sections (confluence.user.hover.menu, Version: 1.0)
          * User Lister (confluence.extra.userlister, Version: 2.4.2)
          * User Menu Sections (confluence.user.menu, Version: 1.0)
          * User Menu Sections (confluence.user.menu.concise, Version: 1.0)
          * User Status (confluence.userstatus, Version: 1.0)
          * View Profile Web Interface (confluence.sections.profile.view, Version: 1.0)
          * View Raw Data (com.atlassian.confluence.plugin.viewrawdata, Version: 0.1)
          * View follow resources (confluence.sections.user.view.follow, Version: 1.0)
          * Voting Macros (com.nearinfinity.confluence.macros.vote, Version: 1.2)
          * WebDAV Plugin (confluence.extra.webdav, Version: 2.0-SNAPSHOT)
          * Widget Connector (com.atlassian.confluence.extra.widgetconnector, Version: 1.2.3)
          * Wiki Renderer Components (confluence.renderer.components, Version: 1.0)
          * YourKit Profiling Plugin (com.atlassian.confluence.ext.yourkit, Version: 0.4)
          * confluence-crucible-plugin (com.atlassian.confluence.plugins.crucible.confluence-crucible-plugin, Version: 1.6)
      
      Request
      Information
      
      URL
          https://extranet.atlassian.com/500page.jsp 
      URI
          /500page.jsp 
      Context Path
      Servlet Path
          /500page.jsp
      
      Headers (Limited subset)
      
      host
          extranet.atlassian.com
      user-agent
          Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv:1.9.0.9) Gecko/2009040820 Firefox/3.0.9
      keep-alive
          300
      connection
          keep-alive
      cache-control
          max-age=0
      
      Attributes
      
      javax.servlet.forward.request_uri
          /display/FECRU/Doing+a+Dogfood+Build
      javax.servlet.forward.context_path
      javax.servlet.forward.servlet_path
          /display
      javax.servlet.forward.path_info
          /500page.jsp
      os_securityfilter_already_filtered
          true
      javax.servlet.jsp.jspException
          java.lang.NullPointerException
      atlassian.core.seraph.original.url
          /display/FECRU/Doing+a+Dogfood+Build
      javax.servlet.error.status_code
          500
      javax.servlet.error.servlet_name
          simple-display
      __sitemesh__using_stream
          false
      com.atlassian.gzipfilter.GzipFilter_already_filtered
          true
      loginfilter.already.filtered
          true
      com.atlassian.confluence.web.ConfluenceJohnsonFilter_already_filtered
          true
      Confluence-Request-Time
          1240794586816
      gzipMimeTypes
          text/.*,application/x-javascript,application/javascript,application/xml,application/xhtml\+xml
      javax.servlet.error.message
      sitemeshPage
          com.atlassian.confluence.util.profiling.VelocitySitemeshPage@1b3e321
      com.atlassian.core.filters.HeaderSanitisingFilter_already_filtered
          true
      webwork.valueStack
          com.opensymphony.xwork.util.OgnlValueStack@104b361
      com.atlassian.gzipfilter.org.tuckey.web.filters.urlrewrite.RuleMatched
          true
      sessioninview.FILTERED
          true
      __sitemesh__filterapplied
          true
      javax.servlet.error.exception
          java.lang.NullPointerException
      javax.servlet.error.request_uri
          /display/FECRU/Doing+a+Dogfood+Build
      
      Parameters (Limited subset)
      
      Confluence User
      
      mquail
      
      

            [CONFSERVER-15341] Error pages when viewing or creating pages or blogs caused by NullPointerException

            We've got a pretty strong theory on the cause so closing this issue.

            Of course we could turn out to be wrong, in which case it'll be re-opening again real soon now.

            Paul Curren added a comment - We've got a pretty strong theory on the cause so closing this issue. Of course we could turn out to be wrong, in which case it'll be re-opening again real soon now.

            Don Willis added a comment -

            See CONF-15547. (but no, not pre 3.0)

            Don Willis added a comment - See CONF-15547 . (but no, not pre 3.0)

            Are you planning to modify the schema to prevent this happening again ?

            David Cheney (Inactive) added a comment - Are you planning to modify the schema to prevent this happening again ?

            Don Willis added a comment -

            EAC has had two rows of very corrupt data in the content table since the 2nd of April. See CONF-15547. There were two rows which contained null for virtually every column, including title, created, creator, last modified and last modifier. All of these are fields which are regularly assumed in Confluence to not be null. These have caused many NullPointerExceptions. Eg

            java.lang.NullPointerException
                    at com.atlassian.confluence.pages.NaturalStringComparator.compareNatural(NaturalStringComparator.java:53)
                    at com.atlassian.confluence.pages.NaturalStringComparator.compareNatural(NaturalStringComparator.java:35)
                    at com.atlassian.confluence.pages.NaturalStringComparator.compare(NaturalStringComparator.java:20)
                    at com.atlassian.confluence.pages.Page$ChildPositionComparator.compare(Page.java:307)
                    at com.atlassian.confluence.pages.Page$ChildPositionComparator.compare(Page.java:277)
                    at java.util.Arrays.mergeSort(Arrays.java:1270)
                    at java.util.Arrays.mergeSort(Arrays.java:1282)
                    at java.util.Arrays.mergeSort(Arrays.java:1282)
                    at java.util.Arrays.sort(Arrays.java:1210)
                    at java.util.Collections.sort(Collections.java:159)
                    at com.atlassian.confluence.pages.DefaultPageManager.getTopLevelPages(DefaultPageManager.java:233)
            

            It seems likely to me that the mysterious NPEs we've had are probably from those corrupt rows.

            I've had the rows deleted now so perhaps this will stop happening.

            Don Willis added a comment - EAC has had two rows of very corrupt data in the content table since the 2nd of April. See CONF-15547 . There were two rows which contained null for virtually every column, including title, created, creator, last modified and last modifier. All of these are fields which are regularly assumed in Confluence to not be null. These have caused many NullPointerExceptions. Eg java.lang.NullPointerException at com.atlassian.confluence.pages.NaturalStringComparator.compareNatural(NaturalStringComparator.java:53) at com.atlassian.confluence.pages.NaturalStringComparator.compareNatural(NaturalStringComparator.java:35) at com.atlassian.confluence.pages.NaturalStringComparator.compare(NaturalStringComparator.java:20) at com.atlassian.confluence.pages.Page$ChildPositionComparator.compare(Page.java:307) at com.atlassian.confluence.pages.Page$ChildPositionComparator.compare(Page.java:277) at java.util.Arrays.mergeSort(Arrays.java:1270) at java.util.Arrays.mergeSort(Arrays.java:1282) at java.util.Arrays.mergeSort(Arrays.java:1282) at java.util.Arrays.sort(Arrays.java:1210) at java.util.Collections.sort(Collections.java:159) at com.atlassian.confluence.pages.DefaultPageManager.getTopLevelPages(DefaultPageManager.java:233) It seems likely to me that the mysterious NPEs we've had are probably from those corrupt rows. I've had the rows deleted now so perhaps this will stop happening.

            CharlesA added a comment -

            From the linked issues, this seems to be cropping up now and again on eac (node 2 only?) and then going away.

            The problem is that without any stack trace info in the NPE there's really no way of knowing where or why this is occurring, and no way of reproducing it. Which leaves us at something of an impasse - no idea even where to add extra logging.

            I might make a blog post asking people "If you see this error, grab the current Disturbed before it goes away"?

            CharlesA added a comment - From the linked issues, this seems to be cropping up now and again on eac (node 2 only?) and then going away. The problem is that without any stack trace info in the NPE there's really no way of knowing where or why this is occurring, and no way of reproducing it. Which leaves us at something of an impasse - no idea even where to add extra logging. I might make a blog post asking people "If you see this error, grab the current Disturbed before it goes away"?

            Reopening, because it seems pretty reproducible, although not consistently =/

            Andrew Lynch (Inactive) added a comment - Reopening, because it seems pretty reproducible, although not consistently =/

            Matt Ryall added a comment -

            Closing as cannot reproduce for now. My investigation didn't really yield any clues.

            Matt Ryall added a comment - Closing as cannot reproduce for now. My investigation didn't really yield any clues.

            Matt,

            will it be possible to investigate this further given that EAC node 2 is no longer showing the problem?

            Perhaps this issue needs closing?

            Paul Curren added a comment - Matt, will it be possible to investigate this further given that EAC node 2 is no longer showing the problem? Perhaps this issue needs closing?

            Matt Ryall added a comment -

            As well as viewing certain pages, this also seems to break creating pages and blog posts. The problem is only affecting Extranet node 2.

            Here are another couple of stack traces from the logs. Near the beginning, index problems:

            2009-04-26 17:55:09,042 ERROR [TP-Processor50] [search.v2.lucene.LuceneSearcherImpl] search Error encountered in lucene search: usageCount<=0
             -- referer: https://extranet.atlassian.com/display/~jfleming/Escalation+howto+-+escalation+team | url: /display/~jfleming/Escalation+howto+-+escal
            ation+team | userName: ivan@atlassian.com
            java.lang.IllegalStateException: usageCount<=0
                    at org.apache.lucene.search.DelayCloseIndexSearcher.close(DelayCloseIndexSearcher.java:216)
                    at com.atlassian.bonnie.LuceneConnection.closeSearcher(LuceneConnection.java:532)
                    at com.atlassian.bonnie.LuceneConnection.withSearch(LuceneConnection.java:261)
                    at com.atlassian.confluence.search.v2.lucene.LuceneSearcherImpl.search(LuceneSearcherImpl.java:34)
                    at com.atlassian.confluence.search.v2.lucene.LuceneSearchManager.search(LuceneSearchManager.java:61)
                    at com.atlassian.confluence.plugins.macros.advanced.recentupdate.RecentlyChangedContentMacro.execute(RecentlyChangedContentMacro.java:246)
            

            And later, failures in decorators due to the weird NPEs:

            2009-04-26 19:58:06,526 ERROR [TP-Processor84] [opensymphony.webwork.dispatcher.VelocityResult] doExecute Unable to render Velocity Template, '/pag
            es/createpage.vm'
             -- referer: https://extranet.atlassian.com/display/QA/2009-04-27+-+Confluence+-+3.0-m9+-+Macro+Browser+Blitz+Test | url: /pages/createpage.action 
            | userName: pdzwart | action: createpage
            java.lang.RuntimeException: Error rendering template for decorator root
                    at com.atlassian.confluence.setup.velocity.ApplyDecoratorDirective.render(ApplyDecoratorDirective.java:211)
            ...
            Caused by: java.lang.NullPointerException
            

            I've restarted node2, which seems to have fixed it.

            Matt Ryall added a comment - As well as viewing certain pages, this also seems to break creating pages and blog posts. The problem is only affecting Extranet node 2. Here are another couple of stack traces from the logs. Near the beginning, index problems: 2009-04-26 17:55:09,042 ERROR [TP-Processor50] [search.v2.lucene.LuceneSearcherImpl] search Error encountered in lucene search: usageCount<=0 -- referer: https://extranet.atlassian.com/display/~jfleming/Escalation+howto+-+escalation+team | url: /display/~jfleming/Escalation+howto+-+escal ation+team | userName: ivan@atlassian.com java.lang.IllegalStateException: usageCount<=0 at org.apache.lucene.search.DelayCloseIndexSearcher.close(DelayCloseIndexSearcher.java:216) at com.atlassian.bonnie.LuceneConnection.closeSearcher(LuceneConnection.java:532) at com.atlassian.bonnie.LuceneConnection.withSearch(LuceneConnection.java:261) at com.atlassian.confluence.search.v2.lucene.LuceneSearcherImpl.search(LuceneSearcherImpl.java:34) at com.atlassian.confluence.search.v2.lucene.LuceneSearchManager.search(LuceneSearchManager.java:61) at com.atlassian.confluence.plugins.macros.advanced.recentupdate.RecentlyChangedContentMacro.execute(RecentlyChangedContentMacro.java:246) And later, failures in decorators due to the weird NPEs: 2009-04-26 19:58:06,526 ERROR [TP-Processor84] [opensymphony.webwork.dispatcher.VelocityResult] doExecute Unable to render Velocity Template, '/pag es/createpage.vm' -- referer: https://extranet.atlassian.com/display/QA/2009-04-27+-+Confluence+-+3.0-m9+-+Macro+Browser+Blitz+Test | url: /pages/createpage.action | userName: pdzwart | action: createpage java.lang.RuntimeException: Error rendering template for decorator root at com.atlassian.confluence.setup.velocity.ApplyDecoratorDirective.render(ApplyDecoratorDirective.java:211) ... Caused by: java.lang.NullPointerException I've restarted node2, which seems to have fixed it.

              Unassigned Unassigned
              mquail Matt Quail (Inactive)
              Affected customers:
              0 This affects my team
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: