Jackson 2.10 pre-release, 2.10.0.pr1, available

23 views
Skip to first unread message

Tatu Saloranta

unread,
Jul 20, 2019, 7:40:02 PM7/20/19
to jackson-announce, jackson-user, jacks...@googlegroups.com
After multiple delays, we finally have the first
pre-release/release-candidate of Jackson 2.10 -- version 2.10.0.pr1.
It is released in hopes of getting more testing by community, so that
we can minimize number of regressions, as well as better documented
observed differences (beyond what is included in github issues
included in release notes).

Full set of changes can be found from the usual place:

https://github.com/FasterXML/jackson/wiki/Jackson-Release-2.10

which is in addition to everything that has been included up to
version 2.9.9 (and `jackson-databind` 2.9.9.1 micro-patch).

I will write a brief overview of what is new with 2.10, but as a
teaser, here's a super terse quick list to whet your appetite.

1. Safe(r) Default Typing! (see
https://github.com/FasterXML/jackson-databind/issues/2195)
2. Java Module info added: now Java 9+ module system can use Jackson
components "natively", and not just with minimal "automatic module
name"
3. Builder-based construction of `ObjectMapper`, `JsonFactory`: allows
easier configuration, esp. of non-JSON features -- but also helps with
eventual upgrade to 3.0 which only supports builder-based approach
(2.x will still support direct construction)
4. JsonNode improvements: is `java.io.Serializable`,
`JsonNode.toString()` IS both guaranteed to produce valid JSON (unlike
before) AND relatively efficient (uses default-configured
`ObjectMapper`)
5. Support for Eclipse Collections (new datatype module)

plus as usual, a long list of various fixes that did not make it in
previous 2.x version.

-+ Tatu +-

Ruwen Schwedewsky

unread,
Jul 22, 2019, 11:24:05 PM7/22/19
to jacks...@googlegroups.com
Hi!

I just tried to run my tests. When my application server tried to start, I got errors:

    Suppressed: java.lang.RuntimeException: Error scanning entry module-info.class from jar file:/home/ruwen/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.10.0.pr1/jackson-core-2.10.0.pr1.jar
        at org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:913)
        at org.eclipse.jetty.annotations.AnnotationParser.parse(AnnotationParser.java:831)
        at org.eclipse.jetty.annotations.AnnotationConfiguration$ParserTask.call(AnnotationConfiguration.java:163)
        at org.eclipse.jetty.annotations.AnnotationConfiguration$1.run(AnnotationConfiguration.java:548)
        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
        at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
        at java.lang.Thread.run(Thread.java:748)
    Caused by: java.lang.IllegalArgumentException
        at org.objectweb.asm.ClassReader.<init>(Unknown Source)
        at org.objectweb.asm.ClassReader.<init>(Unknown Source)
        at org.objectweb.asm.ClassReader.<init>(Unknown Source)
        at org.eclipse.jetty.annotations.AnnotationParser.scanClass(AnnotationParser.java:973)
        at org.eclipse.jetty.annotations.AnnotationParser.parseJarEntry(AnnotationParser.java:956)
        at org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:909)
        ... 6 more
   
11:05 ruwen@ruwenwork:~$ java -version
openjdk version "1.8.0_212"
OpenJDK Runtime Environment (build 1.8.0_212-8u212-b03-2~deb9u1-b03)
OpenJDK 64-Bit Server VM (build 25.212-b03, mixed mode)

The blame was on an older version of Jetty. Since this was used only in test, the version was quite old. But other people might get similar problems with byte-code manipulating libraries. It might be worth while to explicitly mention that in the release notes.

Cheers
Ruwen

