java.io.IOException: Error detected parsing the header

JFrog JIRA | moixcruz | 1 year ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    If I deploy the artifact via 'mvn deploy' or even with 'Deploy artifacts to Maven repository' post build action, the binary is sent to Artifactory and properly deployed, but when using 'Deploy artifacts to Artifactory' post build action, the artifact is apparently sent fine but metadata and pom.xml is not generated, thus cannot be used as a normal maven dependency. Enabling debug messages in artifactory, I see following trace: {noformat} 2015-10-13 13:41:00,585 [art-exec-5] [ERROR] (o.a.s.a.ArchiveIndexerImpl:163) - Failed to index 'libs-snapshot:org/company/product/artifact/0.0.1-SNAPSHOT/artifact-0.0.1-20151013.114054-1.war': Error detected parsing the header 2015-10-13 13:41:00,597 [art-exec-5] [DEBUG] (o.a.s.a.ArchiveIndexerImpl:164) - Failed to index: java.io.IOException: Error detected parsing the header at org.apache.commons.compress.archivers.tar.TarArchiveInputStream.getNextTarEntry(TarArchiveInputStream.java:280) ~[commons-compress-1.10.jar:1.10] at org.apache.commons.compress.archivers.tar.TarArchiveInputStream.getNextEntry(TarArchiveInputStream.java:558) ~[commons-compress-1.10.jar:1.10] at org.artifactory.storage.fs.VfsArchiveFile.entries(VfsArchiveFile.java:78) ~[artifactory-storage-common-4.1.0.jar:na] at org.artifactory.search.archive.ArchiveIndexerImpl.index(ArchiveIndexerImpl.java:149) [artifactory-core-4.1.0.jar:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_60] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_60] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_60] at java.lang.reflect.Method.invoke(Method.java:497) ~[na:1.8.0_60] at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) [spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) [spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) [spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE] at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99) [spring-tx-4.1.5.RELEASE.jar:4.1.5.RELEASE] at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281) [spring-tx-4.1.5.RELEASE.jar:4.1.5.RELEASE] at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96) [spring-tx-4.1.5.RELEASE.jar:4.1.5.RELEASE] at org.artifactory.storage.fs.lock.aop.LockingAdvice.invoke(LockingAdvice.java:64) [artifactory-storage-common-4.1.0.jar:na] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) [spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE] at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207) [spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE] at com.sun.proxy.$Proxy84.index(Unknown Source) [na:na] at org.artifactory.search.archive.ArchiveIndexerImpl.triggerQueueIndexing(ArchiveIndexerImpl.java:196) [artifactory-core-4.1.0.jar:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_60] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_60] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_60] at java.lang.reflect.Method.invoke(Method.java:497) ~[na:1.8.0_60] at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) [spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE] at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:201) [spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE] at com.sun.proxy.$Proxy84.triggerQueueIndexing(Unknown Source) [na:na] at org.artifactory.search.archive.ArchiveIndexerImpl$ArchiveIndexJob.onExecute(ArchiveIndexerImpl.java:323) [artifactory-core-4.1.0.jar:na] at org.artifactory.schedule.quartz.QuartzCommand.execute(QuartzCommand.java:50) [artifactory-storage-common-4.1.0.jar:na] at org.quartz.core.JobRunShell.run(JobRunShell.java:202) [quartz-2.2.1.jar:na] at org.artifactory.schedule.ArtifactoryConcurrentExecutor$RunnableWrapper.run(ArtifactoryConcurrentExecutor.java:102) [artifactory-storage-common-4.1.0.jar:na] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_60] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_60] at java.lang.Thread.run(Thread.java:745) [na:1.8.0_60] Caused by: java.lang.IllegalArgumentException: Invalid byte 77 at offset 0 in 'MANIFEST' len=8 at org.apache.commons.compress.archivers.tar.TarUtils.parseOctal(TarUtils.java:137) ~[commons-compress-1.10.jar:1.10] at org.apache.commons.compress.archivers.tar.TarUtils.parseOctalOrBinary(TarUtils.java:168) ~[commons-compress-1.10.jar:1.10] at org.apache.commons.compress.archivers.tar.TarArchiveEntry.parseTarHeader(TarArchiveEntry.java:1007) ~[commons-compress-1.10.jar:1.10] at org.apache.commons.compress.archivers.tar.TarArchiveEntry.parseTarHeader(TarArchiveEntry.java:996) ~[commons-compress-1.10.jar:1.10] at org.apache.commons.compress.archivers.tar.TarArchiveEntry.<init>(TarArchiveEntry.java:326) ~[commons-compress-1.10.jar:1.10] at org.apache.commons.compress.archivers.tar.TarArchiveInputStream.getNextTarEntry(TarArchiveInputStream.java:278) ~[commons-compress-1.10.jar:1.10] ... 32 common frames omitted {noformat} Environment details: * Artifactory OSS, 4.1.0 rev 40011 * Jenkins Artifactory plugin 2.3.1

    JFrog JIRA | 1 year ago | moixcruz
    java.io.IOException: Error detected parsing the header
  2. 0

    If I deploy the artifact via 'mvn deploy' or even with 'Deploy artifacts to Maven repository' post build action, the binary is sent to Artifactory and properly deployed, but when using 'Deploy artifacts to Artifactory' post build action, the artifact is apparently sent fine but metadata and pom.xml is not generated, thus cannot be used as a normal maven dependency. Enabling debug messages in artifactory, I see following trace: {noformat} 2015-10-13 13:41:00,585 [art-exec-5] [ERROR] (o.a.s.a.ArchiveIndexerImpl:163) - Failed to index 'libs-snapshot:org/company/product/artifact/0.0.1-SNAPSHOT/artifact-0.0.1-20151013.114054-1.war': Error detected parsing the header 2015-10-13 13:41:00,597 [art-exec-5] [DEBUG] (o.a.s.a.ArchiveIndexerImpl:164) - Failed to index: java.io.IOException: Error detected parsing the header at org.apache.commons.compress.archivers.tar.TarArchiveInputStream.getNextTarEntry(TarArchiveInputStream.java:280) ~[commons-compress-1.10.jar:1.10] at org.apache.commons.compress.archivers.tar.TarArchiveInputStream.getNextEntry(TarArchiveInputStream.java:558) ~[commons-compress-1.10.jar:1.10] at org.artifactory.storage.fs.VfsArchiveFile.entries(VfsArchiveFile.java:78) ~[artifactory-storage-common-4.1.0.jar:na] at org.artifactory.search.archive.ArchiveIndexerImpl.index(ArchiveIndexerImpl.java:149) [artifactory-core-4.1.0.jar:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_60] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_60] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_60] at java.lang.reflect.Method.invoke(Method.java:497) ~[na:1.8.0_60] at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) [spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) [spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) [spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE] at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99) [spring-tx-4.1.5.RELEASE.jar:4.1.5.RELEASE] at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281) [spring-tx-4.1.5.RELEASE.jar:4.1.5.RELEASE] at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96) [spring-tx-4.1.5.RELEASE.jar:4.1.5.RELEASE] at org.artifactory.storage.fs.lock.aop.LockingAdvice.invoke(LockingAdvice.java:64) [artifactory-storage-common-4.1.0.jar:na] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) [spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE] at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207) [spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE] at com.sun.proxy.$Proxy84.index(Unknown Source) [na:na] at org.artifactory.search.archive.ArchiveIndexerImpl.triggerQueueIndexing(ArchiveIndexerImpl.java:196) [artifactory-core-4.1.0.jar:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_60] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_60] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_60] at java.lang.reflect.Method.invoke(Method.java:497) ~[na:1.8.0_60] at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) [spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE] at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:201) [spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE] at com.sun.proxy.$Proxy84.triggerQueueIndexing(Unknown Source) [na:na] at org.artifactory.search.archive.ArchiveIndexerImpl$ArchiveIndexJob.onExecute(ArchiveIndexerImpl.java:323) [artifactory-core-4.1.0.jar:na] at org.artifactory.schedule.quartz.QuartzCommand.execute(QuartzCommand.java:50) [artifactory-storage-common-4.1.0.jar:na] at org.quartz.core.JobRunShell.run(JobRunShell.java:202) [quartz-2.2.1.jar:na] at org.artifactory.schedule.ArtifactoryConcurrentExecutor$RunnableWrapper.run(ArtifactoryConcurrentExecutor.java:102) [artifactory-storage-common-4.1.0.jar:na] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_60] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_60] at java.lang.Thread.run(Thread.java:745) [na:1.8.0_60] Caused by: java.lang.IllegalArgumentException: Invalid byte 77 at offset 0 in 'MANIFEST' len=8 at org.apache.commons.compress.archivers.tar.TarUtils.parseOctal(TarUtils.java:137) ~[commons-compress-1.10.jar:1.10] at org.apache.commons.compress.archivers.tar.TarUtils.parseOctalOrBinary(TarUtils.java:168) ~[commons-compress-1.10.jar:1.10] at org.apache.commons.compress.archivers.tar.TarArchiveEntry.parseTarHeader(TarArchiveEntry.java:1007) ~[commons-compress-1.10.jar:1.10] at org.apache.commons.compress.archivers.tar.TarArchiveEntry.parseTarHeader(TarArchiveEntry.java:996) ~[commons-compress-1.10.jar:1.10] at org.apache.commons.compress.archivers.tar.TarArchiveEntry.<init>(TarArchiveEntry.java:326) ~[commons-compress-1.10.jar:1.10] at org.apache.commons.compress.archivers.tar.TarArchiveInputStream.getNextTarEntry(TarArchiveInputStream.java:278) ~[commons-compress-1.10.jar:1.10] ... 32 common frames omitted {noformat} Environment details: * Artifactory OSS, 4.1.0 rev 40011 * Jenkins Artifactory plugin 2.3.1

    JFrog JIRA | 1 year ago | moixcruz
    java.io.IOException: Error detected parsing the header

    1 unregistered visitors

    Root Cause Analysis

    1. java.lang.IllegalArgumentException

      Invalid byte 77 at offset 0 in 'MANIFEST' len=8

      at org.apache.commons.compress.archivers.tar.TarUtils.parseOctal()
    2. Apache Commons Compress
      TarArchiveInputStream.getNextEntry
      1. org.apache.commons.compress.archivers.tar.TarUtils.parseOctal(TarUtils.java:137)[commons-compress-1.10.jar:1.10]
      2. org.apache.commons.compress.archivers.tar.TarUtils.parseOctalOrBinary(TarUtils.java:168)[commons-compress-1.10.jar:1.10]
      3. org.apache.commons.compress.archivers.tar.TarArchiveEntry.parseTarHeader(TarArchiveEntry.java:1007)[commons-compress-1.10.jar:1.10]
      4. org.apache.commons.compress.archivers.tar.TarArchiveEntry.parseTarHeader(TarArchiveEntry.java:996)[commons-compress-1.10.jar:1.10]
      5. org.apache.commons.compress.archivers.tar.TarArchiveEntry.<init>(TarArchiveEntry.java:326)[commons-compress-1.10.jar:1.10]
      6. org.apache.commons.compress.archivers.tar.TarArchiveInputStream.getNextTarEntry(TarArchiveInputStream.java:278)[commons-compress-1.10.jar:1.10]
      7. org.apache.commons.compress.archivers.tar.TarArchiveInputStream.getNextEntry(TarArchiveInputStream.java:558)[commons-compress-1.10.jar:1.10]
      7 frames
    3. org.artifactory.storage
      VfsArchiveFile.entries
      1. org.artifactory.storage.fs.VfsArchiveFile.entries(VfsArchiveFile.java:78)[artifactory-storage-common-4.1.0.jar:na]
      1 frame
    4. org.artifactory.search
      ArchiveIndexerImpl.index
      1. org.artifactory.search.archive.ArchiveIndexerImpl.index(ArchiveIndexerImpl.java:149)[artifactory-core-4.1.0.jar:na]
      1 frame
    5. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[na:1.8.0_60]
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[na:1.8.0_60]
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[na:1.8.0_60]
      4. java.lang.reflect.Method.invoke(Method.java:497)[na:1.8.0_60]
      4 frames
    6. Spring AOP
      ReflectiveMethodInvocation.proceed
      1. org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)[spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE]
      2. org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)[spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE]
      3. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)[spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE]
      3 frames
    7. Spring Tx
      TransactionInterceptor.invoke
      1. org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)[spring-tx-4.1.5.RELEASE.jar:4.1.5.RELEASE]
      2. org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)[spring-tx-4.1.5.RELEASE.jar:4.1.5.RELEASE]
      3. org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)[spring-tx-4.1.5.RELEASE.jar:4.1.5.RELEASE]
      3 frames
    8. org.artifactory.storage
      LockingAdvice.invoke
      1. org.artifactory.storage.fs.lock.aop.LockingAdvice.invoke(LockingAdvice.java:64)[artifactory-storage-common-4.1.0.jar:na]
      1 frame
    9. Spring AOP
      JdkDynamicAopProxy.invoke
      1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)[spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE]
      2. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)[spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE]
      2 frames
    10. com.sun.proxy
      $Proxy84.index
      1. com.sun.proxy.$Proxy84.index(Unknown Source)[na:na]
      1 frame
    11. org.artifactory.search
      ArchiveIndexerImpl.triggerQueueIndexing
      1. org.artifactory.search.archive.ArchiveIndexerImpl.triggerQueueIndexing(ArchiveIndexerImpl.java:196)[artifactory-core-4.1.0.jar:na]
      1 frame
    12. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[na:1.8.0_60]
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[na:1.8.0_60]
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[na:1.8.0_60]
      4. java.lang.reflect.Method.invoke(Method.java:497)[na:1.8.0_60]
      4 frames
    13. Spring AOP
      JdkDynamicAopProxy.invoke
      1. org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)[spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE]
      2. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:201)[spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE]
      2 frames
    14. com.sun.proxy
      $Proxy84.triggerQueueIndexing
      1. com.sun.proxy.$Proxy84.triggerQueueIndexing(Unknown Source)[na:na]
      1 frame
    15. org.artifactory.search
      ArchiveIndexerImpl$ArchiveIndexJob.onExecute
      1. org.artifactory.search.archive.ArchiveIndexerImpl$ArchiveIndexJob.onExecute(ArchiveIndexerImpl.java:323)[artifactory-core-4.1.0.jar:na]
      1 frame
    16. org.artifactory.schedule
      QuartzCommand.execute
      1. org.artifactory.schedule.quartz.QuartzCommand.execute(QuartzCommand.java:50)[artifactory-storage-common-4.1.0.jar:na]
      1 frame
    17. quartz
      JobRunShell.run
      1. org.quartz.core.JobRunShell.run(JobRunShell.java:202)[quartz-2.2.1.jar:na]
      1 frame
    18. org.artifactory.schedule
      ArtifactoryConcurrentExecutor$RunnableWrapper.run
      1. org.artifactory.schedule.ArtifactoryConcurrentExecutor$RunnableWrapper.run(ArtifactoryConcurrentExecutor.java:102)[artifactory-storage-common-4.1.0.jar:na]
      1 frame
    19. Java RT
      Thread.run
      1. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[na:1.8.0_60]
      2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[na:1.8.0_60]
      3. java.lang.Thread.run(Thread.java:745)[na:1.8.0_60]
      3 frames