cancel
Showing results for 
Search instead for 
Did you mean: 

Continuous error in logs

yogeshpj
Star Contributor
Star Contributor
Hi All,

I am getting following exception in my logs continuously.
I have disabled the feed jobs but then also I am getting this error.

Can anyone help on this ?

2016-08-27 15:46:15,092  ERROR [post.lookup.PostLookup] [DefaultScheduler_Worker-10] Exception during update of posts:
org.springframework.dao.RecoverableDataAccessException:
### Error querying database.  Cause: java.sql.SQLRecoverableException: Closed Connection
### The error may exist in alfresco/ibatis/#resource.dialect#/activities-common-SqlMap.xml
### The error may involve alfresco.activities.select_activity_posts_by_status-Inline
### The error occurred while setting parameters
### SQL: select           sequence_id as id,          activity_data as activityData,          activity_type as activityType,          post_user_id as userId,          post_date as postDate,          job_task_node as jobTaskNode,          site_network as siteNetwork,          app_tool as appTool,          status as status       from           alf_activity_post       where           status = ?
### Cause: java.sql.SQLRecoverableException: Closed Connection
; SQL []; Closed Connection; nested exception is java.sql.SQLRecoverableException: Closed Connection
        at org.springframework.jdbc.support.SQLExceptionSubclassTranslator.doTranslate(SQLExceptionSubclassTranslator.java:99)
        at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72)
        at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
        at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:73)
        at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:371)
        at com.sun.proxy.$Proxy21.selectList(Unknown Source)
        at org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:205)
        at org.alfresco.repo.domain.activities.ibatis.ActivityPostDAOImpl.selectPosts(ActivityPostDAOImpl.java:51)
        at org.alfresco.repo.activities.post.lookup.PostLookup.execute(PostLookup.java:215)
        at org.alfresco.repo.activities.post.lookup.PostLookupJob.execute(PostLookupJob.java:50)
        at org.quartz.core.JobRunShell.run(JobRunShell.java:216)
        at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:563)
Caused by: java.sql.SQLRecoverableException: Closed Connection
        at oracle.jdbc.driver.OracleStatement.ensureOpen(OracleStatement.java:4051)
        at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3563)
        at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3685)
        at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1376)
        at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:172)
        at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:172)
        at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:172)
        at org.apache.ibatis.executor.statement.PreparedStatementHandler.query(PreparedStatementHandler.java:59)
        at org.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingStatementHandler.java:73)
        at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:60)
        at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:267)
        at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:137)
        at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:96)
        at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:77)
        at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:108)
        at sun.reflect.GeneratedMethodAccessor324.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:483)
        at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:358)
        … 7 more
3 REPLIES 3

romschn
Star Collaborator
Star Collaborator
One option you can try is to add a validation query for the database if it is already not there and see if that works or not.
The way it will help is, basically it will try to execute this validation query before the actual usage and ensures if the connection is available for use.
Hope this helps.

openpj
Elite Collaborator
Elite Collaborator

Try to check if your database server has enough number of connection instance to use for the connection pool dedicated to Alfresco.

Then check if your settings in the alfresco-global.properties fit well with your database, mainly db.pool.max.

Hope this helps.

kaynezhang
World-Class Innovator
World-Class Innovator

Maybe you also need to increase processes, sessions and transactions in oracle.
execute following commands in sqlplus

alter system set processes = 150 scope = spfile;
alter system set sessions = 300 scope = spfile;
alter system set transactions = 330 scope = spfile;