sravan
sravan

Reputation: 99

Unable to load External Lib jar in the global config Mule SDK

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.

Upvotes: 0

Views: 152

Answers (1)

aled
aled

Reputation: 25664

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.

Upvotes: 0

Related Questions