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

Upgrade fails if Nexus 2 "override local storage" is not using a file URL

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: 2.14.1, 3.1.0
    • Fix Version/s: None
    • Component/s: Migration
    • Labels:
    • Story Points:
      1

      Description

      If you have a repository in Nexus 2 which overrides local storage using a simple file path upgrade to Nexus 3 will fail.

        <localStorage>
          <provider>file</provider>
          <url>Z:\repositories\snapshots</url>
        </localStorage>
      

      The above is valid, the field takes either a file URL or a simple file path, see here.

      But the upgrade fails with this:

      2016-12-06 11:15:11,225-0800 WARN  [qtp1852448465-81 - /nexus/service/siesta/migrationagent/repository/central] *UNKNOWN org.sonatype.sisu.siesta.server.internal.mappers.ThrowableExceptionMapper - java.net.MalformedURLException: Unknown protocol: z
      java.net.MalformedURLException: Unknown protocol: z
          at java.net.URL.<init>(Unknown Source) ~[na:1.7.0_51]
          at java.net.URL.<init>(Unknown Source) ~[na:1.7.0_51]
          at java.net.URL.<init>(Unknown Source) ~[na:1.7.0_51]
          at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.7.0_51]
          at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) ~[na:1.7.0_51]
          at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) ~[na:1.7.0_51]
          at java.lang.reflect.Constructor.newInstance(Unknown Source) ~[na:1.7.0_51]
          at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:80) ~[na:na]
          at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:105) ~[na:na]
          at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:60) ~[na:na]
          at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:235) ~[na:na]
          at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:247) ~[na:na]
          at com.sonatype.nexus.migrationagent.rest.RepositoryResource.storageDir(RepositoryResource.groovy:210) ~[na:na]
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_51]
          at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:1.7.0_51]
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:1.7.0_51]
          at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.7.0_51]
          at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93) ~[na:na]
          at org.codehaus.groovy.runtime.callsite.StaticMetaMethodSite$StaticMetaMethodSiteNoUnwrapNoCoerce.invoke(StaticMetaMethodSite.java:151) ~[na:na]
          at org.codehaus.groovy.runtime.callsite.StaticMetaMethodSite.callStatic(StaticMetaMethodSite.java:102) ~[na:na]
          at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallStatic(CallSiteArray.java:56) ~[na:na]
          at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callStatic(AbstractCallSite.java:194) ~[na:na]
          at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callStatic(AbstractCallSite.java:206) ~[na:na]
          at com.sonatype.nexus.migrationagent.rest.RepositoryResource.get(RepositoryResource.groovy:141) ~[na:na]
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_51]
          at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:1.7.0_51]
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:1.7.0_51]
          at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.7.0_51]
          at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60) ~[nexus-siesta-plugin-2.14.1-01/:na]
          at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$TypeOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:185) ~[nexus-siesta-plugin-2.14.1-01/:na]
      

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            rseddon Rich Seddon
            Last Updated By:
            Rich Seddon Rich Seddon
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Date of First Response:

                tigCommentSecurity.panel-title