Skip to content

java.util.Optional<java.lang.String> not supported by default #30

@serdelal

Description

@serdelal

Hello!

First of all, thanks for the hard work!

Im Sergio, im currently working on a client where this json logger is been used. The issue is that this client is using Mule runtime 4.4.0 and jdk 8 nowadays, so Im trying to move forward to Mule runtime 4.9 and jdk 17. But Im facing an issue in multiple APIs. There are some scripts defined in the "content" field of the connector where an error is triggered:

Caused by: com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Java 8 optional type java.util.Optional<java.lang.String> not supported by default: add Module "com.fasterxml.jackson.datatype:jackson-datatype-jdk8" to enable handling (through reference chain: org.mule.extension.jsonlogger.api.pojos.LoggerProcessor["content"]->org.mule.runtime.module.extension.internal.runtime.resolver.ParameterResolverValueResolverWrapper$1["expression"])

For example, this error is shown when in the "content" field there is something like "payload.name?". I have resolved this kind of issue, but it seems that this error occurs for some dataweave functions like "mask".

Has anyone else experienced this problem?

Thanks!

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions