0

I'm creating a CosmosDB connector using Mule SDK. I'm trying to add CosmosDB dependency in the global configuration using the below code but it seems to be not functioning as expected. It's downloading maven dependency but not adding the jar in the config. Please let me know what am I missing.

@ExternalLib(
  name = "Azure CosmosDB Driver",
  description = "Azure Cosmos DB driver that supports connection to the MySQL Database",
  requiredClassName = "com.azure.data.cosmos",
  type = ExternalLibraryType.JAR,
  coordinates="com.microsoft.azure:azure-cosmos:3.7.3"
)
public class AzureCosmosDBConnectionProvider implements ConnectionProvider<AzureCosmosDBConnection>

Please look at the below image: Here I provided all the details but when I click on Azure Cosmos DB Driver and add a dependency or JAR file. It's still throwing the same Error.

CosmosDB Mule global config

Thank you.

sravan
  • 97
  • 1
  • 10

1 Answers1

0

It seems that the @ExternalLib annotation declares the library, but it doesn't include it in the module. You have to do that in the pom of the application, by adding it as a dependency, and add it as a shared library. That's what the Database connector does with the JDBC driver.

aled
  • 21,330
  • 3
  • 27
  • 34
  • what you said is true and the application is already performing that when I click on add dependency. But in the mule global configuration, it raises throws an error like shown in the image – sravan Jun 12 '20 at 14:35
  • I think that happened to me with other similar components, like the Database connector or the Spring Module. I'm not sure exactly what is the issue, but it could be just the UI. Does the application run correctly if you set the dependency in the pom? – aled Jun 12 '20 at 17:09
  • I'm unable to test it without the External lib not working. – sravan Jun 12 '20 at 18:36
  • The screenshot shows that you need to configure the dependency. Did you click configure and selected the right dependency, that contains the required class? What happens next? – aled Jun 12 '20 at 21:15
  • I did perform the steps, still, it shows the error icon. – sravan Jun 15 '20 at 03:48
  • Sravan did you get the solution of this problem? – Ruchi Saini Sep 29 '22 at 13:38