Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

registering the jaxb annotation module breaks (at least) option jackson integration #110

Closed
emmanueltouzery opened this issue May 15, 2017 · 6 comments

Comments

@emmanueltouzery
Copy link
Contributor

Trying to upgrade our app from javaslang 2.0.6 to vavr 0.9.0, I've hit an issue which I've reproduced there with the vavr-jackson test:

emmanueltouzery@a32fb7f

if you register a jaxb annotation module also for your json operation (it's a bit unusual, but we do that...) breaks things like Option serialization. This used to work with javaslang-jackson 2.0.5 (I've tested the same thing there, and it works just fine there).

The exception is:

Tests in error: 
  testJsonTypeInfo2(io.vavr.jackson.datatype.OptionTest): Must call method with a container type (got [reference type, class io.vavr.control.Option<io.vavr.jackson.datatype.OptionTest$TestSerialize<[simple type, class io.vavr.jackson.datatype.OptionTest$TestSerialize]>])
  testWrappedParameterizedSome(io.vavr.jackson.datatype.OptionTest): Must call method with a container type (got [reference type, class io.vavr.control.Option<java.lang.Integer<[simple type, class java.lang.Integer]>])
  testWrappedWildcardSome(io.vavr.jackson.datatype.OptionTest): Must call method with a container type (got [reference type, class io.vavr.control.Option<java.lang.Object<[simple type, class java.lang.Object]>])

@emmanueltouzery
Copy link
Contributor Author

hmm actually that also happens for XML operations, therefore it's more serious. It seems vavr-jackson 0.9.0 can't be used with JAXB annotations at all.

@emmanueltouzery
Copy link
Contributor Author

ok I found the upstream bug and it's fixed with jackson 2.7.9 so not the fault of vavr-jackson and I'm going to close this bug.

FasterXML/jackson-module-jaxb-annotations#63

@danieldietrich
Copy link
Contributor

Thank you

@ruslansennov
Copy link
Member

@emmanueltouzery In case of your app, which Jackson version fails?

@emmanueltouzery
Copy link
Contributor Author

The PR shows it fails with 2.7.2 as in the pom of vavr-jackson. But it passes with 2.7.9 (see the bug i linked). In a way it could make sense to increase vavr-javaslang dependency to jackson 2.7.9 but since 2.7.x are api compatible it's not really an issue.

@ruslansennov
Copy link
Member

Now vavr-jackson tests with two versions:

script:
- mvn clean test -B  // 2.7.2 by default version in pom.xml
- mvn clean test -B -Dfasterxml.version=2.8.4

Maybe we should bump default version to 2.7.9?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants