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

IllegalOperationException: Repair - Rebuild Maven repository metadata

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.29.0
    • Fix Version/s: 3.30.0
    • Component/s: Maven, Scheduled Tasks
    • Labels:
      None

      Description

      1. Upload any jar to maven-releases
      2. Delete its maven-metadata.xml, but keep the checksum files
      3. Create task Repair - Rebuild Maven repository metadata with Rebuild checksums checked
      4. Run the task and observe error in the console:

      ERROR [quartz-9-thread-13] *SYSTEM org.sonatype.nexus.repository.maven.tasks.RebuildMaven2MetadataTask - Failed to run task 'Rebuilding Maven Metadata of *' on repository 'maven-releases'
      org.sonatype.nexus.repository.IllegalOperationException: maven-releases/foo/bar/1.0/bar-1.0.jar.sha512 cannot be updated
      	at org.sonatype.nexus.repository.content.facet.ContentFacetSupport.throwNotAllowed(ContentFacetSupport.java:301)
      	at org.sonatype.nexus.repository.content.facet.ContentFacetSupport.checkAttachAllowed(ContentFacetSupport.java:290)
      	at org.sonatype.nexus.repository.content.fluent.internal.FluentAssetBuilderImpl.save(FluentAssetBuilderImpl.java:115)
      	at org.sonatype.nexus.content.maven.internal.recipe.MavenContentFacetImpl.saveAsset(MavenContentFacetImpl.java:304)
      	at org.sonatype.nexus.content.maven.internal.recipe.MavenContentFacetImpl.save(MavenContentFacetImpl.java:227)
      	at org.sonatype.nexus.content.maven.internal.recipe.MavenContentFacetImpl.put(MavenContentFacetImpl.java:202)
      	at org.sonatype.nexus.repository.maven.internal.content.DatastoreMetadataRebuilder$Worker.put(DatastoreMetadataRebuilder.java:192)
      	at org.sonatype.nexus.repository.maven.internal.hosted.metadata.AbstractMetadataRebuilder$Worker.mayUpdateChecksum(AbstractMetadataRebuilder.java:327)
      	at org.sonatype.nexus.repository.maven.internal.content.DatastoreMetadataRebuilder$Worker.processAsset(DatastoreMetadataRebuilder.java:242)
      	at org.sonatype.nexus.repository.maven.internal.content.DatastoreMetadataRebuilder$Worker.rebuildMetadataInner(DatastoreMetadataRebuilder.java:225)
      	at org.sonatype.nexus.repository.maven.internal.hosted.metadata.AbstractMetadataRebuilder$Worker.rebuildMetadata(AbstractMetadataRebuilder.java:232)
      	at org.sonatype.nexus.repository.maven.internal.content.DatastoreMetadataRebuilder.rebuildInTransaction(DatastoreMetadataRebuilder.java:101)
      	at org.sonatype.nexus.content.maven.internal.recipe.MavenMetadataRebuildFacetImpl.rebuildMetadata(MavenMetadataRebuildFacetImpl.java:124)
      	at org.sonatype.nexus.repository.maven.tasks.RebuildMaven2MetadataTask.execute(RebuildMaven2MetadataTask.java:60)
      	at org.sonatype.nexus.repository.RepositoryTaskSupport.execute(RepositoryTaskSupport.java:79)
      	at org.sonatype.nexus.scheduling.TaskSupport.call(TaskSupport.java:100)
      	at org.sonatype.nexus.quartz.internal.task.QuartzTaskJob.doExecute(QuartzTaskJob.java:143)
      	at org.sonatype.nexus.quartz.internal.task.QuartzTaskJob.execute(QuartzTaskJob.java:106)
      	at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
      	at org.sonatype.nexus.quartz.internal.QuartzThreadPool.lambda$0(QuartzThreadPool.java:145)
      	at org.sonatype.nexus.thread.internal.MDCAwareRunnable.run(MDCAwareRunnable.java:40)
      	at org.apache.shiro.subject.support.SubjectRunnable.doRun(SubjectRunnable.java:120)
      	at org.apache.shiro.subject.support.SubjectRunnable.run(SubjectRunnable.java:108)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      	at java.lang.Thread.run(Thread.java:748)
      2021-02-10 12:45:19,938+0000 WARN  [quartz-9-thread-13] *SYSTEM org.sonatype.nexus.quartz.internal.task.QuartzTaskJob - Task 41c34c15-c434-4954-b9dc-6e52ec00552f : 'g' [repository.maven.rebuild-metadata] execution failure
      org.sonatype.goodies.common.MultipleFailures$MultipleFailuresException: Failed to run task 'Rebuilding Maven Metadata of *'; 1 failure
      	at org.sonatype.goodies.common.MultipleFailures.maybePropagate(MultipleFailures.java:95)
      	at org.sonatype.nexus.repository.RepositoryTaskSupport.execute(RepositoryTaskSupport.java:90)
      	at org.sonatype.nexus.scheduling.TaskSupport.call(TaskSupport.java:100)
      	at org.sonatype.nexus.quartz.internal.task.QuartzTaskJob.doExecute(QuartzTaskJob.java:143)
      	at org.sonatype.nexus.quartz.internal.task.QuartzTaskJob.execute(QuartzTaskJob.java:106)
      	at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
      	at org.sonatype.nexus.quartz.internal.QuartzThreadPool.lambda$0(QuartzThreadPool.java:145)
      	at org.sonatype.nexus.thread.internal.MDCAwareRunnable.run(MDCAwareRunnable.java:40)
      	at org.apache.shiro.subject.support.SubjectRunnable.doRun(SubjectRunnable.java:120)
      	at org.apache.shiro.subject.support.SubjectRunnable.run(SubjectRunnable.java:108)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      	at java.lang.Thread.run(Thread.java:748)
      	Suppressed: org.sonatype.nexus.repository.IllegalOperationException: maven-releases/foo/bar/1.0/bar-1.0.jar.sha512 cannot be updated
      		at org.sonatype.nexus.repository.content.facet.ContentFacetSupport.throwNotAllowed(ContentFacetSupport.java:301)
      		at org.sonatype.nexus.repository.content.facet.ContentFacetSupport.checkAttachAllowed(ContentFacetSupport.java:290)
      		at org.sonatype.nexus.repository.content.fluent.internal.FluentAssetBuilderImpl.save(FluentAssetBuilderImpl.java:115)
      		at org.sonatype.nexus.content.maven.internal.recipe.MavenContentFacetImpl.saveAsset(MavenContentFacetImpl.java:304)
      		at org.sonatype.nexus.content.maven.internal.recipe.MavenContentFacetImpl.save(MavenContentFacetImpl.java:227)
      		at org.sonatype.nexus.content.maven.internal.recipe.MavenContentFacetImpl.put(MavenContentFacetImpl.java:202)
      		at org.sonatype.nexus.repository.maven.internal.content.DatastoreMetadataRebuilder$Worker.put(DatastoreMetadataRebuilder.java:192)
      		at org.sonatype.nexus.repository.maven.internal.hosted.metadata.AbstractMetadataRebuilder$Worker.mayUpdateChecksum(AbstractMetadataRebuilder.java:327)
      		at org.sonatype.nexus.repository.maven.internal.content.DatastoreMetadataRebuilder$Worker.processAsset(DatastoreMetadataRebuilder.java:242)
      		at org.sonatype.nexus.repository.maven.internal.content.DatastoreMetadataRebuilder$Worker.rebuildMetadataInner(DatastoreMetadataRebuilder.java:225)
      		at org.sonatype.nexus.repository.maven.internal.hosted.metadata.AbstractMetadataRebuilder$Worker.rebuildMetadata(AbstractMetadataRebuilder.java:232)
      		at org.sonatype.nexus.repository.maven.internal.content.DatastoreMetadataRebuilder.rebuildInTransaction(DatastoreMetadataRebuilder.java:101)
      		at org.sonatype.nexus.content.maven.internal.recipe.MavenMetadataRebuildFacetImpl.rebuildMetadata(MavenMetadataRebuildFacetImpl.java:124)
      		at org.sonatype.nexus.repository.maven.tasks.RebuildMaven2MetadataTask.execute(RebuildMaven2MetadataTask.java:60)
      		at org.sonatype.nexus.repository.RepositoryTaskSupport.execute(RepositoryTaskSupport.java:79)
      		... 13 common frames omitted
      

        Attachments

          Activity

            People

            Assignee:
            bradbeck Brad Beck
            Reporter:
            dsawa Dawid Sawa
            Last Updated By:
            Joe Tom Joe Tom
            Team:
            NXRM - Groot
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Date of First Response:

                tigCommentSecurity.panel-title