locked
rxjava.jar and azure storage java sdk RRS feed

  • Question

  • Hi,
    We are using the azure-storage.jar (version 8.3.0) in our product to access Azure Blob Storage. We are planning to support the java 11 with our product.
    As a jar dependency, we are also using the rxjava.jar (version 1.2.4). This version of rxjava.jar uses unsafe API from Oracle Java SDK and hence
    not compatible with java 11. The jar provider has fixed these issues in latest version 2.x.x. This 2.x.x version is complete rewrite of library and
     azure-storage.jar (version 8.3.0) is not compatible with it.

    Can you please let us know if and when Microsoft will support the rxjava.jar (version 2.x.x)?

    Thanks,
    Vinayak
    Wednesday, November 13, 2019 10:49 AM

All replies

  • Thanks for raising this question! Firstly, apologies for the delay in responding here.  We very explicitly abandoned Rx Java, However both implement the reactive-streams specification. This means that both have many methods that accept the base publisher interface they both use, and one could bridge between the two packages if they truly wished.

    Hope this helps! 

    Kindly let us know if the above helps or you need further assistance on this issue.
    ------------------------------------------------------------------------------------------

    Do click on "Mark as Answer" and Upvote on the post that helps you, this can be beneficial to other community members.

    Tuesday, November 19, 2019 2:18 AM
  • @Vinayak Kuchekar Just checking in to see if the above answer helped. If this answers your query, do click “Mark as Answer” and Up-Vote for the same, which might be beneficial to other community members reading this thread. And, if you have any further query do let us know.
    Thursday, November 21, 2019 9:02 AM
  • Following up to see if the above suggestion was helpful. And, if you have any further query do let us know.

     Just checking in to see if the above answer helped. If this answers your query, do click “Mark as Answer” and Up-Vote for the same, which might be beneficial to other community members reading this thread. 
    Friday, November 22, 2019 2:19 PM
  • Hi,

    This rxjava.jar 2.x.x version is complete rewrite of library and azure-storage.jar (version 8.3.0) and azure-keyvault.jar (version 1.2.0) are not compatible with it. It throws NoClassDefFoundError.

    Exception or Stack Trace
    Caused by: java.lang.NoClassDefFoundError: rx/functions/Func1
    at com.ptc.windchill.objectstorage.azureblob.encryption.csekeyvault.CSEKeyVaultBlobEncryptConfig.getKeyVaultKey(CSEKeyVaultBlobEncryptConfig.java:86)
    at com.ptc.windchill.objectstorage.azureblob.encryption.csekeyvault.CSEKeyVaultBlobFileWriter.setEncryptionPolicy(CSEKeyVaultBlobFileWriter.java:54)
    at com.ptc.windchill.objectstorage.azureblob.BlobFileWriter.upload(BlobFileWriter.java:615)
    at com.ptc.windchill.objectstorage.azureblob.BlobFileWriter.storeStreamUpload(BlobFileWriter.java:533)
    at com.ptc.windchill.objectstorage.azureblob.BlobFileWriter.storeStreamMultipart(BlobFileWriter.java:410)
    at com.ptc.windchill.objectstorage.azureblob.BlobFileWriter.storeUnKnownLengthStream(BlobFileWriter.java:322)
    at com.ptc.windchill.objectstorage.azureblob.BlobFileWriter.storeStream(BlobFileWriter.java:281)
    at com.ptc.windchill.objectstorage.azureblob.BlobFileWriter.storeStream(BlobFileWriter.java:228)
    at wt.objectstorage.ContentFileWriter.storeStream(ContentFileWriter.java:97)
    at wt.objectstorage.ContentFileWriter.storeStream(ContentFileWriter.java:66)
    at wt.fv.StoreStreamListener.prepareToUpload(StoreStreamListener.java:207)
    at wt.fv.StoreStreamListener.prepareToUpload(StoreStreamListener.java:165)
    at wt.fv.StoreStreamListener.prepareToUpload(StoreStreamListener.java:128)
    at wt.fv.uploadtocache.DoUploadToCache_Server.storeContentInVaultOnMaster(DoUploadToCache_Server.java:612)
    at wt.fv.uploadtocache.DoUploadToCache_Server.storeSingleFile(DoUploadToCache_Server.java:1878)
    at wt.fv.uploadtocache.DoUploadToCache_Server.doMultiPartUploadToCache_Server(DoUploadToCache_Server.java:1689)
    ... 55 more
    Caused by: java.lang.ClassNotFoundException: rx.functions.Func1
    at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
    at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
    ... 71 more

    Test the azure-storage.jar, azure-keyvault.jar and its dependencies with Java 11.
    Using jdeps tool, scan the azure-storage.jar and its dependencies.

    Any sample code (get Key from Key Vault Service) for azure-storage.jar, azure-keyvault.jar can be tested with java 11:

    KeyVaultConnectionParams kvConParams = keyProvider.getKeyVaultConnectionDetails(containerName, blobName);
    KeyVaultCredentials kvCred = new KeyVaultCredentials() {
         public String doAuthenticate(String authorization, String resource, String scope) {
            AuthenticationResult token = getAccessTokenFromClientCredentials(authorization, resource, "<appid>", "<AppAuthKey>");
              return token.getAccessToken();
            }
         };
    KeyVaultClient vc = new KeyVaultClient(kvCred);
    KeyVaultKeyResolver cloudResolver = new KeyVaultKeyResolver(vc);
    CachingKeyResolver cachingResolver = new CachingKeyResolver(1, cloudResolver);
    IKey encryptionKey = cachingResolver.resolveKeyAsync("<KeyVaultKeyIdUrl>").get();

    We expect that the azure-storage.jar, azure-keyvault.jar supports the rxjava.jar version 2.x.x

    Setup:

    • OS: Centos 7
    • IDE : Eclipse
    • JDK- Oracle SE JDK 11
    • azure-storage.jar(8.3.0)
      azure-keyvault.jar (1.2.0)
      azure-keyvault-core.jar (1.2.0)
      azure-keyvault-cryptography.jar (1.2.0)
      azure-keyvault-extensions.jar (1.2.0)
      azure-keyvault-webkey.jar (1.2.0)
      rxjava.jar (2.2.14)

    Additional context
    We are upgrading the java support to version 11 for our product.

    Tuesday, November 26, 2019 7:41 AM