org.apache.jackrabbit.core.data.DataStoreException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • The Quartz job that Artifactory runs to update indexes is consistently throwing an exception due to the fact that the connection is closed and the autoReconnect flag is set to false. [9/11/08 18:06:28:980 PDT] 00000045 SystemOut O 2008-09-11 18:06:28,978 [WARN ] (data.db.DbDataStore :588) - Can not insert new record org.apache.jackrabbit.core.data.DataStoreException: Can not insert new record: connection has been closed and autoReconnect == false: connection has been closed and autoReconnect == false at org.apache.jackrabbit.core.data.db.DbDataStore.convert(DbDataStore.java:592) at org.apache.jackrabbit.core.data.db.DbDataStore.addRecord(DbDataStore.java:295) at org.apache.jackrabbit.core.value.BLOBInDataStore.getInstance(BLOBInDataStore.java:120) at org.apache.jackrabbit.core.value.InternalValue.getBLOBFileValue(InternalValue.java:644) at org.apache.jackrabbit.core.value.InternalValue.create(InternalValue.java:123) at org.apache.jackrabbit.core.PropertyImpl.setValue(PropertyImpl.java:609) at org.apache.jackrabbit.core.PropertyImpl.setValue(PropertyImpl.java:525) at org.apache.jackrabbit.core.NodeImpl.setProperty(NodeImpl.java:2309) at org.artifactory.jcr.fs.JcrFile.fillJcrData(JcrFile.java:591) at org.artifactory.jcr.fs.JcrFile.setResourceNode(JcrFile.java:550) at org.artifactory.jcr.fs.JcrFile.<init>(JcrFile.java:80) at org.artifactory.jcr.fs.JcrFile.<init>(JcrFile.java:164) at org.artifactory.repo.index.RepoIndexerData.saveIndexFiles(RepoIndexerData.java:103) at org.artifactory.repo.index.IndexerManagerImpl.saveIndexFiles(IndexerManagerImpl.java:168) at org.artifactory.repo.index.IndexerManagerImpl$$FastClassByCGLIB$$76058b92.invoke(<generated>) at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149) at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:700) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:635) at org.artifactory.repo.index.IndexerManagerImpl$$EnhancerByCGLIB$$7cded8f3.saveIndexFiles(<generated>) at org.artifactory.repo.index.IndexerManagerImpl.index(IndexerManagerImpl.java:137) at org.artifactory.repo.index.IndexerManagerImpl$$FastClassByCGLIB$$76058b92.invoke(<generated>) at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149) at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:700) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:635) at org.artifactory.repo.index.IndexerManagerImpl$$EnhancerByCGLIB$$7cded8f3.index(<generated>) at org.artifactory.repo.index.IndexerJob.onExecute(IndexerJob.java:25) at org.artifactory.schedule.ArtifactoryJob.execute(ArtifactoryJob.java:41) at org.quartz.core.JobRunShell.run(JobRunShell.java:202) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:525) Caused by: java.sql.SQLException: connection has been closed and autoReconnect == false at org.apache.jackrabbit.core.persistence.bundle.util.ConnectionRecoveryManager.getConnection(ConnectionRecoveryManager.java:159) at org.apache.jackrabbit.core.persistence.bundle.util.ConnectionRecoveryManager.executeStmtInternal(ConnectionRecoveryManager.java:287) at org.apache.jackrabbit.core.persistence.bundle.util.ConnectionRecoveryManager.executeStmt(ConnectionRecoveryManager.java:257) at org.apache.jackrabbit.core.persistence.bundle.util.ConnectionRecoveryManager.executeStmt(ConnectionRecoveryManager.java:237) at org.apache.jackrabbit.core.data.db.DbDataStore.addRecord(DbDataStore.java:286) ... 33 more The exception is thrown from the ConnectonRecoveryManager here: public synchronized Connection getConnection() throws SQLException, RepositoryException { if (isClosed) { if (autoReconnect) { reestablishConnection(); } else { throw new SQLException("connection has been closed and autoReconnect == false"); } } return connection; } The autoReconnect flag is by default set to true in the ConnectionRecoveryManager (http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/ConnectionRecoveryManager.java?view=markup), but the problem is that this is set to false in the DbDataStore.addRecord() method: public DataRecord addRecord(InputStream stream) throws DataStoreException { ResultSet rs = null; TempFileInputStream fileInput = null; ConnectionRecoveryManager conn = getConnection(); try { conn.setAutoReconnect(false); // WHY??? //etc... There is a somewhat simplistic Pool class that holds instances of the ConnectionRecoveryManager (http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/data/db/Pool.java?view=markup), but it looks like there is no attempt here to test if the connection is still open (a la DBCP) when it is returned from the Pool. This looks like a Jackrabbit bug, but Artifactory probably needs to find a short-term workaround.
    via by Brennan Spies,
  • The Quartz job that Artifactory runs to update indexes is consistently throwing an exception due to the fact that the connection is closed and the autoReconnect flag is set to false. [9/11/08 18:06:28:980 PDT] 00000045 SystemOut O 2008-09-11 18:06:28,978 [WARN ] (data.db.DbDataStore :588) - Can not insert new record org.apache.jackrabbit.core.data.DataStoreException: Can not insert new record: connection has been closed and autoReconnect == false: connection has been closed and autoReconnect == false at org.apache.jackrabbit.core.data.db.DbDataStore.convert(DbDataStore.java:592) at org.apache.jackrabbit.core.data.db.DbDataStore.addRecord(DbDataStore.java:295) at org.apache.jackrabbit.core.value.BLOBInDataStore.getInstance(BLOBInDataStore.java:120) at org.apache.jackrabbit.core.value.InternalValue.getBLOBFileValue(InternalValue.java:644) at org.apache.jackrabbit.core.value.InternalValue.create(InternalValue.java:123) at org.apache.jackrabbit.core.PropertyImpl.setValue(PropertyImpl.java:609) at org.apache.jackrabbit.core.PropertyImpl.setValue(PropertyImpl.java:525) at org.apache.jackrabbit.core.NodeImpl.setProperty(NodeImpl.java:2309) at org.artifactory.jcr.fs.JcrFile.fillJcrData(JcrFile.java:591) at org.artifactory.jcr.fs.JcrFile.setResourceNode(JcrFile.java:550) at org.artifactory.jcr.fs.JcrFile.<init>(JcrFile.java:80) at org.artifactory.jcr.fs.JcrFile.<init>(JcrFile.java:164) at org.artifactory.repo.index.RepoIndexerData.saveIndexFiles(RepoIndexerData.java:103) at org.artifactory.repo.index.IndexerManagerImpl.saveIndexFiles(IndexerManagerImpl.java:168) at org.artifactory.repo.index.IndexerManagerImpl$$FastClassByCGLIB$$76058b92.invoke(<generated>) at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149) at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:700) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:635) at org.artifactory.repo.index.IndexerManagerImpl$$EnhancerByCGLIB$$7cded8f3.saveIndexFiles(<generated>) at org.artifactory.repo.index.IndexerManagerImpl.index(IndexerManagerImpl.java:137) at org.artifactory.repo.index.IndexerManagerImpl$$FastClassByCGLIB$$76058b92.invoke(<generated>) at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149) at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:700) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:635) at org.artifactory.repo.index.IndexerManagerImpl$$EnhancerByCGLIB$$7cded8f3.index(<generated>) at org.artifactory.repo.index.IndexerJob.onExecute(IndexerJob.java:25) at org.artifactory.schedule.ArtifactoryJob.execute(ArtifactoryJob.java:41) at org.quartz.core.JobRunShell.run(JobRunShell.java:202) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:525) Caused by: java.sql.SQLException: connection has been closed and autoReconnect == false at org.apache.jackrabbit.core.persistence.bundle.util.ConnectionRecoveryManager.getConnection(ConnectionRecoveryManager.java:159) at org.apache.jackrabbit.core.persistence.bundle.util.ConnectionRecoveryManager.executeStmtInternal(ConnectionRecoveryManager.java:287) at org.apache.jackrabbit.core.persistence.bundle.util.ConnectionRecoveryManager.executeStmt(ConnectionRecoveryManager.java:257) at org.apache.jackrabbit.core.persistence.bundle.util.ConnectionRecoveryManager.executeStmt(ConnectionRecoveryManager.java:237) at org.apache.jackrabbit.core.data.db.DbDataStore.addRecord(DbDataStore.java:286) ... 33 more The exception is thrown from the ConnectonRecoveryManager here: public synchronized Connection getConnection() throws SQLException, RepositoryException { if (isClosed) { if (autoReconnect) { reestablishConnection(); } else { throw new SQLException("connection has been closed and autoReconnect == false"); } } return connection; } The autoReconnect flag is by default set to true in the ConnectionRecoveryManager (http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/ConnectionRecoveryManager.java?view=markup), but the problem is that this is set to false in the DbDataStore.addRecord() method: public DataRecord addRecord(InputStream stream) throws DataStoreException { ResultSet rs = null; TempFileInputStream fileInput = null; ConnectionRecoveryManager conn = getConnection(); try { conn.setAutoReconnect(false); // WHY??? //etc... There is a somewhat simplistic Pool class that holds instances of the ConnectionRecoveryManager (http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/data/db/Pool.java?view=markup), but it looks like there is no attempt here to test if the connection is still open (a la DBCP) when it is returned from the Pool. This looks like a Jackrabbit bug, but Artifactory probably needs to find a short-term workaround.
    via by Brennan Spies,
    • org.apache.jackrabbit.core.data.DataStoreException: Can not insert new record: connection has been closed and autoReconnect == false: connection has been closed and autoReconnect == false at org.apache.jackrabbit.core.data.db.DbDataStore.convert(DbDataStore.java:592) at org.apache.jackrabbit.core.data.db.DbDataStore.addRecord(DbDataStore.java:295) at org.apache.jackrabbit.core.value.BLOBInDataStore.getInstance(BLOBInDataStore.java:120) at org.apache.jackrabbit.core.value.InternalValue.getBLOBFileValue(InternalValue.java:644) at org.apache.jackrabbit.core.value.InternalValue.create(InternalValue.java:123) at org.apache.jackrabbit.core.PropertyImpl.setValue(PropertyImpl.java:609) at org.apache.jackrabbit.core.PropertyImpl.setValue(PropertyImpl.java:525) at org.apache.jackrabbit.core.NodeImpl.setProperty(NodeImpl.java:2309) at org.artifactory.jcr.fs.JcrFile.fillJcrData(JcrFile.java:591) at org.artifactory.jcr.fs.JcrFile.setResourceNode(JcrFile.java:550) at org.artifactory.jcr.fs.JcrFile.<init>(JcrFile.java:80) at org.artifactory.jcr.fs.JcrFile.<init>(JcrFile.java:164) at org.artifactory.repo.index.RepoIndexerData.saveIndexFiles(RepoIndexerData.java:103) at org.artifactory.repo.index.IndexerManagerImpl.saveIndexFiles(IndexerManagerImpl.java:168) at org.artifactory.repo.index.IndexerManagerImpl$$FastClassByCGLIB$$76058b92.invoke(<generated>) at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149) at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:700) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:635) at org.artifactory.repo.index.IndexerManagerImpl$$EnhancerByCGLIB$$7cded8f3.saveIndexFiles(<generated>) at org.artifactory.repo.index.IndexerManagerImpl.index(IndexerManagerImpl.java:137) at org.artifactory.repo.index.IndexerManagerImpl$$FastClassByCGLIB$$76058b92.invoke(<generated>) at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149) at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:700) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:635) at org.artifactory.repo.index.IndexerManagerImpl$$EnhancerByCGLIB$$7cded8f3.index(<generated>) at org.artifactory.repo.index.IndexerJob.onExecute(IndexerJob.java:25) at org.artifactory.schedule.ArtifactoryJob.execute(ArtifactoryJob.java:41) at org.quartz.core.JobRunShell.run(JobRunShell.java:202) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:525) Caused by: java.sql.SQLException: connection has been closed and autoReconnect == false at org.apache.jackrabbit.core.persistence.bundle.util.ConnectionRecoveryManager.getConnection(ConnectionRecoveryManager.java:159) at org.apache.jackrabbit.core.persistence.bundle.util.ConnectionRecoveryManager.executeStmtInternal(ConnectionRecoveryManager.java:287) at org.apache.jackrabbit.core.persistence.bundle.util.ConnectionRecoveryManager.executeStmt(ConnectionRecoveryManager.java:257) at org.apache.jackrabbit.core.persistence.bundle.util.ConnectionRecoveryManager.executeStmt(ConnectionRecoveryManager.java:237) at org.apache.jackrabbit.core.data.db.DbDataStore.addRecord(DbDataStore.java:286) ... 33 more
    No Bugmate found.