java.lang.IllegalStateException: Got exception during target mapping!

Sonatype JIRA | Alexandre Navarro | 8 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    I use a user to deploy in the repository. I add on settings.xml <server> <id>frontools_snapshot</id> <username>test</username> <password>c8s6s9q9f4</password> </server> <server> <id>frontools_release</id> <username>test</username> <password>c8s6s9q9f4</password> </server> And in my pom.xml <properties> <frontools.deploy.host>ftmvnrepo.fr.world.socgen</frontools.deploy.host> <frontools.deploy.port>8081</frontools.deploy.port> <frontools.deploy.site.rootpath>/home/frtdevrep/public_html/maven_site</frontools.deploy.site.rootpath> <frontools.deploy.site.path>${groupId}/</frontools.deploy.site.path> <frontools.deploy.path>nexus/content/repositories</frontools.deploy.path> </properties> <distributionManagement> <repository> <id>frontools_release</id> <name>Frontools Inhouse Internal Release Repository</name> <url>http://${frontools.deploy.host}:${frontools.deploy.port}/${frontools.deploy.path}/frontools_releases </url> </repository> <snapshotRepository> <id>frontools_snapshot</id> <name>Frontools Inhouse Internal Snapshot Repository</name> <url>http://${frontools.deploy.host}:${frontools.deploy.port}/${frontools.deploy.path}/frontools_snapshots </url> <uniqueVersion>true</uniqueVersion> </snapshotRepository> <site> <id>frontools</id> <name>www-frontools</name> <url>scp://${frontools.deploy.host}/${frontools.deploy.site.rootpath}/ </url> </site> </distributionManagement> The deployment works when you are deploy on snapshotRepository but it does not work when you deploy on releaseRepository. The error is : 2008-10-07 15:31:06.487 ERROR [btpool0-217:] - org.mortbay.log: /nexus/content/repositories/frontools_releases/test/test/0.0.1/test-0.0.1.jar java.lang.IllegalStateException: Got exception during target mapping! at org.sonatype.nexus.security.filter.authz.NexusTargetMappingAuthorizationFilter.getActionFromHttpVerb(NexusTargetMappingAuthorizationFilter.java:120) at org.sonatype.nexus.security.filter.authz.NexusTargetMappingAuthorizationFilter.isAccessAllowed(NexusTargetMappingAuthorizationFilter.java:168) at org.jsecurity.web.filter.AccessControlFilter.onPreHandle(AccessControlFilter.java:139) at org.jsecurity.web.filter.PathMatchingFilter.preHandle(PathMatchingFilter.java:169) at org.jsecurity.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:129) at org.jsecurity.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:180) at org.jsecurity.web.servlet.FilterChainWrapper.doFilter(FilterChainWrapper.java:57) at org.jsecurity.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:105) at org.jsecurity.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:135) at org.jsecurity.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:180) at org.jsecurity.web.servlet.FilterChainWrapper.doFilter(FilterChainWrapper.java:57) at org.jsecurity.web.servlet.JSecurityFilter.doFilterInternal(JSecurityFilter.java:382) at org.sonatype.nexus.security.filter.NexusJSecurityFilter.doFilterInternal(NexusJSecurityFilter.java:67) at org.jsecurity.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:180) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1088) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405) at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206) at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.Server.handle(Server.java:324) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505) at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:843) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:647) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:205) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395) at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488) Caused by: org.sonatype.nexus.proxy.AccessDeniedException: Access denied on repository ID='frontools_releases', path='/test/test/0.0.1/test-0.0.1.jar', action='read'! at org.sonatype.nexus.proxy.access.DefaultAccessManager.decide(DefaultAccessManager.java:30) at org.sonatype.nexus.proxy.repository.AbstractRepository.checkConditions(AbstractRepository.java:1219) at org.sonatype.nexus.proxy.repository.AbstractRepository.retrieveItem(AbstractRepository.java:678) at org.sonatype.nexus.proxy.router.AbstractRegistryDrivenRepositoryRouter.doRetrieveItem(AbstractRegistryDrivenRepositoryRouter.java:163) at org.sonatype.nexus.proxy.router.AbstractRepositoryRouter.retrieveItem(AbstractRepositoryRouter.java:157) at org.sonatype.nexus.proxy.router.AbstractRegistryDrivenRepositoryRouter.doRetrieveItem(AbstractRegistryDrivenRepositoryRouter.java:163) at org.sonatype.nexus.proxy.router.AbstractRepositoryRouter.retrieveItem(AbstractRepositoryRouter.java:157) at org.sonatype.nexus.security.filter.authz.NexusTargetMappingAuthorizationFilter.getActionFromHttpVerb(NexusTargetMappingAuthorizationFilter.java:110) ... 30 more I think I do not make a mistake (maybe). I don't know why it does not work but I think when I attemp to deploy on a release Repository, it will take the anoymous user (because when I add the rigtht on anonymous user, it will work). It was working on 1.0.0.

    Sonatype JIRA | 8 years ago | Alexandre Navarro
    java.lang.IllegalStateException: Got exception during target mapping!
  2. 0

    I use a user to deploy in the repository. I add on settings.xml <server> <id>frontools_snapshot</id> <username>test</username> <password>c8s6s9q9f4</password> </server> <server> <id>frontools_release</id> <username>test</username> <password>c8s6s9q9f4</password> </server> And in my pom.xml <properties> <frontools.deploy.host>ftmvnrepo.fr.world.socgen</frontools.deploy.host> <frontools.deploy.port>8081</frontools.deploy.port> <frontools.deploy.site.rootpath>/home/frtdevrep/public_html/maven_site</frontools.deploy.site.rootpath> <frontools.deploy.site.path>${groupId}/</frontools.deploy.site.path> <frontools.deploy.path>nexus/content/repositories</frontools.deploy.path> </properties> <distributionManagement> <repository> <id>frontools_release</id> <name>Frontools Inhouse Internal Release Repository</name> <url>http://${frontools.deploy.host}:${frontools.deploy.port}/${frontools.deploy.path}/frontools_releases </url> </repository> <snapshotRepository> <id>frontools_snapshot</id> <name>Frontools Inhouse Internal Snapshot Repository</name> <url>http://${frontools.deploy.host}:${frontools.deploy.port}/${frontools.deploy.path}/frontools_snapshots </url> <uniqueVersion>true</uniqueVersion> </snapshotRepository> <site> <id>frontools</id> <name>www-frontools</name> <url>scp://${frontools.deploy.host}/${frontools.deploy.site.rootpath}/ </url> </site> </distributionManagement> The deployment works when you are deploy on snapshotRepository but it does not work when you deploy on releaseRepository. The error is : 2008-10-07 15:31:06.487 ERROR [btpool0-217:] - org.mortbay.log: /nexus/content/repositories/frontools_releases/test/test/0.0.1/test-0.0.1.jar java.lang.IllegalStateException: Got exception during target mapping! at org.sonatype.nexus.security.filter.authz.NexusTargetMappingAuthorizationFilter.getActionFromHttpVerb(NexusTargetMappingAuthorizationFilter.java:120) at org.sonatype.nexus.security.filter.authz.NexusTargetMappingAuthorizationFilter.isAccessAllowed(NexusTargetMappingAuthorizationFilter.java:168) at org.jsecurity.web.filter.AccessControlFilter.onPreHandle(AccessControlFilter.java:139) at org.jsecurity.web.filter.PathMatchingFilter.preHandle(PathMatchingFilter.java:169) at org.jsecurity.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:129) at org.jsecurity.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:180) at org.jsecurity.web.servlet.FilterChainWrapper.doFilter(FilterChainWrapper.java:57) at org.jsecurity.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:105) at org.jsecurity.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:135) at org.jsecurity.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:180) at org.jsecurity.web.servlet.FilterChainWrapper.doFilter(FilterChainWrapper.java:57) at org.jsecurity.web.servlet.JSecurityFilter.doFilterInternal(JSecurityFilter.java:382) at org.sonatype.nexus.security.filter.NexusJSecurityFilter.doFilterInternal(NexusJSecurityFilter.java:67) at org.jsecurity.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:180) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1088) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405) at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206) at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.Server.handle(Server.java:324) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505) at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:843) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:647) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:205) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395) at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488) Caused by: org.sonatype.nexus.proxy.AccessDeniedException: Access denied on repository ID='frontools_releases', path='/test/test/0.0.1/test-0.0.1.jar', action='read'! at org.sonatype.nexus.proxy.access.DefaultAccessManager.decide(DefaultAccessManager.java:30) at org.sonatype.nexus.proxy.repository.AbstractRepository.checkConditions(AbstractRepository.java:1219) at org.sonatype.nexus.proxy.repository.AbstractRepository.retrieveItem(AbstractRepository.java:678) at org.sonatype.nexus.proxy.router.AbstractRegistryDrivenRepositoryRouter.doRetrieveItem(AbstractRegistryDrivenRepositoryRouter.java:163) at org.sonatype.nexus.proxy.router.AbstractRepositoryRouter.retrieveItem(AbstractRepositoryRouter.java:157) at org.sonatype.nexus.proxy.router.AbstractRegistryDrivenRepositoryRouter.doRetrieveItem(AbstractRegistryDrivenRepositoryRouter.java:163) at org.sonatype.nexus.proxy.router.AbstractRepositoryRouter.retrieveItem(AbstractRepositoryRouter.java:157) at org.sonatype.nexus.security.filter.authz.NexusTargetMappingAuthorizationFilter.getActionFromHttpVerb(NexusTargetMappingAuthorizationFilter.java:110) ... 30 more I think I do not make a mistake (maybe). I don't know why it does not work but I think when I attemp to deploy on a release Repository, it will take the anoymous user (because when I add the rigtht on anonymous user, it will work). It was working on 1.0.0.

    Sonatype JIRA | 8 years ago | Alexandre Navarro
    java.lang.IllegalStateException: Got exception during target mapping!

    Root Cause Analysis

    1. org.sonatype.nexus.proxy.AccessDeniedException

      Access denied on repository ID='frontools_releases', path='/test/test/0.0.1/test-0.0.1.jar', action='read'!

      at org.sonatype.nexus.proxy.access.DefaultAccessManager.decide()
    2. ${project.groupId}:${project.artifactId}
      AbstractRepositoryRouter.retrieveItem
      1. org.sonatype.nexus.proxy.access.DefaultAccessManager.decide(DefaultAccessManager.java:30)
      2. org.sonatype.nexus.proxy.repository.AbstractRepository.checkConditions(AbstractRepository.java:1219)
      3. org.sonatype.nexus.proxy.repository.AbstractRepository.retrieveItem(AbstractRepository.java:678)
      4. org.sonatype.nexus.proxy.router.AbstractRegistryDrivenRepositoryRouter.doRetrieveItem(AbstractRegistryDrivenRepositoryRouter.java:163)
      5. org.sonatype.nexus.proxy.router.AbstractRepositoryRouter.retrieveItem(AbstractRepositoryRouter.java:157)
      6. org.sonatype.nexus.proxy.router.AbstractRegistryDrivenRepositoryRouter.doRetrieveItem(AbstractRegistryDrivenRepositoryRouter.java:163)
      7. org.sonatype.nexus.proxy.router.AbstractRepositoryRouter.retrieveItem(AbstractRepositoryRouter.java:157)
      7 frames
    3. Nexus Core
      NexusTargetMappingAuthorizationFilter.isAccessAllowed
      1. org.sonatype.nexus.security.filter.authz.NexusTargetMappingAuthorizationFilter.getActionFromHttpVerb(NexusTargetMappingAuthorizationFilter.java:110)
      2. org.sonatype.nexus.security.filter.authz.NexusTargetMappingAuthorizationFilter.isAccessAllowed(NexusTargetMappingAuthorizationFilter.java:168)
      2 frames
    4. org.jsecurity.web
      JSecurityFilter.doFilterInternal
      1. org.jsecurity.web.filter.AccessControlFilter.onPreHandle(AccessControlFilter.java:139)
      2. org.jsecurity.web.filter.PathMatchingFilter.preHandle(PathMatchingFilter.java:169)
      3. org.jsecurity.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:129)
      4. org.jsecurity.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:180)
      5. org.jsecurity.web.servlet.FilterChainWrapper.doFilter(FilterChainWrapper.java:57)
      6. org.jsecurity.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:105)
      7. org.jsecurity.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:135)
      8. org.jsecurity.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:180)
      9. org.jsecurity.web.servlet.FilterChainWrapper.doFilter(FilterChainWrapper.java:57)
      10. org.jsecurity.web.servlet.JSecurityFilter.doFilterInternal(JSecurityFilter.java:382)
      10 frames
    5. Nexus Core
      NexusJSecurityFilter.doFilterInternal
      1. org.sonatype.nexus.security.filter.NexusJSecurityFilter.doFilterInternal(NexusJSecurityFilter.java:67)
      1 frame
    6. org.jsecurity.web
      OncePerRequestFilter.doFilter
      1. org.jsecurity.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:180)
      1 frame
    7. Jetty Server
      SelectChannelEndPoint.run
      1. org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1088)
      2. org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
      3. org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
      4. org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
      5. org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729)
      6. org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
      7. org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206)
      8. org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
      9. org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
      10. org.mortbay.jetty.Server.handle(Server.java:324)
      11. org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
      12. org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:843)
      13. org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:647)
      14. org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:205)
      15. org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
      16. org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
      16 frames
    8. Jetty Util
      QueuedThreadPool$PoolThread.run
      1. org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488)
      1 frame