camel-karavan
camel-karavan copied to clipboard
Issue format Datetime java
Hi all , there is an issue with jackson format date. I take simple route with yaml dsl:
- route:
id: route-692d
from:
uri: kamelet:mysql-source
id: from-4e99
parameters:
serverName: localhost
databaseName: simple_admin
username: root
password: '123456'
serverPort: '3306'
query: select * from users
delay: 5000
steps:
- log:
message: 'sqlsourcce: ${body} \n'
logName: out sql source
id: log-5a7f
When this app run, i got error about ; "com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Java 8 date/time type java.time.LocalDateTime
not supported by default: add Module "com.fasterxml.jackson.datatype:jackson-datatype-jsr310" to enable handling (through reference chain: org.springframework.util.LinkedCaseInsensitiveMap["created_at"])"
I added dependency: com.fasterxml.jackson.datatype:jackson-datatype-jsr310 and config env:camel.dataformat.jackson.module-class-names=com.fasterxml.jackson.datatype.jsr310.JavaTimeModule but i can not resolved above issue
This is not really a karavan issue but the kamelet uses jackson and there is some datetime "crap" to deal with.
What JDK version and Camel version do you use.
I used:
OpenJDK 64-Bit Server VM Temurin-17.0.9+9 (build 17.0.9+9, mixed mode) Camel 4.0