vaadin/base-starter-flow-osgi

OSGi starter is not starting under Java 11

Skrikjo opened this issue · 6 comments

Downloaded starter and runned mvn -Pprepare-osgi-container -Prun-osgi-container verify
with oracle java version "11.0.4" 2019-07-16 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.4+10-LTS)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.4+10-LTS, mixed mode)
on mac Mojave 10.14.2

App is not starting with next errors

Auto-deploy install: org.osgi.framework.BundleException: Could not create bundle object. - java.io.FileNotFoundException: META-INF/MANIFEST.MF
ERROR: Bundle com.vaadin.external.atmosphere.runtime [3] Error starting file:/Users/vladyslavgutsul/Downloads/v14osgi/target/felix-framework-6.0.0/bundle/atmosphere-runtime-2.4.30.slf4jvaadin1.jar (org.osgi.framework.BundleException: Unable to resolve com.vaadin.external.atmosphere.runtime [3](R 3.0): missing requirement [com.vaadin.external.atmosphere.runtime [3](R 3.0)] osgi.wiring.package; (osgi.wiring.package=javax.annotation) Unresolved requirements: [[com.vaadin.external.atmosphere.runtime [3](R 3.0)] osgi.wiring.package; (osgi.wiring.package=javax.annotation)])
org.osgi.framework.BundleException: Unable to resolve com.vaadin.external.atmosphere.runtime [3](R 3.0): missing requirement [com.vaadin.external.atmosphere.runtime [3](R 3.0)] osgi.wiring.package; (osgi.wiring.package=javax.annotation) Unresolved requirements: [[com.vaadin.external.atmosphere.runtime [3](R 3.0)] osgi.wiring.package; (osgi.wiring.package=javax.annotation)]
at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4362)
at org.apache.felix.framework.Felix.startBundle(Felix.java:2277)
at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1535)
at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308)
at java.base/java.lang.Thread.run(Thread.java:834)
ERROR: Bundle com.vaadin.flow.client [9] Error starting file:/Users/vladyslavgutsul/Downloads/v14osgi/target/felix-framework-6.0.0/bundle/flow-client-2.0.4.jar (org.osgi.framework.BundleException: Unable to resolve com.vaadin.flow.client [9](R 9.0): missing requirement [com.vaadin.flow.client [9](R 9.0)] osgi.wiring.package; (&(osgi.wiring.package=com.vaadin.flow.client)(version>=2.0.0)(!(version>=3.0.0))) [caused by: Unable to resolve com.vaadin.flow.server [14](R 14.0): missing requirement [com.vaadin.flow.server [14](R 14.0)] osgi.wiring.package; (&(osgi.wiring.package=com.helger.css.decl)(version>=6.1.0)(!(version>=7.0.0))) [caused by: Unable to resolve com.helger.ph-css [67](R 67.0): missing requirement [com.helger.ph-css [67](R 67.0)] osgi.wiring.packaorg.osgi.framework.BundleException: Unable to resolve com.vaadin.flow.client [9](R 9.0): missing requirement [com.vaadin.flow.clge; (&(osgi.wiring.package=com.helger.commons)(version>=9.0.0)(!(version>=10.0.0))) [caused by: Unable to resolve com.helger.ph-ient [9](R 9.0)] osgi.wiring.package; (&(osgi.wiring.package=com.vaadin.flow.client)(version>=2.0.0)(!(version>=3.0.0))) [caused by: Unable to resolve com.vaadin.flow.server [14](R 14.0): missing requirement [com.vaadin.flow.server [14](R 14.0)] osgi.wiring.package; (&(osgi.wiring.package=com.helger.css.decl)(version>=6.1.0)(!(version>=7.0.0))) [caused by: Unable to resolve com.helcommons [66](R 66.0): missing requirement [com.helger.ph-commons [66](R 66.0)] osgi.wiring.package; (osgi.wiring.package=javax.xger.ph-css [67](R 67.0): missing requirement [com.helger.ph-css [67](R 67.0)] osgi.wiring.package; (&(osgi.wiring.package=com.heml.bind)]]] Unresolved requirements: [[com.vaadin.flow.client [9](R 9.0)] osgi.wiring.package; (&(osgi.wiring.package=com.vaadinlger.commons)(version>=9.0.0)(!(version>=10.0.0))) [caused by: Unable to resolve com.helger.ph-commons [66](R 66.0): missing req.flow.client)(version>=2.0.0)(!(version>=3.0.0)))])
uirement [com.helger.ph-commons [66](R 66.0)] osgi.wiring.package; (osgi.wiring.package=javax.xml.bind)]]] Unresolved requirements: [[com.vaadin.flow.client [9](R 9.0)] osgi.wiring.package; (&(osgi.wiring.package=com.vaadin.flow.client)(version>=2.0.0)(!(version>=3.0.0)))]
at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4362)
at org.apache.felix.framework.Felix.startBundle(Felix.java:2277)
at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1535)
at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308)
at java.base/java.lang.Thread.run(Thread.java:834)
ERROR: Bundle com.vaadin.flow.data [10] Error starting file:/Users/vladyslavgutsul/Downloads/v14osgi/target/felix-framework-6.0.0/bundle/flow-data-2.0.4.jar (org.osgi.framework.BundleException: Unable to resolve com.vaadin.flow.data [10](R 10.0): missing requirement [com.vaadin.flow.data [10](R 10.0)] osgi.wiring.package; (&(osgi.wiring.package=com.vaadin.flow.component.internal)(version>=2.0.4)(version<=2.0.4)) [caused by: Unable to resolve com.vaadin.flow.server [14](R 14.0): missing requirement [com.vaadin.flow.server [14](R 14.0)] osgi.wiring.package; (&(osgi.wiring.package=com.helger.css.decl)(version>=6.1.0)(!(version>=7.0.0))) [caused by: Unable to resolve com.helger.ph-css [67](R 67.0): missing requirement [com.helger.ph-css [67](R 67.0)] osgi.wiringorg.osgi.framework.BundleException: Unable to resolve com.vaadin.flow.data [10](R 10.0): missing requirement [com.vaadin.flow.da.package; (&(osgi.wiring.package=com.helger.commons)(version>=9.0.0)(!(version>=10.0.0))) [caused by: Unable to resolve com.helgta [10](R 10.0)] osgi.wiring.package; (&(osgi.wiring.package=com.vaadin.flow.component.internal)(version>=2.0.4)(version<=2.0.4)) [caused by: Unable to resolve com.vaadin.flow.server [14](R 14.0): missing requirement [com.vaadin.flow.server [14](R 14.0)] oer.ph-commons [66](R 66.0): missing requirement [com.helger.ph-commons [66](R 66.0)] osgi.wiring.package; (osgi.wiring.package=jsgi.wiring.package; (&(osgi.wiring.package=com.helger.css.decl)(version>=6.1.0)(!(version>=7.0.0))) [caused by: Unable to resolvavax.xml.bind)]]] Unresolved requirements: [[com.vaadin.flow.data [10](R 10.0)] osgi.wiring.package; (&(osgi.wiring.package=com.e com.helger.ph-css [67](R 67.0): missing requirement [com.helger.ph-css [67](R 67.0)] osgi.wiring.package; (&(osgi.wiring.packavaadin.flow.component.internal)(version>=2.0.4)(version<=2.0.4))])
ge=com.helger.commons)(version>=9.0.0)(!(version>=10.0.0))) [caused by: Unable to resolve com.helger.ph-commons [66](R 66.0): missing requirement [com.helger.ph-commons [66](R 66.0)] osgi.wiring.package; (osgi.wiring.package=javax.xml.bind)]]] Unresolved requirements: [[com.vaadin.flow.data [10](R 10.0)] osgi.wiring.package; (&(osgi.wiring.package=com.vaadin.flow.component.internal)(version>=2.0.4)(version<=2.0.4))]
at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4362)
at org.apache.felix.framework.Felix.startBundle(Felix.java:2277)
at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1535)
at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308)
at java.base/java.lang.Thread.run(Thread.java:834)
ERROR: Bundle com.vaadin.flow.html.components [11] Error starting file:/Users/vladyslavgutsul/Downloads/v14osgi/target/felix-framework-6.0.0/bundle/flow-html-components-2.0.4.jar (org.osgi.framework.BundleException: Unable to resolve com.vaadin.flow.html.components [11](R 11.0): missing requirement [com.vaadin.flow.html.components [11](R 11.0)] osgi.wiring.package; (&(osgi.wiring.package=com.vaadin.flow.dom)(version>=2.0.4)(version<=2.0.4)) [caused by: Unable to resolve com.vaadin.flow.server [14](R 14.0): missing requirement [com.vaadin.flow.server [14](R 14.0)] osgi.wiring.package; (&(osgi.wiring.package=com.helger.css.decl)(versiorg.osgi.framework.BundleException: Unable to resolve com.vaadin.flow.html.components [11](R 11.0): missing requirement [com.vaaon>=6.1.0)(!(version>=7.0.0))) [caused by: Unable to resolve com.helger.ph-css [67](R 67.0): missing requirement [com.helger.ph-din.flow.html.components [11](R 11.0)] osgi.wiring.package; (&(osgi.wiring.package=com.vaadin.flow.dom)(version>=2.0.4)(version<css [67](R 67.0)] osgi.wiring.package; (&(osgi.wiring.package=com.helger.commons)(version>=9.0.0)(!(version>=10.0.0))) [caused b=2.0.4)) [caused by: Unable to resolve com.vaadin.flow.server [14](R 14.0): missing requirement [com.vaadin.flow.server [14](R 14.0)] osgi.wiring.package; (&(osgi.wiring.package=com.helger.css.decl)(version>=6.1.0)(!(version>=7.0.0))) [caused by: Unable toy: Unable to resolve com.helger.ph-commons [66](R 66.0): missing requirement [com.helger.ph-commons [66](R 66.0)] osgi.wiring.pa resolve com.helger.ph-css [67](R 67.0): missing requirement [com.helger.ph-css [67](R 67.0)] osgi.wiring.package; (&(osgi.wirinckage; (osgi.wiring.package=javax.xml.bind)]]] Unresolved requirements: [[com.vaadin.flow.html.components [11](R 11.0)] osgi.wirg.package=com.helger.commons)(version>=9.0.0)(!(version>=10.0.0))) [caused by: Unable to resolve com.helger.ph-commons [66](R 66ing.package; (&(osgi.wiring.package=com.vaadin.flow.dom)(version>=2.0.4)(version<=2.0.4))])
.0): missing requirement [com.helger.ph-commons [66](R 66.0)] osgi.wiring.package; (osgi.wiring.package=javax.xml.bind)]]] Unresolved requirements: [[com.vaadin.flow.html.components [11](R 11.0)] osgi.wiring.package; (&(osgi.wiring.package=com.vaadin.flow.dom)(version>=2.0.4)(version<=2.0.4))]
at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4362)
at org.apache.felix.framework.Felix.startBundle(Felix.java:2277)
at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1535)
at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308)
at java.base/java.lang.Thread.run(Thread.java:834)

