US and Worldwide: +1 (866) 660-7555
Results 1 to 9 of 9

Thread: auditing -

  1. #1
    Join Date
    Jan 2006
    Posts
    313

    Default auditing -

    I looked at the documentation for IAuditEntry at http://wiki.pentaho.org/display/Pent...uditEntry+Node


    Apparently there is a lot changed betweenv ersion 1.2 and 1.6

    When i change the IAuditEntry node from file to com.pentaho.repository.audit.AuditLogDAO i get :
    Code:
    2007-10-18 10:56:32,906 INFO  [STDOUT] 10:56:32,906 ERROR [Logger] misc-org.pentaho.core.system.PentahoSystem: PentahoSystem.ERROR_0020 - Classloader failed to load IAuditEntry derived class "com.pentaho.repository.audit.AuditLogDAO".
    2007-10-18 10:56:32,906 INFO  [STDOUT] 10:56:32,906 ERROR [Logger] misc-org.pentaho.core.system.PentahoSystem: PentahoSystem.ERROR_0023 - Could not return object IVersionHelper of scope null
    2007-10-18 10:56:32,937 ERROR [STDERR] Pentaho BI Platform server failed to properly initialize. The system will not be available for requests. (Pentaho BI Platform 1.6.1.872 (class)) Base Url = http://m030/pentaho/, Solution Path = C:\eclipse-SDK-3.2.1\workspace-pentaho-1.6\target-solutions
    Apparently the class has been removed from the source in CVS.

    I don't want to use the file based auditing.

    Is the only valid org.pentaho.core.audit.AuditSQLEntry?

    I configured pentaho.xml as follows:

    Code:
    <audit>
    <auditConnection>
    <driverURL>jdbc:mysql://localhost:3306/pentahotest</driverURL>
    <driverCLASS>com.mysql.jdbc.Driver</driverCLASS>
    </auditConnection>
    </audit>
    
    I got the following error - this looks like a bug to me.
    Code:
    2007-10-18 11:57:20,000 INFO  [STDOUT] 11:57:20,000 ERROR [Logger] Error: Pentaho Pentaho BI Platform 1.6.1.872 (class)
    2007-10-18 11:57:20,000 INFO  [STDOUT] 11:57:20,000 ERROR [Logger] misc-org.pentaho.core.audit.AuditSQLEntry: Parameter index out of bounds. 11 is not between valid values of 1 and 10
    java.sql.SQLException: Parameter index out of bounds. 11 is not between valid values of 1 and 10
     at com.mysql.jdbc.ServerPreparedStatement.getBinding(ServerPreparedStatement.java:756)
     at com.mysql.jdbc.ServerPreparedStatement.setTimestampInternal(ServerPreparedStatement.java:1940)
     at com.mysql.jdbc.ServerPreparedStatement.setTimestamp(ServerPreparedStatement.java:1912)
     at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.setTimestamp(WrappedPreparedStatement.java:368)
     at org.pentaho.core.audit.AuditSQLEntry.auditAll(Unknown Source)
     at org.pentaho.core.audit.AuditEntry.auditAll(Unknown Source)
     at org.pentaho.core.audit.AuditEntry.auditJobDuration(Unknown Source)
     at org.pentaho.core.audit.AuditHelper.audit(Unknown Source)
     at org.pentaho.core.solution.SolutionEngine.executeInternal(Unknown Source)
     at org.pentaho.core.solution.SolutionEngine.execute(Unknown Source)
     at org.pentaho.core.solution.SolutionEngine.execute(Unknown Source)
     at org.pentaho.core.system.PentahoSystem.sessionStartup(Unknown Source)
     at com.pentaho.security.SecurityStartupFilter.doFilter(Unknown Source)
     at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
     at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
     at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
     at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
     at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
     at com.pentaho.security.RequestParameterAuthenticationFilter.doFilter(Unknown Source)
     at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
     at org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:178)
     at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
     at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:217)
     at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
     at org.acegisecurity.ui.logout.LogoutFilter.doFilter(LogoutFilter.java:108)
     at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
     at com.pentaho.security.HttpSessionReuseDetectionFilter.doFilter(Unknown Source)
     at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
     at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:193)
     at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
     at org.acegisecurity.wrapper.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:81)
     at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
     at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:148)
     at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
     at org.pentaho.core.system.SystemStatusFilter.doFilter(Unknown Source)
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
     at org.pentaho.ui.servlet.SetCharacterEncodingFilter.doFilter(Unknown Source)
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
     at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
     at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
     at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
     at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
     at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
     at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
     at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
     at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
     at java.lang.Thread.run(Thread.java:595)

  2. #2
    Join Date
    Jan 2006
    Posts
    313

    Default tracing=on

    If i turn tracing on, i get thie additional info:
    Code:
    2007-10-18 12:28:56,125 INFO  [STDOUT] 12:28:56,125 DEBUG [AuditConnection] lookup found, class name = org.jboss.resource.adapter.jdbc.WrapperDataSource
    2007-10-18 12:28:56,203 INFO  [STDOUT] 12:28:56,203 ERROR [Logger] misc-org.pentaho.core.system.PentahoSystem: PentahoSystem.ERROR_0023 - Could not return object IVersionHelper of scope null
    2007-10-18 12:28:56,218 INFO  [STDOUT] 12:28:56,218 ERROR [Logger] Error: Pentaho Pentaho BI Platform 1.6.1.872 (class)
    2007-10-18 12:28:56,234 INFO  [STDOUT] 12:28:56,218 ERROR [Logger] misc-org.pentaho.core.audit.AuditSQLEntry: Parameter index out of range (11 > number of parameters, which is 10).
    java.sql.SQLException: Parameter index out of range (11 > number of parameters, which is 10).

  3. #3

    Default

    I suggest turning on Hibernate SQL logging (which I think is done in the hibernate.cfg.xml).

  4. #4
    Join Date
    Jan 2006
    Posts
    313

    Default

    I turned on hybernate SQL logging in both hibernate.cfg.xml file i found( pentaho.war/WEB-INF/classes & pentaho.war/WEB-INF/classes/jndi)

    Code:
    <property name="show_sql">true</property>
    I saw a lot of hibernate SQL statements, but no extra info was displayed at the moment the error occured.

  5. #5

    Default

    Are there any audit table-related SQL statements around the exception? If so, can you manually execute them in another tool?

  6. #6
    Join Date
    Jan 2006
    Posts
    313

    Default lof files

    I attached the complete log for your reference. I configured extended logging
    Code:
    <category name="org.jboss.resource">
    <priority value="TRACE"/>
    </category>
    <category name="com.pentaho.repository.dbbased">
    <priority value="TRACE"/>
    </category>
    <category name="org.pentaho">
    <priority value="TRACE"/>
    </category>
    <!-- Limit org.pentaho.util.logger to error -->
    <category name="org.pentaho.util.logging">
    <priority value="TRACE"/>
    
    The error occurs for the first time when jboss is booting. Before the pentho server is ready for use.
    Attached Files Attached Files

  7. #7

    Default

    I'm sorry but I steered you in the wrong direction. Hibernate has nothing to do with the implementation with which you're working. I updated the AuditSQLEntry documentation to include the insertSQL element. You'll need an INSERT statement appropriate to your database. Also check out the userid, password, and JNDI elements, if appropriate.

  8. #8
    Join Date
    Jan 2006
    Posts
    313

    Default next step

    The error came from the sql that did not have enough fields.

    The sql as shown in the documentation is not going to work because it only has 10 fields.

    I changed it into :
    Code:
    INSERT INTO osbiAudit (jobId, instId, objId, objType, actor, messageType, messageName, messageTxtValue, messageNumValue, newfield, duration) values (?,?,?,?,?,?,?,?,?,?,?)
    the "Parameter index out of range" disappeared, but got a data truncation error.

    Mat can you tell me what the new field is and at what position.
    Could you give me a table definition that you guy's use. It does not matter what type of database it is for. It is just to be sure that the names and types and string length's of the fields are OK.

  9. #9

    Default

    Try this one:

    Code:
    INSERT INTO AUDIT (JOB_ID, INST_ID, OBJ_ID, OBJ_TYPE, ACTOR, MESSAGE_TYPE, MESSAGE_NAME, MESSAGE_TEXT_VALUE, MESSAGE_NUM_VALUE, DURATION, AUDIT_TIME) values (?,?,?,?,?,?,?,?,?,?,?)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •