Skip to content

Request Java 11 update to OSGi Example #169

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

Closed
jeujai opened this issue Apr 22, 2019 · 7 comments
Closed

Request Java 11 update to OSGi Example #169

jeujai opened this issue Apr 22, 2019 · 7 comments

Comments

@jeujai
Copy link

jeujai commented Apr 22, 2019

My company still supports Java 8 so there is no immediate impediment to iterating on the current example but we're actively moving our apps to Java 11 and it'd be great if we can do the same with GraphQL + OSGi. Certainly, the improved optics from being on the latest and greatest LTS release of Java is secondary to the dynamic capabilities that Apache Karaf offers but it does have value, especially in the long term.

@sergehuber
Copy link
Contributor

Actually the question is not so much about the OSGi Karaf under Java 11 but rather that it seems that there are problems either :

  • Compiling the current gradle project (with Gradle 3.5) with JDK 11
  • Compiling the current gradle project (updated to Gradle 5.6)

@jeujai
Copy link
Author

jeujai commented Apr 23, 2019

Thanks for clarifying, Serge! Your post describes exactly what I ran into.

@oliemansm
Copy link
Member

I was able to compile the main project with JDK 11 and Gradle 4.10.3. Does that solve the problem for you?

@oliemansm
Copy link
Member

oliemansm commented Nov 15, 2019

@sergehuber When checking for Gradle deprecations to be ble to upgrade to 5.6 I get the following warning which seems to be OSGI related:

> Task :jar
Registering invalid inputs and outputs via TaskInputs and TaskOutputs methods has been deprecated. This is scheduled to be removed in Gradle 5.0. A problem was found with the configuration of task ':jar'.
 - File 'C:\Code\Scopisto\GraphQL\graphql-java-servlet\bnd.bnd' specified for property '$1' does not exist.
Do not cast FileCollection to File[]. This has been deprecated and is scheduled to be removed in Gradle 5.0.

I'm not familiar with OSGI unfortunately and googling it isn't really getting me solutions. Do you know what's going on here and how to solve it?

It's caused by this part in build.gradle:

jar {
    manifest {
        instruction 'Require-Capability', 'osgi.extender'
    }
}

@oliemansm
Copy link
Member

@benfortuna You seem to have OSGi experience. Any chance you could help out with this one?

@benfortuna
Copy link
Contributor

@oliemansm I don't use Apache Karaf directly, but I have seen some compatibility issues with Java 11 in the OSGi environments I am working with.

I'm not sure if the problem here is a compilation or runtime issue, but if you update to the latest bnd plugin it might resolve some of the compilation warnings: #238

@oliemansm
Copy link
Member

This should be fixed with the recently release 9.1.0 version as mentioned above.

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

No branches or pull requests

4 participants