cancel
Showing results for 
Search instead for 
Did you mean: 

After completion (committed) Lucene exception

omkaaraa
Champ in-the-making
Champ in-the-making
Hi,

I am using Alfresco 3.0 (Community) , tomcat 5.5 and UNIX.
My Java program reads document from disk (one system) and upload those documents to alfresco (another system). After loading some documents (not fixed how many, some times more  than10K , some times less than 500) In catelina log, I can see following errors.

01:06:48,864 User:admin ERROR [repo.transaction.AlfrescoTransactionSupport] After completion (committed) Lucene exception
java.lang.IllegalMonitorStateException
        at java.util.concurrent.locks.ReentrantReadWriteLock$Sync.tryReleaseShared(ReentrantReadWriteLock.java:363)
        at java.util.concurrent.locks.AbstractQueuedSynchronizer.releaseShared(AbstractQueuedSynchronizer.java:1317)
        at java.util.concurrent.locks.ReentrantReadWriteLock$ReadLock.unlock(ReentrantReadWriteLock.java:745)
        at org.alfresco.repo.search.impl.lucene.index.IndexInfo.releaseReadLock(IndexInfo.java:3583)
        at org.alfresco.repo.search.impl.lucene.index.IndexInfo.setStatus(IndexInfo.java:1222)
        at org.alfresco.repo.search.impl.lucene.AbstractLuceneBase.setStatus(AbstractLuceneBase.java:257)
        at org.alfresco.repo.search.impl.lucene.AbstractLuceneIndexerImpl.commit(AbstractLuceneIndexerImpl.java:418)
        at org.alfresco.repo.search.impl.lucene.AbstractLuceneIndexerAndSearcherFactory.commit(AbstractLuceneIndexerAndSearcherFactory.java:679)
        at org.alfresco.repo.transaction.AlfrescoTransactionSupport$TransactionSynchronizationImpl.afterCompletion(AlfrescoTransactionSupport.java:794)
        at org.springframework.transaction.support.TransactionSynchronizationUtils.invokeAfterCompletion(TransactionSynchronizationUtils.java:133)
        at org.springframework.transaction.support.AbstractPlatformTransactionManager.invokeAfterCompletion(AbstractPlatformTransactionManager.java:904)
        at org.springframework.transaction.support.AbstractPlatformTransactionManager.triggerAfterCompletion(AbstractPlatformTransactionManager.java:879)
        at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:707)
        at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:632)
        at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:314)
        at org.alfresco.util.transaction.SpringAwareUserTransaction.commit(SpringAwareUserTransaction.java:431)
        at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:308)
        at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:209)
        at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecute(RepositoryContainer.java:320)
        at org.alfresco.repo.web.scripts.RepositoryContainer.executeScript(RepositoryContainer.java:264)
        at org.alfresco.web.scripts.AbstractRuntime.executeScript(AbstractRuntime.java:240)
        at org.alfresco.web.scripts.AbstractRuntime.executeScript(AbstractRuntime.java:139)
        at org.alfresco.web.scripts.servlet.WebScriptServlet.service(WebScriptServlet.java:116)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
        at org.alfresco.web.app.servlet.MTWebScriptAuthenticationFilter.doFilter(MTWebScriptAuthenticationFilter.java:102)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
        at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
        at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
        at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
        at java.lang.Thread.run(Thread.java:662)

—–

—-

