java.lang.IllegalStateException

If you like a tip written by other Samebug users, mark is as helpful! Marks help our algorithm provide you better solutions and also help other users.
tip

Check if there is no nexus running. If not, delete sonatype-work/nexus/nexus.lock .


rp

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

  • Create an npm hosted repo. Create a staging profile. You can select the npm hosted repo as the Release Repository. Stage an artifact. Try to release the staging repo. Release fails with 500 error. {noformat} jvm 1 | 2014-10-07 14:45:40,146-0300 INFO [qtp273957304-92] admin com.sonatype.nexus.staging.internal.DefaultStagingManager - Releasing staging repositories [stage-1000] jvm 1 | 2014-10-07 14:45:40,154-0300 WARN [qtp273957304-92] admin com.sonatype.nexus.staging.internal.DefaultStagingManager - Abort background; task preparations failed jvm 1 | java.lang.IllegalStateException: Repository: M2Repository(id=stage-1000) is not compatible with target repository: DefaultNpmHostedRepository(id=npm) jvm 1 | at com.google.common.base.Preconditions.checkState(Preconditions.java:200) ~[guava-16.0.1.jar:na] jvm 1 | at com.sonatype.nexus.staging.internal.task.RepositoryReleaseTask$ReleaseItem.<init>(RepositoryReleaseTask.java:136) ~[nexus-staging-plugin-2.10.0-02/:na] jvm 1 | at com.sonatype.nexus.staging.internal.task.RepositoryReleaseTask$ReleaseItem.<init>(RepositoryReleaseTask.java:125) ~[nexus-staging-plugin-2.10.0-02/:na] jvm 1 | at com.sonatype.nexus.staging.internal.task.RepositoryReleaseTask.createItem(RepositoryReleaseTask.java:203) ~[nexus-staging-plugin-2.10.0-02/:na] jvm 1 | at com.sonatype.nexus.staging.internal.task.RepositoryReleaseTask.createItem(RepositoryReleaseTask.java:1) ~[nexus-staging-plugin-2.10.0-02/:na] jvm 1 | at com.sonatype.nexus.staging.internal.task.OperationTaskSupport$1.doApply(OperationTaskSupport.java:125) ~[nexus-staging-plugin-2.10.0-02/:na] jvm 1 | at com.sonatype.nexus.staging.internal.task.OperationTaskSupport$1.doApply(OperationTaskSupport.java:1) ~[nexus-staging-plugin-2.10.0-02/:n {noformat} Expected: - do not allow npm hosted repos to be a release repository for a staging profile
    via by Peter Lynch,
  • No title
    via by Unknown author,
  • Titan data corruption
    via Stack Overflow by crak
    ,
  • Mob Spawner Crash Command
    via GitHub by WilliePlaysMC
    ,
  • Perform a staging bulk promote operation (multiple staging repositories) - if one of these promoted members is internally marked as "in transition" from another staging operation, then the independent bulk promote operation can leave some of the staging repository members in transition and not editable in the UI from then on. A restart is required to get out of this state. {noformat} 2016-04-30 05:12:13 DEBUG [qtp2124695070-30852] admin com.sonatype.nexus.staging.rest.repository.RepositoryResource - Fetching: jboss_releases_staging_profile-8163 2016-04-30 05:12:13 DEBUG [qtp2124695070-30823] admin com.sonatype.nexus.staging.rest.repository.RepositoryListResource - Listing repositories 2016-04-30 05:12:21 DEBUG [qtp2124695070-30852] admin com.sonatype.nexus.staging.rest.bulk.BulkPromoteResource - Preforming staging action: PROMOTE on repositories: [fusesource_releases_internal-1406, fusesource_releases_external-2336, fusesource_releases_external-2337, fusesource_releases_external-2341, fusesource_releases_external-2342, jboss_releases_staging_profile-8163] 2016-04-30 05:12:21 INFO [qtp2124695070-30852] admin com.sonatype.nexus.staging.internal.DefaultStagingManager - Promoting staging repositories [fusesource_releases_internal-1406, fusesource_releases_external-2336, fusesource_releases_external-2337, fusesource_releases_external-2341, fusesource_releases_external-2342, jboss_releases_staging_profile-8163] to group profile 5992e1cc22908 2016-04-30 05:12:21 DEBUG [qtp2124695070-30852] admin com.sonatype.nexus.staging.internal.DefaultStagingManager - Preparing background task: com.sonatype.nexus.staging.internal.task.RepositoryPromoteTask@4f50d46e 2016-04-30 05:12:21 DEBUG [qtp2124695070-30852] admin com.sonatype.nexus.staging.internal.task.RepositoryPromoteTask - Resolving operation item for: fusesource_releases_internal-1406 2016-04-30 05:12:21 DEBUG [qtp2124695070-30852] admin com.sonatype.nexus.staging.internal.task.RepositoryPromoteTask - Resolving operation item for: fusesource_releases_external-2336 2016-04-30 05:12:21 DEBUG [qtp2124695070-30852] admin com.sonatype.nexus.staging.internal.task.RepositoryPromoteTask - Resolving operation item for: fusesource_releases_external-2337 2016-04-30 05:12:21 DEBUG [qtp2124695070-30852] admin com.sonatype.nexus.staging.internal.task.RepositoryPromoteTask - Resolving operation item for: fusesource_releases_external-2341 2016-04-30 05:12:21 DEBUG [qtp2124695070-30852] admin com.sonatype.nexus.staging.internal.task.RepositoryPromoteTask - Resolving operation item for: fusesource_releases_external-2342 2016-04-30 05:12:21 DEBUG [qtp2124695070-30852] admin com.sonatype.nexus.staging.internal.task.RepositoryPromoteTask - Resolving operation item for: jboss_releases_staging_profile-8163 2016-04-30 05:12:21 DEBUG [qtp2124695070-30852] admin com.sonatype.nexus.staging.internal.task.RepositoryPromoteTask - 6 members: 2016-04-30 05:12:21 DEBUG [qtp2124695070-30852] admin com.sonatype.nexus.staging.internal.task.RepositoryPromoteTask - PromoteItem{id=fusesource_releases_internal-1406, state=closed, group=false} 2016-04-30 05:12:21 DEBUG [qtp2124695070-30852] admin com.sonatype.nexus.staging.internal.task.RepositoryPromoteTask - PromoteItem{id=fusesource_releases_external-2336, state=closed, group=false} 2016-04-30 05:12:21 DEBUG [qtp2124695070-30852] admin com.sonatype.nexus.staging.internal.task.RepositoryPromoteTask - PromoteItem{id=fusesource_releases_external-2337, state=closed, group=false} 2016-04-30 05:12:21 DEBUG [qtp2124695070-30852] admin com.sonatype.nexus.staging.internal.task.RepositoryPromoteTask - PromoteItem{id=fusesource_releases_external-2341, state=closed, group=false} 2016-04-30 05:12:21 DEBUG [qtp2124695070-30852] admin com.sonatype.nexus.staging.internal.task.RepositoryPromoteTask - PromoteItem{id=fusesource_releases_external-2342, state=closed, group=false} 2016-04-30 05:12:21 DEBUG [qtp2124695070-30852] admin com.sonatype.nexus.staging.internal.task.RepositoryPromoteTask - PromoteItem{id=jboss_releases_staging_profile-8163, state=closed, group=false} 2016-04-30 05:12:21 DEBUG [qtp2124695070-30852] admin com.sonatype.nexus.staging.internal.persist.StagingConfigurationSource - Saving configuration: /services/nexus/sonatype-work/nexus/conf/staging.xml 2016-04-30 05:12:21 INFO [qtp2124695070-30852] admin org.sonatype.nexus.configuration.ModelUtils - Saving model /services/nexus/sonatype-work/nexus/conf/staging.xml 2016-04-30 05:12:21 DEBUG [qtp2124695070-30852] admin com.sonatype.nexus.staging.internal.task.RepositoryPromoteTask - Ensuring preconditions: PromoteItem{id=fusesource_releases_internal-1406, state=closed, group=false} 2016-04-30 05:12:21 DEBUG [qtp2124695070-30852] admin com.sonatype.nexus.staging.internal.task.RepositoryPromoteTask - Ensuring preconditions: PromoteItem{id=fusesource_releases_external-2336, state=closed, group=false} 2016-04-30 05:12:21 DEBUG [qtp2124695070-30852] admin com.sonatype.nexus.staging.internal.task.RepositoryPromoteTask - Ensuring preconditions: PromoteItem{id=fusesource_releases_external-2337, state=closed, group=false} 2016-04-30 05:12:21 DEBUG [qtp2124695070-30852] admin com.sonatype.nexus.staging.internal.task.RepositoryPromoteTask - Ensuring preconditions: PromoteItem{id=fusesource_releases_external-2341, state=closed, group=false} 2016-04-30 05:12:21 DEBUG [qtp2124695070-30852] admin com.sonatype.nexus.staging.internal.task.RepositoryPromoteTask - Ensuring preconditions: PromoteItem{id=fusesource_releases_external-2342, state=closed, group=false} 2016-04-30 05:12:21 DEBUG [qtp2124695070-30852] admin com.sonatype.nexus.staging.internal.task.RepositoryPromoteTask - Ensuring preconditions: PromoteItem{id=jboss_releases_staging_profile-8163, state=closed, group=false} 2016-04-30 05:12:21 DEBUG [qtp2124695070-30852] admin com.sonatype.nexus.staging.internal.DefaultStagingManager - Transitioning true: fusesource_releases_internal-1406 2016-04-30 05:12:21 DEBUG [qtp2124695070-30852] admin com.sonatype.nexus.staging.internal.DefaultStagingManager - Transitioning true: fusesource_releases_external-2336 2016-04-30 05:12:21 DEBUG [qtp2124695070-30852] admin com.sonatype.nexus.staging.internal.DefaultStagingManager - Transitioning true: fusesource_releases_external-2337 2016-04-30 05:12:21 DEBUG [qtp2124695070-30852] admin com.sonatype.nexus.staging.internal.DefaultStagingManager - Transitioning true: fusesource_releases_external-2341 2016-04-30 05:12:21 DEBUG [qtp2124695070-30852] admin com.sonatype.nexus.staging.internal.DefaultStagingManager - Transitioning true: fusesource_releases_external-2342 2016-04-30 05:12:21 DEBUG [qtp2124695070-30852] admin com.sonatype.nexus.staging.internal.DefaultStagingManager - Staging repository is already transitioning: fusesource_releases_external-2342; repositories in transition: [fusesource_releases_internal-1406, fusesource_releases_external-2317, fusesource_releases_external-2329, fusesource_releases_external-2319, fusesource_releases_external-2318, fusesource_releases_internal-1402, fusesource_releases_internal-1401, fusesource_releases_external-2342, fusesource_releases_external-2333, fusesource_releases_external-2341, fusesource_releases_external-2332, fusesource_releases_external-2322, fusesource_releases_external-2321, fusesource_releases_external-2337, fusesource_releases_external-2336, jboss_releases_staging_profile-8099, jboss_releases_staging_profile-8108] 2016-04-30 05:12:21 WARN [qtp2124695070-30852] admin com.sonatype.nexus.staging.internal.DefaultStagingManager - Abort background; task preparations failed java.lang.IllegalStateException: Staging repository is already transitioning: fusesource_releases_external-2342 at com.google.common.base.Preconditions.checkState(Preconditions.java:200) ~[guava-16.0.1.jar:na] at com.sonatype.nexus.staging.internal.DefaultStagingManager.ensureCompatibleTransition(DefaultStagingManager.java:171) [nexus-staging-plugin-2.13.0-01/:na] at com.sonatype.nexus.staging.internal.DefaultStagingManager.setTransitioning(DefaultStagingManager.java:180) [nexus-staging-plugin-2.13.0-01/:na] at com.sonatype.nexus.staging.internal.task.OperationTaskSupport$OperationSupport.transitioning(OperationTaskSupport.java:217) ~[nexus-staging-plugin-2.13.0-01/:na] at com.sonatype.nexus.staging.internal.task.OperationTaskSupport$OperationSupport.transitioning(OperationTaskSupport.java:212) ~[nexus-staging-plugin-2.13.0-01/:na] at com.sonatype.nexus.staging.internal.task.OperationTaskSupport.prepare(OperationTaskSupport.java:393) ~[nexus-staging-plugin-2.13.0-01/:na] at com.sonatype.nexus.staging.internal.task.RepositoryPromoteTask.prepare(RepositoryPromoteTask.java:363) ~[nexus-staging-plugin-2.13.0-01/:na] at com.sonatype.nexus.staging.internal.DefaultStagingManager.prepareBackgroundTask(DefaultStagingManager.java:196) [nexus-staging-plugin-2.13.0-01/:na] at com.sonatype.nexus.staging.internal.DefaultStagingManager.promoteToGroupStagingRepositories(DefaultStagingManager.java:342) [nexus-staging-plugin-2.13.0-01/:na] at com.sonatype.nexus.staging.rest.bulk.BulkPromoteResource.doPost(BulkPromoteResource.java:78) [nexus-staging-plugin-2.13.0-01/:na] at com.sonatype.nexus.staging.rest.bulk.BulkResourceSupport.post(BulkResourceSupport.java:84) [nexus-staging-plugin-2.13.0-01/:na] at org.sonatype.plexus.rest.resource.RestletResource.acceptRepresentation(RestletResource.java:262) [nexus-restlet1x-plugin-2.13.0-01/:na] at org.sonatype.nexus.rest.NexusRestletResource.acceptRepresentation(NexusRestletResource.java:70) [nexus-restlet1x-plugin-2.13.0-01/:na] at org.restlet.resource.Resource.post(Resource.java:688) [nexus-restlet1x-plugin-2.13.0-01/:na] at org.restlet.resource.Resource.handlePost(Resource.java:537) [nexus-restlet1x-plugin-2.13.0-01/:na] at org.restlet.Finder.handle(Finder.java:357) [nexus-restlet1x-plugin-2.13.0-01/:na] at org.restlet.Filter.doHandle(Filter.java:150) [nexus-restlet1x-plugin-2.13.0-01/:na] at org.restlet.Filter.handle(Filter.java:195) [nexus-restlet1x-plugin-2.13.0-01/:na] {noformat} In the above example fusesource_releases_external-2336, fusesource_releases_external-2337,fusesource_releases_external-2341 are all left internally marked as in transition and when viewed from the staging UI after this operation, cannot be promoted, dropped, or released until Nexus is restarted. Expected: - Nexus should keep track of transition state more carefully inside of transactions and unwind any set transition states if the enclosing operation fails - should not have to restart Nexus to get out of this state
    via by Peter Lynch,
    • java.lang.IllegalStateException: Repository: M2Repository(id=stage-1000) is not compatible with target repository: DefaultNpmHostedRepository(id=npm) at com.google.common.base.Preconditions.checkState(Preconditions.java:200)[guava-16.0.1.jar:na] at com.sonatype.nexus.staging.internal.task.RepositoryReleaseTask$ReleaseItem.<init>(RepositoryReleaseTask.java:136)[nexus-staging-plugin-2.10.0-02/:na] at com.sonatype.nexus.staging.internal.task.RepositoryReleaseTask$ReleaseItem.<init>(RepositoryReleaseTask.java:125)[nexus-staging-plugin-2.10.0-02/:na] at com.sonatype.nexus.staging.internal.task.RepositoryReleaseTask.createItem(RepositoryReleaseTask.java:203)[nexus-staging-plugin-2.10.0-02/:na] at com.sonatype.nexus.staging.internal.task.RepositoryReleaseTask.createItem(RepositoryReleaseTask.java:1)[nexus-staging-plugin-2.10.0-02/:na] at com.sonatype.nexus.staging.internal.task.OperationTaskSupport$1.doApply(OperationTaskSupport.java:125)[nexus-staging-plugin-2.10.0-02/:na]

    Users with the same issue

    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    84 more bugmates