org.artifactory.storage.StorageException: Failed to insert new binary record: ERROR: current transaction is aborted, commands ignored until end of transaction block

JFrog JIRA | Frederic Simon | 4 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    In PostgreSQL a failure to insert marked the transaction as rollback without ability to send more queries. Exception looks like: {code} org.artifactory.storage.StorageException: Failed to insert new binary record: ERROR: current transaction is aborted, commands ignored until end of transaction block at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2157) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1886) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255) at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:555) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:417) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:302) at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96) at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96) at org.artifactory.storage.db.util.JdbcHelper.executeSelect(JdbcHelper.java:90) at org.artifactory.storage.db.binstore.dao.BinariesDao.load(BinariesDao.java:66) at org.artifactory.storage.db.binstore.service.BinaryStoreImpl.insertRecordInDb(BinaryStoreImpl.java:520) at org.artifactory.storage.db.binstore.service.BinaryStoreImpl.addBinary(BinaryStoreImpl.java:320) at sun.reflect.GeneratedMethodAccessor79.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at com.sun.proxy.$Proxy46.addBinary(Unknown Source) at org.artifactory.storage.db.fs.model.DbMutableFile.fillData(DbMutableFile.java:107) at org.artifactory.repo.db.DbStoringRepoMixin.fillFileData(DbStoringRepoMixin.java:573) at org.artifactory.repo.db.DbStoringRepoMixin.saveResource(DbStoringRepoMixin.java:200) at org.artifactory.repo.db.DbLocalRepo.saveResource(DbLocalRepo.java:143) at org.artifactory.engine.UploadServiceImpl.uploadItemWithContent(UploadServiceImpl.java:611) at org.artifactory.engine.UploadServiceImpl.uploadItemWithProvidedContent(UploadServiceImpl.java:589) at org.artifactory.engine.UploadServiceImpl.uploadItem(UploadServiceImpl.java:526) at org.artifactory.engine.UploadServiceImpl.uploadFile(UploadServiceImpl.java:499) at org.artifactory.engine.UploadServiceImpl.uploadArtifact(UploadServiceImpl.java:478) at org.artifactory.engine.UploadServiceImpl.uploadWithinTransaction(UploadServiceImpl.java:150) at sun.reflect.GeneratedMethodAccessor172.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) at org.artifactory.request.aop.RequestAdvice.invoke(RequestAdvice.java:65) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110) at org.artifactory.storage.fs.lock.aop.LockingAdvice.invoke(LockingAdvice.java:64) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at com.sun.proxy.$Proxy49.uploadWithinTransaction(Unknown Source) at org.artifactory.engine.UploadServiceImpl.adjustResponseAndUpload(UploadServiceImpl.java:235) at org.artifactory.engine.UploadServiceImpl.validateRequestAndUpload(UploadServiceImpl.java:190) at org.artifactory.engine.UploadServiceImpl.upload(UploadServiceImpl.java:136) at sun.reflect.GeneratedMethodAccessor171.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:198) at com.sun.proxy.$Proxy49.upload(Unknown Source) at org.artifactory.test.utils.ITestUtils.upload(ITestUtils.java:237) at org.artifactory.test.utils.ITestUtils.upload(ITestUtils.java:216) at org.artifactory.test.utils.ITestUtils.upload(ITestUtils.java:189) at org.artifactory.test.utils.ITestUtils.upload(ITestUtils.java:173) at org.artifactory.test.utils.ITestUtils.upload(ITestUtils.java:163) at org.artifactory.updown.ConcurrentDownloadUploadTest.releaseUpload(ConcurrentDownloadUploadTest.java:66) Standard Output {code}

    JFrog JIRA | 4 years ago | Frederic Simon
    org.artifactory.storage.StorageException: Failed to insert new binary record: ERROR: current transaction is aborted, commands ignored until end of transaction block
  2. 0

    In PostgreSQL a failure to insert marked the transaction as rollback without ability to send more queries. Exception looks like: {code} org.artifactory.storage.StorageException: Failed to insert new binary record: ERROR: current transaction is aborted, commands ignored until end of transaction block at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2157) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1886) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255) at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:555) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:417) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:302) at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96) at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96) at org.artifactory.storage.db.util.JdbcHelper.executeSelect(JdbcHelper.java:90) at org.artifactory.storage.db.binstore.dao.BinariesDao.load(BinariesDao.java:66) at org.artifactory.storage.db.binstore.service.BinaryStoreImpl.insertRecordInDb(BinaryStoreImpl.java:520) at org.artifactory.storage.db.binstore.service.BinaryStoreImpl.addBinary(BinaryStoreImpl.java:320) at sun.reflect.GeneratedMethodAccessor79.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at com.sun.proxy.$Proxy46.addBinary(Unknown Source) at org.artifactory.storage.db.fs.model.DbMutableFile.fillData(DbMutableFile.java:107) at org.artifactory.repo.db.DbStoringRepoMixin.fillFileData(DbStoringRepoMixin.java:573) at org.artifactory.repo.db.DbStoringRepoMixin.saveResource(DbStoringRepoMixin.java:200) at org.artifactory.repo.db.DbLocalRepo.saveResource(DbLocalRepo.java:143) at org.artifactory.engine.UploadServiceImpl.uploadItemWithContent(UploadServiceImpl.java:611) at org.artifactory.engine.UploadServiceImpl.uploadItemWithProvidedContent(UploadServiceImpl.java:589) at org.artifactory.engine.UploadServiceImpl.uploadItem(UploadServiceImpl.java:526) at org.artifactory.engine.UploadServiceImpl.uploadFile(UploadServiceImpl.java:499) at org.artifactory.engine.UploadServiceImpl.uploadArtifact(UploadServiceImpl.java:478) at org.artifactory.engine.UploadServiceImpl.uploadWithinTransaction(UploadServiceImpl.java:150) at sun.reflect.GeneratedMethodAccessor172.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) at org.artifactory.request.aop.RequestAdvice.invoke(RequestAdvice.java:65) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110) at org.artifactory.storage.fs.lock.aop.LockingAdvice.invoke(LockingAdvice.java:64) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at com.sun.proxy.$Proxy49.uploadWithinTransaction(Unknown Source) at org.artifactory.engine.UploadServiceImpl.adjustResponseAndUpload(UploadServiceImpl.java:235) at org.artifactory.engine.UploadServiceImpl.validateRequestAndUpload(UploadServiceImpl.java:190) at org.artifactory.engine.UploadServiceImpl.upload(UploadServiceImpl.java:136) at sun.reflect.GeneratedMethodAccessor171.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:198) at com.sun.proxy.$Proxy49.upload(Unknown Source) at org.artifactory.test.utils.ITestUtils.upload(ITestUtils.java:237) at org.artifactory.test.utils.ITestUtils.upload(ITestUtils.java:216) at org.artifactory.test.utils.ITestUtils.upload(ITestUtils.java:189) at org.artifactory.test.utils.ITestUtils.upload(ITestUtils.java:173) at org.artifactory.test.utils.ITestUtils.upload(ITestUtils.java:163) at org.artifactory.updown.ConcurrentDownloadUploadTest.releaseUpload(ConcurrentDownloadUploadTest.java:66) Standard Output {code}

    JFrog JIRA | 4 years ago | Frederic Simon
    org.artifactory.storage.StorageException: Failed to insert new binary record: ERROR: current transaction is aborted, commands ignored until end of transaction block

    Root Cause Analysis

    1. org.artifactory.storage.StorageException

      Failed to insert new binary record: ERROR: current transaction is aborted, commands ignored until end of transaction block

      at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse()
    2. PostgreSQL JDBC Driver
      AbstractJdbc2Statement.executeQuery
      1. org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2157)
      2. org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1886)
      3. org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)
      4. org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:555)
      5. org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:417)
      6. org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:302)
      6 frames
    3. Commons DBCP
      DelegatingPreparedStatement.executeQuery
      1. org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96)
      2. org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96)
      2 frames
    4. org.artifactory.storage
      BinaryStoreImpl.addBinary
      1. org.artifactory.storage.db.util.JdbcHelper.executeSelect(JdbcHelper.java:90)
      2. org.artifactory.storage.db.binstore.dao.BinariesDao.load(BinariesDao.java:66)
      3. org.artifactory.storage.db.binstore.service.BinaryStoreImpl.insertRecordInDb(BinaryStoreImpl.java:520)
      4. org.artifactory.storage.db.binstore.service.BinaryStoreImpl.addBinary(BinaryStoreImpl.java:320)
      4 frames
    5. Java RT
      Method.invoke
      1. sun.reflect.GeneratedMethodAccessor79.invoke(Unknown Source)
      2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      3. java.lang.reflect.Method.invoke(Method.java:601)
      3 frames
    6. Spring AOP
      ReflectiveMethodInvocation.proceed
      1. org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
      2. org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
      3. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
      3 frames
    7. Spring Tx
      TransactionInterceptor.invoke
      1. org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
      1 frame
    8. Spring AOP
      JdkDynamicAopProxy.invoke
      1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      2. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
      2 frames
    9. com.sun.proxy
      $Proxy46.addBinary
      1. com.sun.proxy.$Proxy46.addBinary(Unknown Source)
      1 frame
    10. org.artifactory.storage
      DbMutableFile.fillData
      1. org.artifactory.storage.db.fs.model.DbMutableFile.fillData(DbMutableFile.java:107)
      1 frame
    11. org.artifactory.repo
      DbLocalRepo.saveResource
      1. org.artifactory.repo.db.DbStoringRepoMixin.fillFileData(DbStoringRepoMixin.java:573)
      2. org.artifactory.repo.db.DbStoringRepoMixin.saveResource(DbStoringRepoMixin.java:200)
      3. org.artifactory.repo.db.DbLocalRepo.saveResource(DbLocalRepo.java:143)
      3 frames
    12. org.artifactory.engine
      UploadServiceImpl.uploadWithinTransaction
      1. org.artifactory.engine.UploadServiceImpl.uploadItemWithContent(UploadServiceImpl.java:611)
      2. org.artifactory.engine.UploadServiceImpl.uploadItemWithProvidedContent(UploadServiceImpl.java:589)
      3. org.artifactory.engine.UploadServiceImpl.uploadItem(UploadServiceImpl.java:526)
      4. org.artifactory.engine.UploadServiceImpl.uploadFile(UploadServiceImpl.java:499)
      5. org.artifactory.engine.UploadServiceImpl.uploadArtifact(UploadServiceImpl.java:478)
      6. org.artifactory.engine.UploadServiceImpl.uploadWithinTransaction(UploadServiceImpl.java:150)
      6 frames
    13. Java RT
      Method.invoke
      1. sun.reflect.GeneratedMethodAccessor172.invoke(Unknown Source)
      2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      3. java.lang.reflect.Method.invoke(Method.java:601)
      3 frames
    14. Spring AOP
      ReflectiveMethodInvocation.proceed
      1. org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
      2. org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
      3. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
      3 frames
    15. org.artifactory.request
      RequestAdvice.invoke
      1. org.artifactory.request.aop.RequestAdvice.invoke(RequestAdvice.java:65)
      1 frame
    16. Spring AOP
      ReflectiveMethodInvocation.proceed
      1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      1 frame
    17. Spring Tx
      TransactionInterceptor.invoke
      1. org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
      1 frame
    18. org.artifactory.storage
      LockingAdvice.invoke
      1. org.artifactory.storage.fs.lock.aop.LockingAdvice.invoke(LockingAdvice.java:64)
      1 frame
    19. Spring AOP
      JdkDynamicAopProxy.invoke
      1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      2. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
      2 frames
    20. com.sun.proxy
      $Proxy49.uploadWithinTransaction
      1. com.sun.proxy.$Proxy49.uploadWithinTransaction(Unknown Source)
      1 frame
    21. org.artifactory.engine
      UploadServiceImpl.upload
      1. org.artifactory.engine.UploadServiceImpl.adjustResponseAndUpload(UploadServiceImpl.java:235)
      2. org.artifactory.engine.UploadServiceImpl.validateRequestAndUpload(UploadServiceImpl.java:190)
      3. org.artifactory.engine.UploadServiceImpl.upload(UploadServiceImpl.java:136)
      3 frames
    22. Java RT
      Method.invoke
      1. sun.reflect.GeneratedMethodAccessor171.invoke(Unknown Source)
      2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      3. java.lang.reflect.Method.invoke(Method.java:601)
      3 frames
    23. Spring AOP
      JdkDynamicAopProxy.invoke
      1. org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
      2. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:198)
      2 frames
    24. com.sun.proxy
      $Proxy49.upload
      1. com.sun.proxy.$Proxy49.upload(Unknown Source)
      1 frame
    25. org.artifactory.test
      ITestUtils.upload
      1. org.artifactory.test.utils.ITestUtils.upload(ITestUtils.java:237)
      2. org.artifactory.test.utils.ITestUtils.upload(ITestUtils.java:216)
      3. org.artifactory.test.utils.ITestUtils.upload(ITestUtils.java:189)
      4. org.artifactory.test.utils.ITestUtils.upload(ITestUtils.java:173)
      5. org.artifactory.test.utils.ITestUtils.upload(ITestUtils.java:163)
      5 frames
    26. org.artifactory.updown
      ConcurrentDownloadUploadTest.releaseUpload
      1. org.artifactory.updown.ConcurrentDownloadUploadTest.releaseUpload(ConcurrentDownloadUploadTest.java:66)
      1 frame