Highlighted

ACS AEM Commons - Class not found by acs-aem-commons-bundle

Avatar

Avatar

SurendraKonatha

Avatar

SurendraKonatha

SurendraKonatha

17-09-2018

I'm trying to write a custom class in [ACS Commons' MCP Tool][1]

Including "azure storage" api in "pom.xml" as below:

    <dependency>

      <groupId>com.microsoft.azure</groupId>

      <artifactId>azure-storage</artifactId>

      <version>8.0.0</version>

    </dependency>

The build runs fine without any compile errors, but while running the program i'm seeing the below in error logs:

Sample usage:

    import com.microsoft.azure.storage.CloudStorageAccount;

    ..

    public class AzureAssetIngestor extends AssetIngestor {

      private CloudStorageAccount storageAccount;

      ..

      storageAccount = CloudStorageAccount.parse(storageConnectionString);

Error in logs while executing the program

Caused by: java.lang.ClassNotFoundException: com.microsoft.azure.storage.CloudStorageAccount not found by com.adobe.acs.acs-aem-commons-bundle

Caused by: java.lang.ClassNotFoundException: com.microsoft.azure.storage.CloudStorageAccount not found by com.adobe.acs.acs-aem-commons-bundle [521]

at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1574)

at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:79)

at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:2018)

at java.lang.ClassLoader.loadClass(ClassLoader.java:357)

  [1]: https://adobe-consulting-services.github.io/acs-aem-commons/features/mcp-tools/index.html

Replies

Highlighted

Avatar

Avatar

atulj76172708

Avatar

atulj76172708

atulj76172708

17-09-2018

Please make sure you add this dependency in bundle's pom.xml.

<dependency> 

      <groupId>com.microsoft.azure</groupId> 

      <artifactId>azure-storage</artifactId> 

</dependency>

Highlighted

Avatar

Avatar

saurabhs6289352

Avatar

saurabhs6289352

saurabhs6289352

17-09-2018

Please check in ~/.m2 azure-storage jar is not corrupt. It can happen you have 0KB azure storage jar. Also, you can use mvn -U clean install which will force to download the dependency.

Highlighted

Avatar

Avatar

vaibhavs7024655

Avatar

vaibhavs7024655

vaibhavs7024655

18-09-2018

SurendraKonathala​ I would suggest you to raise this at [1] where you can get help from the community contributing to ACS Commons.

[1] Issues · Adobe-Consulting-Services/acs-aem-commons · GitHub