Gson: GSON 2.8.6 does not support on lower JavaSE environment

Created on 12 Apr 2020  路  3Comments  路  Source: google/gson

Hi,

I have already been using gson 2.8.5 as one of my project dependency. It works properly without any issue.

Now I am trying to use the latest gson version 2.8.6, but end up with below error in OSGI container.

Looks like the requirement capability need to be revisit in gson 2.8.6 mainfest.

Note: I have Java SE 8.

_ Caused by: org.osgi.framework.BundleException: Could not resolve module: com.google.gson [110] Unresolved requirement: Require-Capability: osgi.ee; filter:="(&(osgi.ee=JavaSE)(version=9.0))" at org.eclipse.osgi.container.Module.start(Module.java:444) at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:383) at org.apache.karaf.bundle.command.Start.executeOnBundle(Start.java:38) at org.apache.karaf.bundle.command.BundlesCommand.doExecute(BundlesCommand.java:62) ... 14 common frames omitted _

Most helpful comment

Any chance of a release soon?

All 3 comments

According to https://github.com/google/gson/blob/master/gson/bnd.bnd this issue will be fixed in 2.8.7

Any chance of a release soon?

also this header seems to be wrong:
Bundle-RequiredExecutionEnvironment: J2SE-1.5, JavaSE-1.6, JavaSE-1.7, JavaSE-1.8

I think this should be
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
since all classes except the module-info.class have class file version 50 corresponding to JavaSE-1.6

Was this page helpful?
0 / 5 - 0 ratings

Related issues

GoogleCodeExporter picture GoogleCodeExporter  路  15Comments

GoogleCodeExporter picture GoogleCodeExporter  路  15Comments

danieleguiducci picture danieleguiducci  路  34Comments

cayhorstmann picture cayhorstmann  路  13Comments

GoogleCodeExporter picture GoogleCodeExporter  路  19Comments