anypointcloud / json-logger

Apache License 2.0
2 stars 0 forks source link

Error retrieving JSON Logger Config with External Destination (Anypoint MQ) #4

Open lealpm opened 1 week ago

lealpm commented 1 week ago

We have a commons plugin containing a few global configurations like Salesforce, Database and Json logger. Importing this dependency and trying to reuse this configuration everything works fine for Salesforce and Database but we are facing an error with JSON Logger.

The error is the following: Cannot invoke "org.mule.extension.jsonlogger.internal.destinations.Destination.getSelectedDestinationType()" because the return value of "java.util.HashMap.get(Object)" is null

Important to notice that this only occurs when the JSON Logger configuration is configured with an External Destination (Anypoint MQ).

mtransier commented 1 week ago

Hi @lealpm, would it be possible for you to provide a stripped down version of your plugin and app so that we can reproduce it easily?

lealpm commented 1 week ago

Yes, sure, but first it would be great if you can have a look on the dependencies of the original project. When I try to deploy an app using the latest JSON Logger version, configured with an Anypoint MQ as an External Destination, I get this error:

**Failed to deploy artifact 'jsonloggertestapp',

We were able to "fix" it by adding and excluding these dependencies:

image

Can you check this fix and evaluate if it's correct or if there is a more proper way of fixing it?

mtransier commented 1 week ago

Hi @lealpm, please have a look at the current SNAPSHOT version in the main branch? Unfortunately, it is not available from the maven repository, so you will have to build it yourself from source. This issue is already fixed there, the logger is working with Anypoint MQ.