01:06:49,623 User:admin ERROR [repo.transaction.AlfrescoTransactionSupport] After completion (rolled-back) Lucene exception
java.lang.IllegalMonitorStateException
        at java.util.concurrent.locks.ReentrantReadWriteLock$Sync.tryReleaseShared(ReentrantReadWriteLock.java:363)
        at java.util.concurrent.locks.AbstractQueuedSynchronizer.releaseShared(AbstractQueuedSynchronizer.java:1317)
        at java.util.concurrent.locks.ReentrantReadWriteLock$ReadLock.unlock(ReentrantReadWriteLock.java:745)
        at org.alfresco.repo.search.impl.lucene.index.IndexInfo.releaseReadLock(IndexInfo.java:3583)
        at org.alfresco.repo.search.impl.lucene.index.IndexInfo.setStatus(IndexInfo.java:1222)
        at org.alfresco.repo.search.impl.lucene.AbstractLuceneBase.setStatus(AbstractLuceneBase.java:257)
        at org.alfresco.repo.search.impl.lucene.AbstractLuceneIndexerImpl.rollback(AbstractLuceneIndexerImpl.java:524)
        at org.alfresco.repo.search.impl.lucene.AbstractLuceneIndexerAndSearcherFactory.rollback(AbstractLuceneIndexerAndSearcherFactory.java:755)
        at org.alfresco.repo.transaction.AlfrescoTransactionSupport$TransactionSynchronizationImpl.afterCompletion(AlfrescoTransactionSupport.java:798)
        at org.springframework.transaction.support.TransactionSynchronizationUtils.invokeAfterCompletion(TransactionSynchronizationUtils.java:133)
        at org.springframework.transaction.support.AbstractPlatformTransactionManager.invokeAfterCompletion(AbstractPlatformTransactionManager.java:904)
        at org.springframework.transaction.support.AbstractPlatformTransactionManager.triggerAfterCompletion(AbstractPlatformTransactionManager.java:879)
        at org.springframework.transaction.support.AbstractPlatformTransactionManager.doRollbackOnCommitException(AbstractPlatformTransactionManager.java:822)
        at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:697)
        at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:632)
        at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:314)
        at org.alfresco.util.transaction.SpringAwareUserTransaction.commit(SpringAwareUserTransaction.java:431)
        at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:308)
        at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:209)
        at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecute(RepositoryContainer.java:320)
        at org.alfresco.repo.web.scripts.RepositoryContainer.executeScript(RepositoryContainer.java:264)
        at org.alfresco.web.scripts.AbstractRuntime.executeScript(AbstractRuntime.java:240)
        at org.alfresco.web.scripts.AbstractRuntime.executeScript(AbstractRuntime.java:139)
        at org.alfresco.web.scripts.servlet.WebScriptServlet.service(WebScriptServlet.java:116)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
        at org.alfresco.web.app.servlet.MTWebScriptAuthenticationFilter.doFilter(MTWebScriptAuthenticationFilter.java:102)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
        at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
        at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
        at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
        at java.lang.Thread.run(Thread.java:662)
[Unloading class sun.reflect.GeneratedSerializationConstructorAccessor19]
dys02907web07:


Also.. it stops documents upload process. Now question is..

a.) Is it possible that Alfresco will crash due to this?
b.) Root cause of this problem?
c.) solution (urgent).

I am new to this forum. I do not know whether I have posted this question at right place or not. Help needed.
4 REPLIES 4

openpj
Elite Collaborator
Elite Collaborator
Probably you have a deadlock for accessing in read/write Lucene indexes on your file system.

Try to increase the maximum number of your file handlers on your operating system.
It seems that you have a problem during the concurrent operation for reading indexes but it depends on your operating system.

Hope this helps.

omkaaraa
Champ in-the-making
Champ in-the-making
Thank you for reply Smiley Happy
I checked how to increase number of file handlers in UNIX. Probably you are talking about File descriptor. Findings are:
 
  We can increase File handler size at user level.
  and session level too.

I will change it at user level and will monitor whether I am getting same error or not. Will let you know soon.

Some more information about same program:
I am running 10 threads to upload documents.
10 separate Java threads are picking up files and uploading documents on Alfresco server.

omkaaraa
Champ in-the-making
Champ in-the-making
Now file handler size is :
$ ulimit -Hn
32768
$ ulimit -Sn
32768

Still same error.. Also sometimes below exceptions..

When this lucene related exception occurrs.. other exception also occurs. Otherwise everything goes smooth.
I think root cause is this lucene exception. We took backup of index and restarted as suggested on this forum. Nothing worked.

So any other suggestion (Except upgration of Alfresco version) ?

sbonami
Champ on-the-rise
Champ on-the-rise
I noticed your thread was almost 4 years old, but I have the same problem. Did you find a solution perhaps?