AnsweredAssumed Answered

turn off auditing in 3.4.b

Question asked by ddvorak on Dec 8, 2010
We are running Alfresco Community 3.4.b on ubuntu. Alfresco is working fine, but, we are getting errors in the logs generated from auditing (at least that is what I think is generating it). The section of /var/lib/tomcat6/webapps/alfresco/WEB-INF/classes/alfresco/repository.properties that controls auditing is as follows:

# Audit configuration
#audit.enabled=true
audit.enabled=false
#audit.tagging.enabled=true
audit.tagging.enabled=false
audit.cmischangelog.enabled=false
audit.dod5015.enabled=false
# Setting this flag to true will force startup failure when invalid audit configurations are detected
audit.config.strict=false

The errors we are getting are:
08:14:10,681 INFO  [org.alfresco.config.FixedPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/domain/cache-strategies.properties]
08:14:10,694 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Startup of 'Replication' subsystem, ID: [Replication, default] complete
08:15:18,576 ERROR [org.quartz.core.JobRunShell] Job DEFAULT.taggingStartupJobDetail threw an unhandled Exception:
org.springframework.jdbc.BadSqlGrammarException: SqlMapClient operation; bad SQL grammar []; nested exception is com.ibatis.common.jdbc.exception.NestedSQLException:  
— The error occurred while applying a parameter map. 
— Check the alfresco.audit.select_AuditEntriesWithoutValues-InlineParameterMap. 
— Check the statement (query failed). 
— Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'entry.audit_app_id' in 'on clause'
   at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:233)
   at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72)
   at org.springframework.orm.ibatis.SqlMapClientTemplate.execute(SqlMapClientTemplate.java:203)
   at org.springframework.orm.ibatis.SqlMapClientTemplate.queryForList(SqlMapClientTemplate.java:310)
   at org.alfresco.repo.domain.audit.ibatis.AuditDAOImpl.findAuditEntries(AuditDAOImpl.java:278)
   at org.alfresco.repo.domain.audit.AbstractAuditDAOImpl.findAuditEntries(AbstractAuditDAOImpl.java:459)
   at org.alfresco.repo.audit.AuditComponentImpl.auditQuery(AuditComponentImpl.java:832)
   at org.alfresco.repo.audit.AuditServiceImpl.auditQuery(AuditServiceImpl.java:152)
   at sun.reflect.GeneratedMethodAccessor287.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:616)
   at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
   at net.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:80)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:44)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:132)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
   at $Proxy95.auditQuery(Unknown Source)
   at org.alfresco.repo.tagging.UpdateTagScopesActionExecuter$3.execute(UpdateTagScopesActionExecuter.java:466)
   at org.alfresco.repo.tagging.UpdateTagScopesActionExecuter$3.execute(UpdateTagScopesActionExecuter.java:464)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:377)
   at org.alfresco.repo.tagging.UpdateTagScopesActionExecuter.searchForTagScopesPendingUpdates(UpdateTagScopesActionExecuter.java:463)
   at org.alfresco.repo.tagging.UpdateTagScopesQuartzJob$1.doWork(UpdateTagScopesQuartzJob.java:92)
   at org.alfresco.repo.tagging.UpdateTagScopesQuartzJob$1.doWork(UpdateTagScopesQuartzJob.java:88)
   at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:508)
   at org.alfresco.repo.tagging.UpdateTagScopesQuartzJob.execute(UpdateTagScopesQuartzJob.java:87)
   at org.alfresco.repo.tagging.UpdateTagScopesQuartzJob.execute(UpdateTagScopesQuartzJob.java:75)
   at org.quartz.core.JobRunShell.run(JobRunShell.java:216)
   at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549)
Caused by: com.ibatis.common.jdbc.exception.NestedSQLException:  
— The error occurred while applying a parameter map. 
— Check the alfresco.audit.select_AuditEntriesWithoutValues-InlineParameterMap. 
— Check the statement (query failed). 
— Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'entry.audit_app_id' in 'on clause'
   at com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeQueryWithCallback(MappedStatement.java:201)
   at com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeQueryForList(MappedStatement.java:139)
   at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:567)
   at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForList(SqlMapSessionImpl.java:126)
   at org.springframework.orm.ibatis.SqlMapClientTemplate$4.doInSqlMapClient(SqlMapClientTemplate.java:312)
   at org.springframework.orm.ibatis.SqlMapClientTemplate$4.doInSqlMapClient(SqlMapClientTemplate.java:1)
   at org.springframework.orm.ibatis.SqlMapClientTemplate.execute(SqlMapClientTemplate.java:200)
   … 32 more
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'entry.audit_app_id' in 'on clause'
   at sun.reflect.GeneratedConstructorAccessor388.newInstance(Unknown Source)
   at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
   at java.lang.reflect.Constructor.newInstance(Constructor.java:532)
   at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
   at com.mysql.jdbc.Util.getInstance(Util.java:381)
   at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1031)
   at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
   at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3558)
   at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3490)
   at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1959)
   at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2109)
   at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2648)
   at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2077)
   at com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:1356)
   at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:169)
   at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:169)
   at com.ibatis.sqlmap.engine.execution.SqlExecutor.executeQuery(SqlExecutor.java:229)
   at com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.sqlExecuteQuery(MappedStatement.java:221)
   at com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeQueryWithCallback(MappedStatement.java:189)
   … 38 more

While Alfresco does run correctly, it would be nice to have it run "cleanly" without the errors. Is there another place that I should be changing the configuration? We do not need auditing - I THOUGHT we had it turned off - but it looks like I am missing something. Any help would be appreciated.

Outcomes