Uploaded image for project: 'Pentaho BA Platform'
  1. Pentaho BA Platform
  2. BISERVER-5517

If audit connection cannot be established, root cause is never logged and NullPointerException can result.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Severity: Medium
    • Resolution: Fixed
    • Affects Version/s: 3.7.0 GA (Platform Release)
    • Component/s: None
    • Labels:
      None
    • Notice:
      When an issue is open, the "Fix Version/s" field conveys a target, not necessarily a commitment. When an issue is closed, the "Fix Version/s" field conveys the version that the issue was fixed in.

      Description

      http://forums.pentaho.com/showthread.php?80421-Adhoc-Reporting-error-0012

      There appear to be several bugs here:
      1. When an audit connection is attempted and fails, the root cause is never sent to the log. (AuditConnection:189)
      2. After all attempts to get an audit connection fail, the finally clause does not check for null. (AuditSQLEntry:151)

      How to reproduce (This is contrived but the actual error was experienced by a user):
      1. Edit pentaho-solutions/system/audit_sql.xml and change the JNDI name to Hibernate1 (or some other name that does not exist).
      2. Run an xaction. Get exception:

      [Server@6d7e845a]: [Thread[HSQLDB Connection @5450a11a,5,HSQLDB Connections @6d7e845a]]: database alias=audit does not exist
      16:21:57,007 WARN [AuditConnection] Tried to establish connection after 0 milli secs, but failed. Will try again.
      [Server@6d7e845a]: [Thread[HSQLDB Connection @5f00fa88,5,HSQLDB Connections @6d7e845a]]: database alias=audit does not exist
      16:21:57,209 WARN [AuditConnection] Tried to establish connection after 200 milli secs, but failed. Will try again.
      [Server@6d7e845a]: [Thread[HSQLDB Connection @f28ccdf,5,HSQLDB Connections @6d7e845a]]: database alias=audit does not exist
      16:21:57,711 WARN [AuditConnection] Tried to establish connection after 500 milli secs, but failed. Will try again.
      [Server@6d7e845a]: [Thread[HSQLDB Connection @6218d77b,5,HSQLDB Connections @6d7e845a]]: database alias=audit does not exist
      16:21:59,713 WARN [AuditConnection] Tried to establish connection after 2000 milli secs, but failed. Will try again.
      16:21:59,714 ERROR [Logger] Error: Pentaho
      16:21:59,719 ERROR [Logger] misc-org.pentaho.platform.engine.core.audit.AuditHelper: AUDITHELPER.ERROR_0001 - Could not write audit entry
      java.lang.NullPointerException
      at org.pentaho.platform.engine.services.audit.AuditSQLEntry.auditAll(AuditSQLEntry.java:151)
      at org.pentaho.platform.engine.core.audit.AuditEntry.auditAll(AuditEntry.java:54)
      at org.pentaho.platform.engine.core.audit.AuditEntry.auditJobDuration(AuditEntry.java:43)
      at org.pentaho.platform.engine.core.audit.AuditHelper.audit(AuditHelper.java:83)
      at org.pentaho.platform.web.http.session.PentahoHttpSession.<init>(PentahoHttpSession.java:60)
      at org.pentaho.platform.web.http.PentahoHttpSessionHelper.getPentahoSession(PentahoHttpSessionHelper.java:55)
      at org.pentaho.platform.web.http.request.PentahoHttpRequestListener.requestInitialized(PentahoHttpRequestListener.java:53)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:180)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
      at java.lang.Thread.run(Thread.java:662)

        Attachments

          Activity

            People

            • Assignee:
              mlowery Mat Lowery (Inactive)
              Reporter:
              mlowery Mat Lowery (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: