java.lang.IllegalArgumentException: Rebuild hosted npm metadata task misconfiguration: no npm repository with ID npmgroup

Sonatype JIRA | Kelly Robinson | 2 years 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

    The rebuild task configuration allows both repositories and groups, but if you select a group it results in an error. {code} jvm 1 | 2015-02-05 16:27:20,877-0800 DEBUG [qtp413353615-810] admin com.sonatype.nexus.analytics.internal.EventRecorderImpl - Record: EventData{type='REST', timestamp=1423182440873, sequence=640, duration=3904595, userId='admin', sessionId='8266dd72-de48-4af4-95b6-74ca830af8ba', attributes={path=/service/local/schedule_run/6, method=GET, ui=true, status=200}} jvm 1 | 2015-02-05 16:27:20,878-0800 WARN [pxpool-1-thread-8] admin org.sonatype.scheduling.DefaultScheduledTask - Exception in call method of scheduled task NPM Rebuild jvm 1 | java.lang.IllegalArgumentException: Rebuild hosted npm metadata task misconfiguration: no npm repository with ID npmgroup jvm 1 | at com.bolyuba.nexus.plugin.npm.task.NpmHostedMetadataRebuildTask.getAffectedRepositories(NpmHostedMetadataRebuildTask.java:89) ~[na:na] jvm 1 | at com.bolyuba.nexus.plugin.npm.task.NpmHostedMetadataRebuildTask.getMessage(NpmHostedMetadataRebuildTask.java:66) ~[na:na] jvm 1 | at org.sonatype.nexus.scheduling.AbstractNexusTask.getLoggedMessage(AbstractNexusTask.java:192) ~[nexus-core-2.11.2-01.jar:2.11.2-01] jvm 1 | at org.sonatype.nexus.scheduling.AbstractNexusTask.call(AbstractNexusTask.java:139) ~[nexus-core-2.11.2-01.jar:2.11.2-01] jvm 1 | at org.sonatype.scheduling.DefaultScheduledTask.call(DefaultScheduledTask.java:418) ~[nexus-scheduler-2.11.2-01.jar:2.11.2-01] jvm 1 | at org.sonatype.nexus.threads.MDCAwareCallable.call(MDCAwareCallable.java:44) [nexus-core-2.11.2-01.jar:2.11.2-01] jvm 1 | at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90) [shiro-core-1.2.3.jar:1.2.3] jvm 1 | at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83) [shiro-core-1.2.3.jar:1.2.3] jvm 1 | at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_31] jvm 1 | at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [na:1.8.0_31] jvm 1 | at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [na:1.8.0_31] jvm 1 | at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_31] jvm 1 | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_31] jvm 1 | at java.lang.Thread.run(Thread.java:745) [na:1.8.0_31] jvm 1 | Caused by: org.sonatype.nexus.proxy.NoSuchRepositoryException: Repository with ID="npmgroup" not found jvm 1 | at org.sonatype.nexus.proxy.registry.DefaultRepositoryRegistry.getRepositoryWithFacet(DefaultRepositoryRegistry.java:138) ~[nexus-core-2.11.2-01.jar:2.11.2-01] jvm 1 | at com.bolyuba.nexus.plugin.npm.task.NpmHostedMetadataRebuildTask.getAffectedRepositories(NpmHostedMetadataRebuildTask.java:84) ~[na:na] jvm 1 | ... 13 common frames omitted {code} Appears to work as expected for hosted repos.

    Sonatype JIRA | 2 years ago | Kelly Robinson
    java.lang.IllegalArgumentException: Rebuild hosted npm metadata task misconfiguration: no npm repository with ID npmgroup

    Root Cause Analysis

    1. org.sonatype.nexus.proxy.NoSuchRepositoryException

      Repository with ID="npmgroup" not found

      at org.sonatype.nexus.proxy.registry.DefaultRepositoryRegistry.getRepositoryWithFacet()
    2. ${project.groupId}:${project.artifactId}
      DefaultRepositoryRegistry.getRepositoryWithFacet
      1. org.sonatype.nexus.proxy.registry.DefaultRepositoryRegistry.getRepositoryWithFacet(DefaultRepositoryRegistry.java:138)[nexus-core-2.11.2-01.jar:2.11.2-01]
      1 frame
    3. com.bolyuba.nexus
      NpmHostedMetadataRebuildTask.getMessage
      1. com.bolyuba.nexus.plugin.npm.task.NpmHostedMetadataRebuildTask.getAffectedRepositories(NpmHostedMetadataRebuildTask.java:84)[na:na]
      2. com.bolyuba.nexus.plugin.npm.task.NpmHostedMetadataRebuildTask.getMessage(NpmHostedMetadataRebuildTask.java:66)[na:na]
      2 frames
    4. ${project.groupId}:${project.artifactId}
      AbstractNexusTask.call
      1. org.sonatype.nexus.scheduling.AbstractNexusTask.getLoggedMessage(AbstractNexusTask.java:192)[nexus-core-2.11.2-01.jar:2.11.2-01]
      2. org.sonatype.nexus.scheduling.AbstractNexusTask.call(AbstractNexusTask.java:139)[nexus-core-2.11.2-01.jar:2.11.2-01]
      2 frames
    5. ${project.groupId}:${project.artifactId}
      DefaultScheduledTask.call
      1. org.sonatype.scheduling.DefaultScheduledTask.call(DefaultScheduledTask.java:418)[nexus-scheduler-2.11.2-01.jar:2.11.2-01]
      1 frame
    6. ${project.groupId}:${project.artifactId}
      MDCAwareCallable.call
      1. org.sonatype.nexus.threads.MDCAwareCallable.call(MDCAwareCallable.java:44)[nexus-core-2.11.2-01.jar:2.11.2-01]
      1 frame
    7. Shiro
      SubjectCallable.call
      1. org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)[shiro-core-1.2.3.jar:1.2.3]
      2. org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)[shiro-core-1.2.3.jar:1.2.3]
      2 frames
    8. Java RT
      Thread.run
      1. java.util.concurrent.FutureTask.run(FutureTask.java:266)[na:1.8.0_31]
      2. java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)[na:1.8.0_31]
      3. java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)[na:1.8.0_31]
      4. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[na:1.8.0_31]
      5. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[na:1.8.0_31]
      6. java.lang.Thread.run(Thread.java:745)[na:1.8.0_31]
      6 frames