Uploaded image for project: 'Artifactory Binary Repository'
  1. Artifactory Binary Repository
  2. RTFACT-12344

Deploying a GEM with a non-numeric character in the version will produce a server error when calculating the meta-data

    Details

    • Type: Bug
    • Status: Open
    • Priority: Normal
    • Resolution: Unresolved
    • Affects Version/s: 4.11.1, 4.11.2
    • Fix Version/s: None
    • Component/s: RubyGems
    • Labels:
      None

      Description

      Deploying a GEM with a non-numeric character in the version will produce a server error when calculating the metadata.

      These non-numeric values should be supported: http://guides.rubygems.org/patterns/#prerelease-gems

      For example, if an artifact with the name some-valid-gem-0.1.1.beta32.gem is uploaded, it will cause the meta-data calculation to fail with this error:

      Error in artifactory.log

      java.lang.NullPointerException: null
      	at org.codehaus.mojo.versions.ordering.NumericVersionComparator.compare(NumericVersionComparator.java:48) ~[versions-maven-plugin-1.3.1.jar:na]
      	at org.artifactory.addon.gems.index.merge.NvpComparator.compare(NvpComparator.java:30) ~[artifactory-addon-gems-4.11.1.jar:na]
      	at org.artifactory.addon.gems.index.merge.NvpComparator.compare(NvpComparator.java:1) ~[artifactory-addon-gems-4.11.1.jar:na]
      	at org.artifactory.addon.gems.index.merge.DoubleIterator$Merge.computeNext(DoubleIterator.java:47) ~[artifactory-addon-gems-4.11.1.jar:na]
      	at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143) ~[guava-18.0.jar:na]
      	at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138) ~[guava-18.0.jar:na]
      	at com.google.common.collect.Iterators$7.computeNext(Iterators.java:650) ~[guava-18.0.jar:na]
      	at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143) ~[guava-18.0.jar:na]
      	at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138) ~[guava-18.0.jar:na]
      	at org.artifactory.addon.gems.helpers.UpdateIndexHelper$LatestVersionIterator.computeNext(UpdateIndexHelper.java:196) ~[artifactory-addon-gems-4.11.1.jar:na]
      	at org.artifactory.addon.gems.helpers.UpdateIndexHelper$LatestVersionIterator.computeNext(UpdateIndexHelper.java:1) ~[artifactory-addon-gems-4.11.1.jar:na]
      	at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143) ~[guava-18.0.jar:na]
      	at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138) ~[guava-18.0.jar:na]
      	at org.artifactory.addon.gems.index.merge.DoubleIterator$Delete.computeNext(DoubleIterator.java:64) ~[artifactory-addon-gems-4.11.1.jar:na]
      	at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143) ~[guava-18.0.jar:na]
      	at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138) ~[guava-18.0.jar:na]
      	at org.artifactory.addon.gems.helpers.UpdateIndexHelper.calcEstimatedSize(UpdateIndexHelper.java:163) ~[artifactory-addon-gems-4.11.1.jar:na]
      	at org.artifactory.addon.gems.helpers.UpdateIndexHelper.updateAndSave(UpdateIndexHelper.java:120) ~[artifactory-addon-gems-4.11.1.jar:na]
      	at org.artifactory.addon.gems.index.GemsLocalIndexHandler.doUpdateIndex(GemsLocalIndexHandler.java:192) ~[artifactory-addon-gems-4.11.1.jar:na]
      	at org.artifactory.addon.gems.index.GemsLocalIndexHandler.updateIndex(GemsLocalIndexHandler.java:141) ~[artifactory-addon-gems-4.11.1.jar:na]
      	at org.artifactory.addon.gems.index.GemsLocalIndexHandler$UpdateIndicesJob.onExecute(GemsLocalIndexHandler.java:260) ~[artifactory-addon-gems-4.11.1.jar:na]
      	at org.artifactory.schedule.quartz.QuartzCommand.execute(QuartzCommand.java:52) ~[artifactory-storage-common-4.11.1.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:104) [artifactory-storage-common-4.11.1.jar:na]
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_91]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_91]
      	at java.lang.Thread.run(Thread.java:745) [na:1.8.0_91]
      2016-08-26 01:28:28,203 [art-exec-4] [ERROR] (o.q.c.ErrorLogger   :2425) - Job (artifactory.UpdateIndicesJob#ab1373e1-ac14-45e8-a2c5-d6eb0d7319bc threw an exception.
      org.quartz.SchedulerException: Job threw an unhandled exception.
      	at org.quartz.core.JobRunShell.run(JobRunShell.java:213) ~[quartz-2.2.1.jar:na]
      	at org.artifactory.schedule.ArtifactoryConcurrentExecutor$RunnableWrapper.run(ArtifactoryConcurrentExecutor.java:104) [artifactory-storage-common-4.11.1.jar:na]
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_91]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_91]
      	at java.lang.Thread.run(Thread.java:745) [na:1.8.0_91]
      Caused by: java.lang.NullPointerException: null
      	at org.codehaus.mojo.versions.ordering.NumericVersionComparator.compare(NumericVersionComparator.java:48) ~[versions-maven-plugin-1.3.1.jar:na]
      	at org.artifactory.addon.gems.index.merge.NvpComparator.compare(NvpComparator.java:30) ~[artifactory-addon-gems-4.11.1.jar:na]
      	at org.artifactory.addon.gems.index.merge.NvpComparator.compare(NvpComparator.java:1) ~[artifactory-addon-gems-4.11.1.jar:na]
      	at org.artifactory.addon.gems.index.merge.DoubleIterator$Merge.computeNext(DoubleIterator.java:47) ~[artifactory-addon-gems-4.11.1.jar:na]
      	at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143) ~[guava-18.0.jar:na]
      	at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138) ~[guava-18.0.jar:na]
      	at com.google.common.collect.Iterators$7.computeNext(Iterators.java:650) ~[guava-18.0.jar:na]
      	at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143) ~[guava-18.0.jar:na]
      	at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138) ~[guava-18.0.jar:na]
      	at org.artifactory.addon.gems.helpers.UpdateIndexHelper$LatestVersionIterator.computeNext(UpdateIndexHelper.java:196) ~[artifactory-addon-gems-4.11.1.jar:na]
      	at org.artifactory.addon.gems.helpers.UpdateIndexHelper$LatestVersionIterator.computeNext(UpdateIndexHelper.java:1) ~[artifactory-addon-gems-4.11.1.jar:na]
      	at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143) ~[guava-18.0.jar:na]
      	at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138) ~[guava-18.0.jar:na]
      	at org.artifactory.addon.gems.index.merge.DoubleIterator$Delete.computeNext(DoubleIterator.java:64) ~[artifactory-addon-gems-4.11.1.jar:na]
      	at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143) ~[guava-18.0.jar:na]
      	at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138) ~[guava-18.0.jar:na]
      	at org.artifactory.addon.gems.helpers.UpdateIndexHelper.calcEstimatedSize(UpdateIndexHelper.java:163) ~[artifactory-addon-gems-4.11.1.jar:na]
      	at org.artifactory.addon.gems.helpers.UpdateIndexHelper.updateAndSave(UpdateIndexHelper.java:120) ~[artifactory-addon-gems-4.11.1.jar:na]
      	at org.artifactory.addon.gems.index.GemsLocalIndexHandler.doUpdateIndex(GemsLocalIndexHandler.java:192) ~[artifactory-addon-gems-4.11.1.jar:na]
      	at org.artifactory.addon.gems.index.GemsLocalIndexHandler.updateIndex(GemsLocalIndexHandler.java:141) ~[artifactory-addon-gems-4.11.1.jar:na]
      	at org.artifactory.addon.gems.index.GemsLocalIndexHandler$UpdateIndicesJob.onExecute(GemsLocalIndexHandler.java:260) ~[artifactory-addon-gems-4.11.1.jar:na]
      	at org.artifactory.schedule.quartz.QuartzCommand.execute(QuartzCommand.java:52) ~[artifactory-storage-common-4.11.1.jar:na]
      	at org.quartz.core.JobRunShell.run(JobRunShell.java:202) ~[quartz-2.2.1.jar:na]
      	... 4 common frames omitted
      

      To Reproduce

      1. Create a gems repository
      2. Upload a gem with a name like this: pacojp-skutil-0.0.8.beta12.gem
      For example (Gem Attached):
      curl -XPUT -u admin:password http://192.168.99.100:8081/artifactory/gems-local/gems/pacojp-skutil-0.0.8.beta12.gem --upload-file pacojp-skutil-0.0.8.gem

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              arturoa Arturo Aparicio
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: