Skip to content

Workaround for "Service or property not registered:" problem does not work for single jar packaging #627

Description

@mdzz

The following comments are in StorageAccountExample.java:

        // When using the Java command line, a run time error similar to the following
        // was occurring:
        //          Exception in thread "main" java.lang.RuntimeException: 
        //          Service or property not registered:  
        //          com.microsoft.azure.management.storage.StorageManagementClient 
        //          interface com.microsoft.azure.management.storage.StorageManagementClient
        // To get around this, explicitly setting the ContextClassLoader works.
        //
        // This "hack" is not needed in IntelliJ.

However the workaround doesn't seem to work when the test program includes all the Azure SDK pieces in a single jar (through shading or jar-with-depedencies plugin). Allowing shaded SDK code to function will be very useful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions