question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Quarkus, Jackson and Kotlin 1.4

See original GitHub issue

Describe the bug

  • Upgraded to Kotlin 1.4
  • Use Jackson and Jackson-module-kotlin
  • Running with @QuarkusTest fails
  • Same test without @QuarkusTest is ok

Se repository: https://github.com/kny78/quarkus-kotlin14-jackson-fail See failure output: https://github.com/kny78/quarkus-kotlin14-jackson-fail/tree/master/failure-logs

Expected behavior Both tests should run ok:

  • im.kny.DeSerializeQuarkusTest (Fails)
  • im.kny.DeSerializeNonQuarkusTest (Ok)

Actual behavior The test im.kny.DeSerializeQuarkusTest fail.s

To Reproduce Steps to reproduce the behavior:

  1. git clone git@github.com:kny78/quarkus-kotlin14-jackson-fail.git
  2. mvnw install

**Environment (please complete the following information):**
 - Output of `uname -a` or `ver`:

        Linux kjetil 5.7.15-200.fc32.x86_64 #1 SMP Tue Aug 11 16:36:14 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

 - Output of `java -version`: 

        openjdk version "11.0.8" 2020-07-14
        OpenJDK Runtime Environment 18.9 (build 11.0.8+10)
        OpenJDK 64-Bit Server VM 18.9 (build 11.0.8+10, mixed mode, sharing)

 - GraalVM version (if different from Java): N/A
 - Quarkus version or git rev: 1.7.0
 - Build tool (ie. output of `mvnw --version` or `gradlew --version`): 

        Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
        Maven home: /home/kny/.m2/wrapper/dists/apache-maven-3.6.3-bin/1iopthnavndlasol9gbrbg6bf2/apache-maven-3.6.3
        Java version: 11.0.8, vendor: Red Hat, Inc., runtime: /usr/lib/jvm/java-11-openjdk-11.0.8.10-2.fc32.x86_64
        Default locale: en_GB, platform encoding: UTF-8
        OS name: "linux", version: "5.7.15-200.fc32.x86_64", arch: "amd64", family: "unix"


**Additional context**
(Add any other context about the problem here.)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:49 (38 by maintainers)

github_iconTop GitHub Comments

2reactions
pschymacommented, Sep 10, 2020

I tried to debug this for a short time, but my breakpoints were never hit in the tests.

Maybe I’ll find some time on the weekend to understand kotlin internals here.

Meanwhile I made another observation: when I remove the “reflect” dependency and Gradle pulls the 1.3.72 version from jackson-module-kotlin, my tests work again on Quarkus 1.8.0.Final. On Quarkus 1.7.3.Final hibernate-types fails to deserialize a JSON field because it gets confused by the class hierarchy of that field (serialized as @JsonTypeInfo(use = Id.MINIMAL_CLASS, include = As.WRAPPER_OBJECT)).

I’m not sure who to blame now: Quarkus, Kotlin, Jackson, … so I’ll go back to kotlin 1.3.72 and wait for the jackson module update.

2reactions
pwongvcommented, Aug 31, 2020

Sure thing. I’ve spliced the Pact tutorial example into the Quarkus quickstart :

0001-Splicing-in-Pact-test-example-to-demonstrate-11549.patch.TXT

If you set a breakpoint in au.com.dius.pact.core.model.BasePact::lookupVersion you should be able to poke around.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using Kotlin - Quarkus
Kotlin is a very popular programming language that targets the JVM (amongst ... The addition of resteasy-reactive-jackson in the extension list results in ......
Read more >
Quarkus Kotlin Jackson 1.4.0 fails with java.lang ... - YouTrack
Quarkus Kotlin Jackson 1.4.0 fails with java.lang. ... The problem only occurs when I try to run Jackson serialization with valueToTree() and the...
Read more >
How to use default values of Kotlin (1.4.21) data class in ...
I am using Quarkus 1.11.1 with Kotlin 1.4.21 and Jackson 2.12.0. I don't understand why when I send a POST request with a...
Read more >
[Solved]-How to use default values of Kotlin (1.4.21) data class ...
Coding example for the question How to use default values of Kotlin (1.4.21) data class in Jackson (2.12.0) and Quarkus (1.11.1)-kotlin.
Read more >
quarkus-bom : 2.8.3.Final - Maven Central Repository Search
Quarkus - BOM - Quarkus - Kubernetes Native Java stack tailored for OpenJDK HotSpot and GraalVM.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found