Uploaded image for project: 'Dev - Nexus Repo'
  1. Dev - Nexus Repo
  2. NEXUS-18520

repository.rebuild-index task TagsComponentEntityAdapterExtension.readFields NullPointerException

    XMLWordPrintable

    Details

    • Story Points:
      2

      Description

      A maven2-hosted repository with the following config:

      {
            "@type": "d",
            "@rid": "#73:15",
            "@version": 1,
            "@class": "repository",
            "recipe_name": "maven2-hosted",
            "repository_name": "test-releases",
            "online": true,
            "attributes": {
              "maven": {
                "versionPolicy": "RELEASE",
                "layoutPolicy": "STRICT"
              },
              "storage": {
                "strictContentTypeValidation": true,
                "writePolicy": "ALLOW_ONCE",
                "blobStoreName": "default"
              }
            }
          },
      
      

      Encountered a problem when the RebuildIndexTask was run against it:

      [0] 2018-11-15 18:46:59,760-0600 ERROR [quartz-2-thread-1] NexusHDQ-One *SYSTEM org.sonatype.nexus.repository.search.RebuildIndexTask - Failed to run task 'Rebuilding search index of *' on repository 'test-releases'
      [0] java.lang.NullPointerException: null
      [0] 	at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:882)
      [0] 	at org.sonatype.nexus.orient.entity.EntityAdapter.readEntity(EntityAdapter.java:277)
      [0] 	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
      [0] 	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
      [0] 	at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
      [0] 	at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382)
      [0] 	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
      [0] 	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
      [0] 	at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
      [0] 	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
      [0] 	at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
      [0] 	at com.sonatype.nexus.tags.storage.internal.TagsComponentEntityAdapterExtension.readFields(TagsComponentEntityAdapterExtension.java:92)
      [0] 	at org.sonatype.nexus.repository.storage.ComponentEntityAdapter.lambda$1(ComponentEntityAdapter.java:221)
      [0] 	at java.lang.Iterable.forEach(Iterable.java:75)
      [0] 	at org.sonatype.nexus.repository.storage.ComponentEntityAdapter.readFields(ComponentEntityAdapter.java:221)
      [0] 	at org.sonatype.nexus.repository.storage.ComponentEntityAdapter.readFields(ComponentEntityAdapter.java:1)
      [0] 	at org.sonatype.nexus.repository.storage.MetadataNodeEntityAdapter.readFields(MetadataNodeEntityAdapter.java:1)
      [0] 	at org.sonatype.nexus.orient.entity.EntityAdapter.readEntity(EntityAdapter.java:284)
      [0] 	at org.sonatype.nexus.orient.entity.action.ReadEntityByIdAction.execute(ReadEntityByIdAction.java:46)
      [0] 	at org.sonatype.nexus.orient.entity.IterableEntityAdapter.read(IterableEntityAdapter.java:89)
      [0] 	at org.sonatype.nexus.repository.search.SearchFacetImpl.json(SearchFacetImpl.java:199)
      [0] 	at org.sonatype.nexus.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:45)
      [0] 	at org.sonatype.nexus.repository.search.SearchServiceImpl.lambda$0(SearchServiceImpl.java:318)
      [0] 	at com.google.common.collect.Iterables$5.lambda$forEach$0(Iterables.java:707)
      [0] 	at com.google.common.collect.Iterables$4.lambda$forEach$0(Iterables.java:568)
      [0] 	at java.lang.Iterable.forEach(Iterable.java:75)
      [0] 	at com.google.common.collect.Iterables$4.forEach(Iterables.java:565)
      [0] 	at com.google.common.collect.Iterables$5.forEach(Iterables.java:707)
      [0] 	at org.sonatype.nexus.repository.search.SearchServiceImpl.bulkPut(SearchServiceImpl.java:315)
      [0] 	at org.sonatype.nexus.repository.search.SearchFacetImpl.bulkPut(SearchFacetImpl.java:133)
      [0] 	at org.sonatype.nexus.common.stateguard.MethodInvocationAction.run(MethodInvocationAction.java:39)
      [0] 	at org.sonatype.nexus.common.stateguard.StateGuard$GuardImpl.run(StateGuard.java:272)
      [0] 	at org.sonatype.nexus.common.stateguard.GuardedInterceptor.invoke(GuardedInterceptor.java:53)
      [0] 	at org.sonatype.nexus.repository.search.SearchFacetImpl.rebuildComponentIndex(SearchFacetImpl.java:115)
      [0] 	at org.sonatype.nexus.transaction.TransactionalWrapper.proceedWithTransaction(TransactionalWrapper.java:56)
      [0] 	at org.sonatype.nexus.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:54)
      [0] 	at org.sonatype.nexus.repository.search.SearchFacetImpl.rebuildIndex(SearchFacetImpl.java:101)
      [0] 	at org.sonatype.nexus.common.stateguard.MethodInvocationAction.run(MethodInvocationAction.java:39)
      [0] 	at org.sonatype.nexus.common.stateguard.StateGuard$GuardImpl.run(StateGuard.java:272)
      [0] 	at org.sonatype.nexus.common.stateguard.GuardedInterceptor.invoke(GuardedInterceptor.java:53)
      [0] 	at org.sonatype.nexus.repository.search.RebuildIndexTask.execute(RebuildIndexTask.java:34)
      [0] 	at org.sonatype.nexus.repository.RepositoryTaskSupport.execute(RepositoryTaskSupport.java:73)
      [0] 	at org.sonatype.nexus.scheduling.TaskSupport.call(TaskSupport.java:93)
      [0] 	at org.sonatype.nexus.quartz.internal.task.QuartzTaskJob.doExecute(QuartzTaskJob.java:145)
      [0] 	at org.sonatype.nexus.quartz.internal.task.QuartzTaskJob.execute(QuartzTaskJob.java:108)
      [0] 	at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
      [0] 	at org.sonatype.nexus.thread.internal.MDCAwareRunnable.run(MDCAwareRunnable.java:40)
      [0] 	at org.apache.shiro.subject.support.SubjectRunnable.doRun(SubjectRunnable.java:120)
      [0] 	at org.apache.shiro.subject.support.SubjectRunnable.run(SubjectRunnable.java:108)
      [0] 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      [0] 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      [0] 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      [0] 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      [0] 	at java.lang.Thread.run(Thread.java:748)
      

      Expected

      NullPointerException should not happen. Code should be defensive.

        Attachments

          Activity

            People

            Assignee:
            natemcafee Nate McAfee
            Reporter:
            plynch Peter Lynch
            Last Updated By:
            Peter Lynch
            Team:
            NXRM - Cypher
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Date of First Response:

                tigCommentSecurity.panel-title