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

Confluence getBlogEntry does not always return the full exception message

XMLWordPrintable

      Summary

      Confluence XML-RPC function getBlogEntry does not always return the full exception message if the ID requested is a page

      Environment

      • Confluence 5.10+

      Steps to Reproduce

      1. Install Confluence
      2. Enable XML-RPC from Administration -> Further Configuration
      3. Send multiple requests for getBlogEntry

      Expected Results

      Every time Confluence will reply with the below error

      <Fault 0: 'java.lang.Exception: java.lang.ClassCastException: com.atlassian.confluence.pages.Page cannot be cast to com.atlassian.confluence.pages.BlogPost'>
      

      Actual Results

      After multiple attempts, the returned error looks like this:

      <?xml version="1.0"?><methodResponse><fault><value><struct><member><name>faultString</name><value>java.lang.Exception: java.lang.ClassCastException</value></member><member><name>faultCode</name><value><int>0</int></value></member></struct></value></fault></methodResponse>
      

      Note the difference:
      java.lang.Exception: java.lang.ClassCastException
      java.lang.Exception: java.lang.ClassCastException: com.atlassian.confluence.pages.Page cannot be cast to com.atlassian.confluence.pages.BlogPost

      Workaround

      • The problem on the Confluence side is caused due to JVM does JIT optimisation and suppresses stack-trace for frequent errors.
      • Restart of the Confluence temporary solves the problem.
      • Disable JIT optimization in Confluence, add to JVM parameter:
        -XX:-OmitStackTraceInFastThrow
        

              mtran@atlassian.com Minh Tran
              rslaiby Rudy Slaiby
              Votes:
              25 Vote for this issue
              Watchers:
              34 Start watching this issue

                Created:
                Updated:
                Resolved: