org.sonatype.nexus.proxy.IllegalRequestException: Repository with ID='thirdparty' does not allow updating artifacts.

Sonatype JIRA | Larry Sanders | 2 years ago
  1. 0

    This is an issue with an experimental plugin but I hope it gets some attention because I believe it's pretty widely used capability (since it's so awesome). Per the documentation on [P2 -Repository-Plugin page|https://docs.sonatype.org/display/Nexus/Nexus+OSGi+Experimental+Features+-+P2+Repository+Plugin]: {quote} When this bundle gets deployed it will deploy two files /foo/bar/1.0/bar-1.0.pom and /foo/bar/1.0/bar-1.0.jar. Then the new plugin will read the manifest of bar-1.0.jar bundle and will automatically create /foo/bar/1.0/bar-1.0-p2Artifacts.xml (P2 artifacts.xml) and /foo/bar/1.0/bar-1.0-p2Content.xml (P2 content.xml). If this automatically generated will not suffice you can deploy your own ones that will override the automatically generated ones and be used in the aggregated P2 repository. {quote} One should be able to override the generated p2Artifact.xml and p2Content.xml. Unfortunately, in my case this only "works" if the repository allows redeployment. I am overriding the generated p2 xml's via tycho using eclipse-feature packaging. When it generates the p2 components, it does so with lowercase a and c in p2artifact.xml and p2content.xml. This may not have come up before because it appears to work correctly under linux because the filesystem can contain two files with the same name, but different case. The repository actually ends up having files like: {quote} thirdparty.feature-1.0.0.jar.sha1 thirdparty.feature-1.0.0-p2artifacts.xml thirdparty.feature-1.0.0-p2Artifacts.xml {quote} But under windows, this fails due to write policy enforcement (see partial stack below) Under linux, the onstore event still fires for the p2 bridge and it updates the p2 metadata and things seem to work fine. {code} 2014-09-25 15:47:43,881-0500 TRACE [qtp1825146578-61] deployment org.sonatype.nexus.proxy.storage.local.fs.DefaultFSLocalRepositoryStorage - /com/perceptivesoftware/pif/thirdparty.feature/1.0.0/thirdparty.feature-1.0.0-p2artifacts.xml --> C:\temp\nexus-2.9.1-02-bundle\sonatype-work\nexus\storage\thirdparty\com\perceptivesoftware\pif\thirdparty.feature\1.0.0\thirdparty.feature-1.0.0-p2artifacts.xml 2014-09-25 15:47:43,883-0500 TRACE [qtp1825146578-61] deployment org.sonatype.nexus.content.internal.ContentServlet - Exception org.sonatype.nexus.proxy.IllegalRequestException: Repository with ID='thirdparty' does not allow updating artifacts. at org.sonatype.nexus.proxy.repository.AbstractRepository.enforceWritePolicy(AbstractRepository.java:1205) ~[nexus-core-2.9.1-02.jar:2.9.1-02] at org.sonatype.nexus.proxy.maven.maven2.M2Repository.enforceWritePolicy(M2Repository.java:290) ~[nexus-core-2.9.1-02.jar:2.9.1-02] {code}

    Sonatype JIRA | 2 years ago | Larry Sanders
    org.sonatype.nexus.proxy.IllegalRequestException: Repository with ID='thirdparty' does not allow updating artifacts.
  2. 0

    Why is this an ERROR with a stack trace if the apache-snapshots repo is manually out of service? This could be related to NEXUS-4198 ? {noformat} 2011-04-13 14:14:42 DEBUG [http-3 ] - o.s.n.r.r.Repositor~ - Created ResourceStore request for / 2011-04-13 14:14:42 ERROR [http-3 ] - o.s.n.r.r.Repositor~ - Got exception during processing request "GET http://192.168.1.99:4022/nexus/service/local/repositories/apache-snapshots/content/?isLocal&_dc=1302718482682": org.sonatype.nexus.proxy.IllegalRequestException: Repository with ID='apache-snapshots' is not available (localStatus=OUT_OF_SERVICE)! at org.sonatype.nexus.proxy.repository.AbstractRepository.checkConditions(AbstractRepository.java:1179) at org.sonatype.nexus.proxy.repository.AbstractRepository.retrieveItem(AbstractRepository.java:569) at org.sonatype.nexus.rest.AbstractResourceStoreContentPlexusResource.get(AbstractResourceStoreContentPlexusResource.java:142) at org.sonatype.plexus.rest.resource.RestletResource.represent(RestletResource.java:246) at org.sonatype.nexus.rest.NexusRestletResource.represent(NexusRestletResource.java:52) at org.restlet.resource.Resource.getRepresentation(Resource.java:302) at org.restlet.resource.Resource.handleGet(Resource.java:464) at org.restlet.Finder.handle(Finder.java:353) at org.restlet.Filter.doHandle(Filter.java:150) at org.restlet.Filter.handle(Filter.java:195) at org.restlet.Router.handle(Router.java:504) at org.restlet.Filter.doHandle(Filter.java:150) at org.restlet.Filter.handle(Filter.java:195) at org.restlet.Router.handle(Router.java:504) at org.restlet.Filter.doHandle(Filter.java:150) at org.restlet.Filter.handle(Filter.java:195) at org.restlet.Filter.doHandle(Filter.java:150) at org.sonatype.plexus.rest.RetargetableRestlet.doHandle(RetargetableRestlet.java:39) at org.restlet.Filter.handle(Filter.java:195) at org.restlet.Filter.doHandle(Filter.java:150) at org.restlet.Filter.handle(Filter.java:195) at org.restlet.Filter.doHandle(Filter.java:150) at org.restlet.Filter.handle(Filter.java:195) at org.restlet.Filter.doHandle(Filter.java:150) at com.noelios.restlet.StatusFilter.doHandle(StatusFilter.java:130) at org.restlet.Filter.handle(Filter.java:195) at org.restlet.Filter.doHandle(Filter.java:150) at org.restlet.Filter.handle(Filter.java:195) at com.noelios.restlet.ChainHelper.handle(ChainHelper.java:124) at com.noelios.restlet.application.ApplicationHelper.handle(ApplicationHelper.java:112) at org.restlet.Application.handle(Application.java:341) at org.restlet.ext.wadl.WadlApplication.handle(WadlApplication.java:705) at org.restlet.Filter.doHandle(Filter.java:150) at org.restlet.Filter.handle(Filter.java:195) at org.restlet.Router.handle(Router.java:504) at org.restlet.Filter.doHandle(Filter.java:150) at org.restlet.Filter.handle(Filter.java:195) at org.restlet.Router.handle(Router.java:504) at org.restlet.Filter.doHandle(Filter.java:150) at org.restlet.Filter.handle(Filter.java:195) at com.noelios.restlet.ChainHelper.handle(ChainHelper.java:124) at org.restlet.Component.handle(Component.java:673) at org.restlet.Server.handle(Server.java:331) at com.noelios.restlet.ServerHelper.handle(ServerHelper.java:68) at com.noelios.restlet.http.HttpServerHelper.handle(HttpServerHelper.java:147) at com.noelios.restlet.ext.servlet.ServerServlet.service(ServerServlet.java:881) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61) at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108) at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137) at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:81) at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66) at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108) at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137) at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:81) at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66) at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:359) at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:275) at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90) at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83) at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:344) at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:272) at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:81) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) at org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:883) at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:721) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:2258) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:680) 2011-04-13 14:14:42 DEBUG [http-5 ] - o.a.s.w.s.SimpleCoo~ - Found string value [352aeec0-5f52-4ab4-9ac7-84cf953fe14c] from Cookie [JSESSIONID] {noformat}

    Sonatype JIRA | 6 years ago | Peter Lynch
    org.sonatype.nexus.proxy.IllegalRequestException: Repository with ID='apache-snapshots' is not available (localStatus=OUT_OF_SERVICE)!
  3. 0

    Why is this an ERROR with a stack trace if the apache-snapshots repo is manually out of service? This could be related to NEXUS-4198 ? {noformat} 2011-04-13 14:14:42 DEBUG [http-3 ] - o.s.n.r.r.Repositor~ - Created ResourceStore request for / 2011-04-13 14:14:42 ERROR [http-3 ] - o.s.n.r.r.Repositor~ - Got exception during processing request "GET http://192.168.1.99:4022/nexus/service/local/repositories/apache-snapshots/content/?isLocal&_dc=1302718482682": org.sonatype.nexus.proxy.IllegalRequestException: Repository with ID='apache-snapshots' is not available (localStatus=OUT_OF_SERVICE)! at org.sonatype.nexus.proxy.repository.AbstractRepository.checkConditions(AbstractRepository.java:1179) at org.sonatype.nexus.proxy.repository.AbstractRepository.retrieveItem(AbstractRepository.java:569) at org.sonatype.nexus.rest.AbstractResourceStoreContentPlexusResource.get(AbstractResourceStoreContentPlexusResource.java:142) at org.sonatype.plexus.rest.resource.RestletResource.represent(RestletResource.java:246) at org.sonatype.nexus.rest.NexusRestletResource.represent(NexusRestletResource.java:52) at org.restlet.resource.Resource.getRepresentation(Resource.java:302) at org.restlet.resource.Resource.handleGet(Resource.java:464) at org.restlet.Finder.handle(Finder.java:353) at org.restlet.Filter.doHandle(Filter.java:150) at org.restlet.Filter.handle(Filter.java:195) at org.restlet.Router.handle(Router.java:504) at org.restlet.Filter.doHandle(Filter.java:150) at org.restlet.Filter.handle(Filter.java:195) at org.restlet.Router.handle(Router.java:504) at org.restlet.Filter.doHandle(Filter.java:150) at org.restlet.Filter.handle(Filter.java:195) at org.restlet.Filter.doHandle(Filter.java:150) at org.sonatype.plexus.rest.RetargetableRestlet.doHandle(RetargetableRestlet.java:39) at org.restlet.Filter.handle(Filter.java:195) at org.restlet.Filter.doHandle(Filter.java:150) at org.restlet.Filter.handle(Filter.java:195) at org.restlet.Filter.doHandle(Filter.java:150) at org.restlet.Filter.handle(Filter.java:195) at org.restlet.Filter.doHandle(Filter.java:150) at com.noelios.restlet.StatusFilter.doHandle(StatusFilter.java:130) at org.restlet.Filter.handle(Filter.java:195) at org.restlet.Filter.doHandle(Filter.java:150) at org.restlet.Filter.handle(Filter.java:195) at com.noelios.restlet.ChainHelper.handle(ChainHelper.java:124) at com.noelios.restlet.application.ApplicationHelper.handle(ApplicationHelper.java:112) at org.restlet.Application.handle(Application.java:341) at org.restlet.ext.wadl.WadlApplication.handle(WadlApplication.java:705) at org.restlet.Filter.doHandle(Filter.java:150) at org.restlet.Filter.handle(Filter.java:195) at org.restlet.Router.handle(Router.java:504) at org.restlet.Filter.doHandle(Filter.java:150) at org.restlet.Filter.handle(Filter.java:195) at org.restlet.Router.handle(Router.java:504) at org.restlet.Filter.doHandle(Filter.java:150) at org.restlet.Filter.handle(Filter.java:195) at com.noelios.restlet.ChainHelper.handle(ChainHelper.java:124) at org.restlet.Component.handle(Component.java:673) at org.restlet.Server.handle(Server.java:331) at com.noelios.restlet.ServerHelper.handle(ServerHelper.java:68) at com.noelios.restlet.http.HttpServerHelper.handle(HttpServerHelper.java:147) at com.noelios.restlet.ext.servlet.ServerServlet.service(ServerServlet.java:881) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61) at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108) at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137) at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:81) at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66) at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108) at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137) at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:81) at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66) at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:359) at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:275) at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90) at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83) at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:344) at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:272) at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:81) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) at org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:883) at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:721) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:2258) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:680) 2011-04-13 14:14:42 DEBUG [http-5 ] - o.a.s.w.s.SimpleCoo~ - Found string value [352aeec0-5f52-4ab4-9ac7-84cf953fe14c] from Cookie [JSESSIONID] {noformat}

    Sonatype JIRA | 6 years ago | Peter Lynch
    org.sonatype.nexus.proxy.IllegalRequestException: Repository with ID='apache-snapshots' is not available (localStatus=OUT_OF_SERVICE)!
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. org.sonatype.nexus.proxy.IllegalRequestException

      Repository with ID='thirdparty' does not allow updating artifacts.

      at org.sonatype.nexus.proxy.repository.AbstractRepository.enforceWritePolicy()
    2. ${project.groupId}:${project.artifactId}
      M2Repository.enforceWritePolicy
      1. org.sonatype.nexus.proxy.repository.AbstractRepository.enforceWritePolicy(AbstractRepository.java:1205)[nexus-core-2.9.1-02.jar:2.9.1-02]
      2. org.sonatype.nexus.proxy.maven.maven2.M2Repository.enforceWritePolicy(M2Repository.java:290)[nexus-core-2.9.1-02.jar:2.9.1-02]
      2 frames