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

Dependency load issue in nexus-base-template when adding nexus-ldap-plugin to the build

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Parked
    • Affects Version/s: 3.0.0
    • Fix Version/s: None
    • Component/s: OSGI
    • Labels:
      None

      Description

      While looking at how best to include the nexus-ldap-plugin in a distribution built out of the nexus-public repository, I ran into a load timing issue due to its dependency on nexus-ssl.

      com.google.inject.ProvisionException: Unable to provision, see the following errors:
      
      1) null returned by binding at org.eclipse.sisu.wire.LocatorWiring
       but parameter 4 of org.sonatype.nexus.ldap.internal.realms.EnterpriseLdapManager.<init>() is not @Nullable
        while locating org.sonatype.nexus.ssl.TrustStore
          for parameter 4 at org.sonatype.nexus.ldap.internal.realms.EnterpriseLdapManager.<init>(EnterpriseLdapManager.java:68)
        at / (via modules: org.sonatype.nexus.extender.modules.NexusBundleModule -> org.eclipse.sisu.space.SpaceModule)
        while locating org.sonatype.nexus.ldap.internal.realms.EnterpriseLdapManager
        while locating java.lang.Object annotated with *
      
      1 error
      

      The ldap plugin depends on packages in nexus-ssl, but the implementation actually lives in nexus-ssl-plugin.

      Reproduction Steps:

      • build https://github.com/sonatype/nexus-public with the attached patch; NOTE this assumes that the nexus-ldap-plugin-3.0.0-03.jar has been copied from the OSS distribution (from http://www.sonatype.com/download-oss-sonatype) and made available to the build by adding it to a repository manager available during build time, or at least installed into the local maven repository.
      • extract the nexus-base-template zip and start nexus in console mode i.e. ./bin/nexus console
      • observe the error above

      Mitigation:

      • manually restarting the plugin from the console will resolve the issue for the lifetime of the container, albeit with some additional nasty errors while it is being removed
        // first get the ID for the plugin
        bundle:list | grep nexus-ldap-plugin
        // then use the ID to restart
        bundle:restart \{bundle ID from output of above}
        

      At this point the plugin should be in a working state.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              krobinson Kelly Robinson
              Last Updated By:
              Peter Lynch
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Date of First Response:

                  tigCommentSecurity.panel-title