On Mon, Jul 1, 2019 at 7:44 AM Mediocaballero MidKnight
<
medioca...@gmail.com> wrote:
>
> Sorry to revive this old, thread, but it's related to an issue I'm finding now.
>
> We are also in the situation of upgrading some dependencies on corporate legacy software, which, for runtime platform restrictions can only use jdk 6.
>
> We've found that jackson 2.9.9 solves all current vulnerabilities found but, when updating from 2.3.0 (yup, I know this was a long, long time ago) we are getting runtime errors on required runtime version for jackson-databind ObjectMapper:
>
> java.lang.UnsupportedClassVersionError: com/fasterxml/jackson/databind/ObjectMapper : Unsupported major.minor version 51.0
>
> I've looked at the pom and, indeed, jackson-databind is compiled with java 7 as target, although it mentions java 6 compatibility:
Ah. You are right in that it is then that although bytecode, if it was
targeted at Java 6, would work, in practice this isn't of much help
unless a converter was used to mark jars as compiled for Java 6.
You could try an earlier version (but newer than 2.3) to get some of
the fixes -- looking at release notes I think 2.6 was targeting Java
6; and perhaps 2.7 was compiled in such a way as well.
One key challenge that actually prevents better bytecode backwards
compatibility as this point is tooling, because:
1. Javac 8 does not allow target of 1.6 (I think), at least not directly.
2. It is not possible (or at least not easy enough for me to figure
out how.. :-( ) to use JDK 7 with Maven release tools in a way
actually deploy releases to Sonatype's OSS repository -- this had to
do with security aspects (certificates) needed for
upload/verification.
so that even if I otherwise could build backwards compatible versions,
I can't get them to be released.
If anyone is aware of retro-weaver style tools that can take jars with
newer declared bytecode version and convert to older, that'd be great,
sharing most appreciated.
Most likely that would still require some local work from user's part,
but I think would allow use of newer Jackson versions on Java 6.
-+ Tatu +-
> --
> You received this message because you are subscribed to the Google Groups "jackson-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
jackson-user...@googlegroups.com.
> To post to this group, send email to
jackso...@googlegroups.com.
> To view this discussion on the web visit
https://groups.google.com/d/msgid/jackson-user/bb14f34d-c934-4f71-bf1e-ac2af2b2caf2%40googlegroups.com.
> For more options, visit
https://groups.google.com/d/optout.