vaadin / vaadin-flow-karaf-example

An example project for an OSGi Vaadin app deployed on Karaf
The Unlicense
7 stars 5 forks source link

PiT 23.1: starter fails to run with a `java.lang.NoSuchMethodError` #97

Closed manolo closed 2 years ago

manolo commented 2 years ago

Issue

When running the demo it fails to start by throwing the following error

SEVERE: Unable to start system bundle.
java.lang.NoSuchMethodError: 'java.util.Dictionary org.osgi.framework.FrameworkUtil.asDictionary(java.util.Map)'
    at org.apache.felix.framework.Felix$SystemBundleActivator.start(Felix.java:5166)
    at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:849)
    at org.apache.felix.framework.Felix.init(Felix.java:899)
...
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347)

May 19, 2022 2:22:20 PM org.apache.karaf.main.Main$2 log
SEVERE: Bundle org.apache.felix.framework [0] Error stopping bundle. (java.lang.NullPointerException)
java.lang.NullPointerException
    at org.apache.felix.framework.Felix$SystemBundleActivator.stop(Felix.java:5284)
    at org.apache.felix.framework.util.SecureAction.stopActivator(SecureAction.java:871)
    at org.apache.felix.framework.Felix.stopBundle(Felix.java:2822)
    at org.apache.felix.framework.Felix.init(Felix.java:969)
    at org.apache.felix.framework.Felix.init(Felix.java:648)
    at org.apache.karaf.main.Main.launch(Main.java:288)

How to reproduce

By following the README instructions do:

ZheSun88 commented 2 years ago

there is one comment from another issue ticket. https://github.com/vaadin/vaadin-flow-karaf-example/issues/65#issuecomment-1125153463 and it also provided an workaround.

mshabarov commented 2 years ago

Workaround applied to both v22 and v23 versions.

ZheSun88 commented 2 years ago

let us close this ticket, as the example is working now.

regarding the mentioned https://github.com/vaadin/osgi/issues/90, it can be handled separately.