This email and any attachments to it (the "Communication") is, unless otherwise stated, confidential, may contain copyright material and is for the use only of the intended recipient. If you receive the Communication in error, please notify the sender immediately by return email, delete the Communication and the return e mail, and do not read, copy, retransmit or otherwise deal with it. Any views expressed in the Communication are those of the individual sender only, unless expressly stated to be those of Message4U Pty Ltd trading as MessageMedia or any of its related entities (together “MessageMedia”). MessageMedia does not accept liability in connection with the integrity of or errors in the Communication, computer virus, data corruption, interference or delay arising from or in respect of the Communication.

Tatu Saloranta

unread,
Jul 24, 2019, 2:23:20 PM7/24/19
to jacks...@googlegroups.com
On Mon, Jul 22, 2019 at 8:24 PM Ruwen Schwedewsky <ruwen.sc...@messagemedia.com.au> wrote:
Hi!

I just tried to run my tests. When my application server tried to start, I got errors:

    Suppressed: java.lang.RuntimeException: Error scanning entry module-info.class from jar file:/home/ruwen/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.10.0.pr1/jackson-core-2.10.0.pr1.jar
        at org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:913)
        at org.eclipse.jetty.annotations.AnnotationParser.parse(AnnotationParser.java:831)
        at org.eclipse.jetty.annotations.AnnotationConfiguration$ParserTask.call(AnnotationConfiguration.java:163)
        at org.eclipse.jetty.annotations.AnnotationConfiguration$1.run(AnnotationConfiguration.java:548)
        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
        at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
        at java.lang.Thread.run(Thread.java:748)
    Caused by: java.lang.IllegalArgumentException
        at org.objectweb.asm.ClassReader.<init>(Unknown Source)
        at org.objectweb.asm.ClassReader.<init>(Unknown Source)
        at org.objectweb.asm.ClassReader.<init>(Unknown Source)
        at org.eclipse.jetty.annotations.AnnotationParser.scanClass(AnnotationParser.java:973)
        at org.eclipse.jetty.annotations.AnnotationParser.parseJarEntry(AnnotationParser.java:956)
        at org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:909)
        ... 6 more
   
11:05 ruwen@ruwenwork:~$ java -version
openjdk version "1.8.0_212"
OpenJDK Runtime Environment (build 1.8.0_212-8u212-b03-2~deb9u1-b03)
OpenJDK 64-Bit Server VM (build 25.212-b03, mixed mode)

The blame was on an older version of Jetty. Since this was used only in test, the version was quite old. But other people might get similar problems with byte-code manipulating libraries. It might be worth while to explicitly mention that in the release notes.

First of all, thank you very much for reporting this! (and checking out pre-release in the first place). That's exactly why they are released.

The problem is rather unfortunate one, as it occurs on older JDK(s). I would like to know how common this might be, so I would be interested if others are bumping into this issue as well.
It might even jeopardize inclusion of module info for 2.10, if it's prevalent enough :-(
This because as much as I would like to improve forwards-compatibility, I do not want to cause breakages to existing users, especially as I suspect Java 8 is still the dominant deployment platform for users.

I will add a note on release notes page.

-+ Tatu +- 

 

Mark Derricutt

unread,
Jul 25, 2019, 11:40:40 PM7/25/19
to jacks...@googlegroups.com

On 25 Jul 2019, at 6:23, Tatu Saloranta wrote:

It might even jeopardize inclusion of module info for 2.10, if it's prevalent enough :-(

Is the module-info.class included in the main jar classes (it sounds like it is) - one option could be to release as a multi release jar.

Adding Multi-Release: true to the MANIFEST.MF file, and moving the module-info.class to META-INF/versions/9/module-info.class should in theory work.

For reference: https://www.baeldung.com/java-multi-release-jar


"The ease with which a change can be implemented has no relevance at all to whether it is the right change for the (Java) Platform for all time." — Mark Reinhold.

Mark Derricutt
http://www.theoryinpractice.net
http://www.chaliceofblood.net
http://plus.google.com/+MarkDerricutt
http://twitter.com/talios
http://facebook.com/mderricutt

signature.asc
Reply all
Reply to author
Forward
0 new messages