camel-karavan icon indicating copy to clipboard operation
camel-karavan copied to clipboard

Issue format Datetime java

Open huuhoait opened this issue 8 months ago • 2 comments

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

huuhoait avatar Oct 25 '23 14:10 huuhoait