Uploaded image for project: 'jclouds'
  1. jclouds
  2. JCLOUDS-1199

jclouds-cli throws NPE in compute list commands

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.0.0
    • 2.0.0
    • jclouds-cli
    • None

    Description

      In this commit in jclouds-karaf we changed the way in which the ScriptEngineManager was loaded.

      Before that commit, the script engine manager was hardcoded to an instance that did not work properly in OSGI environments, so we changed the way it was initialised to let it be injected the right instance.

      While this works well in Karaf, this breaks the jclouds-cli when not using the interactive mode. When using the shell script, the CLI directly creates the Command instances, and those instances are now missing the ScriptEngineManager object, resulting in the mentioned NPE.

      My proposed fix would be to manually set the new ScriptEngineManager() in the CLI, just after creating the command. This way the CLI keeps the legacy behavior while we don't couple jclouds-karaf to a script engine that does not work well in OSGi environments.

      Attachments

        Activity

          People

            nacx Ignasi Barrera
            nacx Ignasi Barrera
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: