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

Uploading a hash file results in a stack trace

    Details

    • Type: Bug
    • Status: New
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.29.1, 3.29.2
    • Fix Version/s: None
    • Component/s: Maven
    • Labels:

      Description

      Noticed in https://community.sonatype.com/t/put-returns-error-and-logs-string-index-out-of-range-1/5711, if you push a hash file to NXRM, you get an ugly stack trace back. We should handle this instead.

      2021-01-14 19:33:43,628+0000 WARN [qtp603976239-164] build-agent-development org.sonatype.nexus.repository.httpbridge.internal.ViewServlet - Failure servicing: PUT /repository/prodops-candidates/org/syntech/operations/syntech_prod_ops_emb_zero/1.0.14-SNAPSHOT/syntech_prod_ops_emb_zero-1.0.14-20210114.193340-4.tar.gz.sha256.sha1
      java.lang.StringIndexOutOfBoundsException: String index out of range: -1
      at java.lang.String.substring(String.java:1967)
      at org.sonatype.nexus.repository.maven.MavenPath.subordinateOf(MavenPath.java:290)
      at org.sonatype.nexus.repository.maven.MavenPath.main(MavenPath.java:267)
      at org.sonatype.nexus.repository.maven.internal.VersionPolicyHandler.handle(VersionPolicyHandler.java:61)
      at org.sonatype.nexus.repository.view.Context.proceed(Context.java:88)
      at org.sonatype.nexus.repository.http.PartialFetchHandler.handle(PartialFetchHandler.java:59)
      at org.sonatype.nexus.repository.view.Context.proceed(Context.java:88)
      at org.sonatype.nexus.repository.view.handlers.ConditionalRequestHandler.handle(ConditionalRequestHandler.java:72)
      at org.sonatype.nexus.repository.view.Context.proceed(Context.java:88)
      at com.sonatype.nexus.clm.internal.orient.FirewallContributedHandler.handle(FirewallContributedHandler.java:101)
      at org.sonatype.nexus.repository.view.Context.proceed(Context.java:88)
      at org.sonatype.nexus.repository.view.handlers.HandlerContributor.handle(HandlerContributor.java:67)
      at org.sonatype.nexus.repository.view.Context.proceed(Context.java:88)
      at org.sonatype.nexus.repository.view.handlers.ExceptionHandler.handle(ExceptionHandler.java:42)
      at org.sonatype.nexus.repository.view.Context.proceed(Context.java:88)
      at org.sonatype.nexus.repository.routing.internal.RoutingRuleHandler.handle(RoutingRuleHandler.java:52)
      at org.sonatype.nexus.repository.view.Context.proceed(Context.java:88)
      at org.sonatype.nexus.repository.security.SecurityHandler.handle(SecurityHandler.java:51)
      at org.sonatype.nexus.repository.view.Context.proceed(Context.java:88)
      at org.sonatype.nexus.repository.view.handlers.TimingHandler.handle(TimingHandler.java:58)
      at org.sonatype.nexus.repository.view.Context.proceed(Context.java:88)
      at org.sonatype.nexus.repository.view.Context.start(Context.java:179)
      at org.sonatype.nexus.repository.view.Router.dispatch(Router.java:65)
      at org.sonatype.nexus.repository.view.ConfigurableViewFacet.dispatch(ConfigurableViewFacet.java:52)
      at org.sonatype.nexus.repository.view.ConfigurableViewFacet.dispatch(ConfigurableViewFacet.java:43)
      at org.sonatype.nexus.repository.httpbridge.internal.ViewServlet.dispatchAndSend(ViewServlet.java:213)
      at org.sonatype.nexus.repository.httpbridge.internal.ViewServlet.doService(ViewServlet.java:175)
      at org.sonatype.nexus.repository.httpbridge.internal.ViewServlet.service(ViewServlet.java:127)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
      

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            jtom Joe Tom
            Last Updated By:
            Matthew Piggott Matthew Piggott
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:

                tigCommentSecurity.panel-title