.....
.....
.....

ERROR: Bundle com.vaadin.flow.component.upload [153] Error starting file:/Users/vladyslavgutsul/Downloads/v14osgi/target/felix-framework-6.0.0/bundle/vaadin-upload-flow-2.0.0.jar (org.osgi.framework.BundleException: Unable to resolve com.vaadin.flow.component.upload [153](R 153.0): missing requirement [com.vaadin.flow.component.upload [153](R 153.0)] osgi.wiring.package; (&(osgi.wiring.package=com.vaadin.flow.component.dependency)(version>=2.0.0)(!(version>=3.0.0))) [caused by: Unable to resolve com.vaadin.org.osgi.framework.BundleException: Unable to resolve com.vaadin.flow.component.upload [153](R 153.0): missing requirement [com.flow.server [14](R 14.0): missing requirement [com.vaadin.flow.server [14](R 14.0)] osgi.wiring.package; (&(osgi.wiring.package=vaadin.flow.component.upload [153](R 153.0)] osgi.wiring.package; (&(osgi.wiring.package=com.vaadin.flow.component.dependency)(vcom.helger.css.decl)(version>=6.1.0)(!(version>=7.0.0))) [caused by: Unable to resolve com.helger.ph-css [67](R 67.0): missing rersion>=2.0.0)(!(version>=3.0.0))) [caused by: Unable to resolve com.vaadin.flow.server [14](R 14.0): missing requirement [com.vequirement [com.helger.ph-css [67](R 67.0)] osgi.wiring.package; (&(osgi.wiring.package=com.helger.commons)(version>=9.0.0)(!(veaadin.flow.server [14](R 14.0)] osgi.wiring.package; (&(osgi.wiring.package=com.helger.css.decl)(version>=6.1.0)(!(version>=7.0.0))) [caused by: Unable to resolve com.helger.ph-css [67](R 67.0): missing requirement [com.helger.ph-css [67](R 67.0)] osgi.wiring.package; (&(osgi.wiring.package=com.helger.commons)(version>=9.0.0)(!(version>=10.0.0))) [caused by: Unable to resolve com.hrsion>=10.0.0))) [caused by: Unable to resolve com.helger.ph-commons [66](R 66.0): missing requirement [com.helger.ph-commons [6elger.ph-commons [66](R 66.0): missing requirement [com.helger.ph-commons [66](R 66.0)] osgi.wiring.package; (osgi.wiring.packag6](R 66.0)] osgi.wiring.package; (osgi.wiring.package=javax.xml.bind)]]] Unresolved requirements: [[com.vaadin.flow.component.upload [153](R 153.0)] osgi.wiring.package; (&(osgi.wiring.package=com.vaadin.flow.component.dependency)(version>=2.0.0)(!(version>=3.0.0)))])
e=javax.xml.bind)]]] Unresolved requirements: [[com.vaadin.flow.component.upload [153](R 153.0)] osgi.wiring.package; (&(osgi.wiring.package=com.vaadin.flow.component.dependency)(version>=2.0.0)(!(version>=3.0.0)))]
at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4362)
at org.apache.felix.framework.Felix.startBundle(Felix.java:2277)
at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1535)
at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308)
at java.base/java.lang.Thread.run(Thread.java:834)

I can't get the V14-rc9 OSGi starter to run under Java 8 either. Same exceptions.

The issue is open since July. I have tried it using Java 8 and 11. The problem is still present, so my team is not able to use Vaadin in our OSGi based application. Are there any plans to fix this?

Sure, we would like to fix it at least for Java 8.
The problem is : I'm not able to reproduce this with Java 8.
Tried right now and it works fine.
So to be able to fix it we need a way to identify the issue and I don't see how may I do it.....

pleku commented

Should be retested with Java 8 & 11 and latest 14.2 version.

There are a number of issue with OSGi in 14.2 .

I've made ticket for one in grid repo : vaadin/vaadin-grid-flow#1030

The Flow version is set to to 2.2 (via 14.2.1 platform version ).
All necessary fixes are done for that so that it works with Java 8.

Java 11 fixes are also done here for this starter.
There is an NPE bug in Flow which is already fixes both master and 14.2.
So this should work once new Flow/Platform is released and version is updated in the started.

Closing as fixed.