Skip to content

Migrate to Jakarta EE 10 / Jetty 12 / Jersey 3.x / Karaf 4.5#5479

Draft
holgerfriedrich wants to merge 10 commits into
openhab:mainfrom
holgerfriedrich:k450
Draft

Migrate to Jakarta EE 10 / Jetty 12 / Jersey 3.x / Karaf 4.5#5479
holgerfriedrich wants to merge 10 commits into
openhab:mainfrom
holgerfriedrich:k450

Conversation

@holgerfriedrich

Copy link
Copy Markdown
Member

Servlet / HTTP:

  • Migrate all servlet imports to jakarta.servlet.*
  • Upgrade Jetty 9.4.x → 12.0.23 (ee10 modules)
  • Upgrade Pax Web 8.0.x → 11.0.1
  • Replace org.apache.felix.http.servlet-api with jakarta.servlet-api 6.1.0

JAX-RS:

  • Replace Apache Aries JAX-RS Whiteboard + CXF with Eclipse OSGi Tech REST backed by Jersey 3.1.3
  • Switch osgi.service.jaxrs to osgi.service.jakartars (OSGi R8)
  • Update all itest bndrun -runbundles accordingly

JAXB:

  • Migrate maven-jaxb2-plugin → org.jvnet.jaxb:jaxb-maven-plugin 3.0.2
  • Upgrade jakarta.xml.bind-api 2.3.3 → 3.0.0 (jakarta namespace)
  • Replace org.glassfish.jaxb:jaxb-osgi with com.sun.xml.bind:jaxb-osgi 3.0.2
  • Update .xjb binding files and XSD to JAXB 3 namespace
  • Add openhab.tp-jaxb as dependency to openhab-core-base feature

Karaf:

  • Upgrade karaf.compile.version and karaf.tooling.version to 4.5.0

Dependencies:

  • Pin org.glassfish.hk2:osgi-resource-locator to 1.0.3 in bom/runtime to match feature.xml; Jersey 3.x requires this version range
  • jupnp upgrade to jakarta, not yet available

@holgerfriedrich

holgerfriedrich commented Apr 7, 2026

Copy link
Copy Markdown
Member Author

This is a first try to move to the (not yet released) Karaf 4.5.0 based on Jetty 12 and Jakarta 🎉
The biggest hurdle seemed to be to find a replacement for our aries rs whiteboard, which I could not get to compile with all the Jakarta packages.

I don't know if all the package migrations I had to complete in this PR are the best choice, but I got all the tests and itests green 🥳

I did not manage yet to get a running system and I am not sure what is missing to get there.

If you want to reproduce, you need two build two dependencies:

@holgerfriedrich

Copy link
Copy Markdown
Member Author

Far from working, but the runtime now starts, see this nice excerpt from bundle list:

112 │ Active   │  30 │ 12.0.23                 │ EE10 :: Websocket :: Jetty Server
131 │ Active   │  30 │ 12.0.23                 │ Core :: Websocket :: Jetty API
132 │ Active   │  30 │ 12.0.23                 │ Core :: Websocket :: Jetty Client
133 │ Active   │  30 │ 12.0.23                 │ Core :: Websocket :: Jetty Common
249 │ Active   │  30 │ 11.0.1                  │ OPS4J Pax Web - Jetty

@holgerfriedrich holgerfriedrich changed the title Migrate to Jakarta EE 10 / Jetty 12 / Jersey 3.x / Karaf 4. Migrate to Jakarta EE 10 / Jetty 12 / Jersey 3.x / Karaf 4.5 Apr 7, 2026
@florian-h05

Copy link
Copy Markdown
Contributor

Is there any schedule wrt Karaf 4.5 release?

@holgerfriedrich

Copy link
Copy Markdown
Member Author

@florian-h05 I would expect it within a month from now. All major libraries have been upgrades, jetty an pax upgrades are completed. Removal of SecurityManager is in work. Last piece is then the remaining incompatibilities with Java 25. Just my personal opinion, though.

@andrewfg

Copy link
Copy Markdown
Contributor

@holgerfriedrich many thanks for your work on this both here and in the Apache Karaf repo. I am expecting the Jetty v9.5.x to v12.0.x upgrade will impact the Hue binding Clip2Bridge.java since it uses quite low level Jetty HTTP/2 code. Therefore I am quite keen to test it asap with the earliest builds of this PR.

@lolodomo

lolodomo commented May 3, 2026

Copy link
Copy Markdown
Contributor

As this is a major upgrade with potential impacts on (many) bindings, is it something we should keep for OH 6?
Or do you imagine that for OH 5.3?

@andrewfg

andrewfg commented May 3, 2026

Copy link
Copy Markdown
Contributor

is it something we should keep for OH 6?

Please not. The upgrade is already way overdue so we should try to do it asap.

The impacted bindings will be those that don't build due to the name space change from javax to jakarta. So testing can focus on those. Perhaps consider a parallel snapshot so testers have more time.

@andrewfg

andrewfg commented May 3, 2026

Copy link
Copy Markdown
Contributor

impacted bindings will be those that don't build due to the name space change from javax to jakarta

So probably ~ 85 bindings as follows:.

org.openhab.binding.airparif
org.openhab.binding.amazonechocontrol
org.openhab.binding.androidtv
org.openhab.binding.argoclima
org.openhab.binding.atmofrance
org.openhab.binding.avmfritz
org.openhab.binding.boschshc
org.openhab.binding.bticinosmarther
org.openhab.binding.dahuadoor
org.openhab.binding.denonmarantz
org.openhab.binding.deutschebahn
org.openhab.binding.draytonwiser
org.openhab.binding.electroluxappliance
org.openhab.binding.emotiva
org.openhab.binding.fenecon
org.openhab.binding.flume
org.openhab.binding.freeboxos
org.openhab.binding.frenchgovtenergydata
org.openhab.binding.fsinternetradio
org.openhab.binding.gce
org.openhab.binding.gpstracker
org.openhab.binding.growatt
org.openhab.binding.hdpowerview
org.openhab.binding.helios
org.openhab.binding.herzborg
org.openhab.binding.homeconnect
org.openhab.binding.homematic
org.openhab.binding.hue
org.openhab.binding.iaqualink
org.openhab.binding.ipcamera
org.openhab.binding.ipobserver
org.openhab.binding.jellyfin
org.openhab.binding.konnected
org.openhab.binding.lametrictime
org.openhab.binding.lgthinq
org.openhab.binding.linktap
org.openhab.binding.linky
org.openhab.binding.magentatv
org.openhab.binding.mail
org.openhab.binding.meteofrance
org.openhab.binding.metofficedatahub
org.openhab.binding.mffan
org.openhab.binding.mielecloud
org.openhab.binding.mqtt
org.openhab.binding.mycroft
org.openhab.binding.mynice
org.openhab.binding.neeo
org.openhab.binding.netatmo
org.openhab.binding.nobohub
org.openhab.binding.nuki
org.openhab.binding.nuvo
org.openhab.binding.ondilo
org.openhab.binding.pihole
org.openhab.binding.pushbullet
org.openhab.binding.remoteopenhab
org.openhab.binding.rfxcom
org.openhab.binding.ring
org.openhab.binding.roku
org.openhab.binding.salus
org.openhab.binding.semsportal
org.openhab.binding.shelly
org.openhab.binding.siemenshvac
org.openhab.binding.smartthings
org.openhab.binding.solarman
org.openhab.binding.somfytahoma
org.openhab.binding.spotify
org.openhab.binding.sunsynk
org.openhab.binding.synopanalyzer
org.openhab.binding.tado
org.openhab.binding.tellstick
org.openhab.binding.tesla
org.openhab.binding.tr064
org.openhab.binding.twilio
org.openhab.binding.unifiprotect
org.openhab.binding.vesync
org.openhab.binding.viessmann
org.openhab.binding.volumio
org.openhab.binding.webexteams
org.openhab.binding.wolfsmartset
org.openhab.binding.wundergroundupdatereceiver
org.openhab.binding.xmltv
org.openhab.io.hueemulation
org.openhab.io.metrics
org.openhab.io.neeo
org.openhab.persistence.rrd4j

@lolodomo

lolodomo commented May 3, 2026

Copy link
Copy Markdown
Contributor

Also those relying on JAX-RS Whiteboard.

And maybe all bindings relying on Jetty (a majority of our bindings).

This change, even if of course expected, could lead to lot of work and lot of bugs to be fixed.
That is of course just an hypothesis, I am not sure at all.

@andrewfg

andrewfg commented May 3, 2026

Copy link
Copy Markdown
Contributor

Also those relying on JAX-RS Whiteboard.

Do you mean those that import javax.ws.rs? In which case they are already included in the 85 above. Or is there some other marker to look for?

And maybe all bindings relying on Jetty (a majority of our bindings).

AFAICT the Jetty name space does not change so the existing pom dependencies should pull in the new versions.

Jetty (a majority of our bindings)

This is true, but a large proportion of them depend on either a) the OH core common client or b) custom clients created by the OH core client builder. i.e. the OH Core isolates the bindings from much nitty gritty.

lot of work and lot of bugs to be fixed.
That is of course just an hypothesis, I am not sure at all.

Me neither. That is actually why I argue to do it sooner rather than later, in order to get a head start.


PS I just wrote a little program to automate the namespace changes. It currently touches 300+ binding class files. We could easily extend this program to make any other systematic changes as may be necessary..

@holgerfriedrich

Copy link
Copy Markdown
Member Author

We will see when 4.5 is ready to go; target date is July. It will support Java 21 and 25.

Due to the jetty upgrade, the first release with 4.5 should IMHO be named OH 6.0.

Let's give it some time. I will rebase once we have upgraded core to 4.4.11.
My last status is that OH starts but the whiteboard registration fails and thus the REST API is not working.

@holgerfriedrich

Copy link
Copy Markdown
Member Author

Good news, everyone! 😎

I have got a running core distribution on Jetty 12. Whiteboards are working now, so REST and static content is served. I went through the setup wizard (without installing any add-ons, still have none ported) and end up on the main page.

It is quite a hack: I needed a patch for pax web for the whiteboard registration, patch jupnp, etc....

Download from
https://github.com/holgerfriedrich/openhab-builds/actions/workflows/k450.yml
if you like to test it.
Add-ons KAR is not yet compatible, just take the zip for core.

Next steps:

  • get at least parts of the add-ons repo compiling as well (or disable the bindings which have not been ported yet).... disabling is tedious as we need to remove all disabled add-ons from the feature as well to pass feature verification.
  • think about how to proceed in the CI - add an OH6 build or keep it on a branch until we have released 5.2....

@lsiepel

lsiepel commented May 28, 2026

Copy link
Copy Markdown
Contributor

Due to the jetty upgrade, the first release with 4.5 should IMHO be named OH 6.0.

I think we need to discuss the targeted release, what it includes, what not and how it cen be seen from different perspectives (technical, user developer etc). Is there some issue you can point to for the discussion or should i open a new one.

@holgerfriedrich

Copy link
Copy Markdown
Member Author

I think we need to discuss the targeted release, what it includes, what not and how it cen be seen from different perspectives (technical, user developer etc). Is there some issue you can point to for the discussion or should i open a new one.

@lsiepel I will open a new one soon - my focus is to get a working prototype of the full distro first.
I will give a heads-up in the next few days.

@holgerfriedrich

Copy link
Copy Markdown
Member Author

I will comment on the progress here... faster than actually expected, here is the first prototype of a full distribution based on Jetty 12 / Jakarta / Karaf 4.5 SNAPSHOT!!!

I could complete the setup wizard and install all default bindings! 🥳

grafik

https://github.com/holgerfriedrich/openhab-builds/actions/runs/26593081741

  • Add-ons are included. Only a few are already known to be broken and need releases of base libraries, see Migrate to Jakarta EE 10: Jetty 12, Jersey 3.x, Karaf 4.5 openhab-addons#20800.
  • For now, the release is named "OH 6.0". More or less out of practical reasons (to avoid that OH snapshots from the web are preferred over my local core build).
  • Java 25 is not yet possible, as Karaf 4.5 SNAPSHOT is lacking a few PRs for this. After that, we should be good to go with both Java 21 and Java 25.

@holgerfriedrich

holgerfriedrich commented Jun 4, 2026

Copy link
Copy Markdown
Member Author

@holgerfriedrich holgerfriedrich force-pushed the k450 branch 2 times, most recently from d1e4881 to 1d28e74 Compare June 6, 2026 20:56
@holgerfriedrich

Copy link
Copy Markdown
Member Author

@andrewfg I do reply to your comment from the discussion thread in this PR.

You could give the hue binding a try. IIRC, all tests/itests were PASS on my system.
See openhab/openhab-addons#20800 and the latest download link for the full distro from #5479.

Hmm. I tried it just now and unfortunately I did not even make it as far as the first wizard page in OH Main UI...
Image

I just tested the latest build, rebased today, number 36:
https://github.com/holgerfriedrich/openhab-builds/actions/runs/27073755110

It works perfectly fine; I just went through the setup wizard and installed bindings.

Firefox on Windows, but Chrome and Edge seem to work as well. When switching to a new instance, I sometimes have to clear the cache or enable the dev console to prevent caching.

Maybe you could give it another try? Thanks!

@andrewfg

andrewfg commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

It works perfectly fine; I just went through the setup wizard and installed bindings.
Maybe you could give it another try? Thanks!

Just for the avoidance of doubt I am downloading the ZIP at the bottom of this page and expanding it to a folder on my Windows PC.

I run the start.bat file and the console starts. However when I go to the web startup page http://192.168.1.232:8080/ page I get garbled text. I also tried with SSL https://192.168.1.232:8080/ but then it says "This site can’t provide a secure connection".

Maybe a certificate issue? PS I tried and failed on both Chrome and Edge on the same PC and also on my mobile phone. And cleaning the cache does not help.


EDIT: here is the log file (with crash dump) on startup..

Details
2026-06-07 11:13:48.281 [INFO ] [org.openhab.core.Activator          ] - Starting openHAB 6.0.0 (- local build -)
2026-06-07 11:13:48.708 [WARN ] [jetty.server.handler.ResourceHandler] - Base Resource should not be an alias
2026-06-07 11:13:50.205 [WARN ] [org.openhab.core.net.NetUtil        ] - Found multiple local interfaces - ignoring 192.168.208.1
2026-06-07 11:13:54.220 [INFO ] [.core.model.lsp.internal.ModelServer] - Started Language Server Protocol (LSP) service on port 5007
2026-06-07 11:13:54.745 [ERROR] [org.jupnp.UpnpServiceImpl           ] - bundle org.jupnp:4.0.0.202606062101 (268)[org.jupnp.UpnpServiceImpl(359)] : The activate method has thrown an exception
java.lang.IndexOutOfBoundsException: Index 1 out of bounds for length 1
	at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:100)
	at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:106)
	at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:302)
	at java.base/java.util.Objects.checkIndex(Objects.java:385)
	at java.base/java.util.ArrayList.remove(ArrayList.java:551)
	at org.jupnp.transport.impl.NetworkAddressFactoryImpl$2.synchronizedRemove(NetworkAddressFactoryImpl.java:178)
	at org.jupnp.util.Iterators$Synchronized.remove(Iterators.java:116)
	at org.jupnp.transport.RouterImpl.startAddressBasedTransports(RouterImpl.java:410)
	at org.jupnp.transport.RouterImpl.enable(RouterImpl.java:127)
	at org.jupnp.UpnpServiceImpl.startup(UpnpServiceImpl.java:263)
	at org.jupnp.UpnpServiceImpl.activate(UpnpServiceImpl.java:100)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at org.apache.felix.scr.impl.inject.methods.BaseMethod.invokeMethod(BaseMethod.java:257)
	at org.apache.felix.scr.impl.inject.methods.BaseMethod.access$500(BaseMethod.java:41)
	at org.apache.felix.scr.impl.inject.methods.BaseMethod$Resolved.invoke(BaseMethod.java:701)
	at org.apache.felix.scr.impl.inject.methods.BaseMethod.invoke(BaseMethod.java:544)
	at org.apache.felix.scr.impl.inject.methods.ActivateMethod.invoke(ActivateMethod.java:317)
	at org.apache.felix.scr.impl.inject.methods.ActivateMethod.invoke(ActivateMethod.java:307)
	at org.apache.felix.scr.impl.manager.SingleComponentManager.createImplementationObject(SingleComponentManager.java:353)
	at org.apache.felix.scr.impl.manager.SingleComponentManager.createComponent(SingleComponentManager.java:115)
	at org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:1001)
	at org.apache.felix.scr.impl.manager.SingleComponentManager.getServiceInternal(SingleComponentManager.java:974)
	at org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:919)
	at org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse$1.run(ServiceFactoryUse.java:229)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:319)
	at org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse.factoryGetService(ServiceFactoryUse.java:226)
	at org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse.getService(ServiceFactoryUse.java:120)
	at org.eclipse.osgi.internal.serviceregistry.ServiceConsumer$2.getService(ServiceConsumer.java:48)
	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.getService(ServiceRegistrationImpl.java:588)
	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.getService(ServiceRegistry.java:590)
	at org.eclipse.osgi.internal.framework.BundleContextImpl.getService(BundleContextImpl.java:675)
	at org.apache.felix.scr.impl.manager.SingleRefPair.getServiceObject(SingleRefPair.java:88)
	at org.apache.felix.scr.impl.inject.internal.ComponentConstructorImpl.newInstance(ComponentConstructorImpl.java:287)
	at org.apache.felix.scr.impl.manager.SingleComponentManager.createImplementationObject(SingleComponentManager.java:286)
	at org.apache.felix.scr.impl.manager.SingleComponentManager.createComponent(SingleComponentManager.java:115)
	at org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:1001)
	at org.apache.felix.scr.impl.manager.SingleComponentManager.getServiceInternal(SingleComponentManager.java:974)
	at org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:919)
	at org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse$1.run(ServiceFactoryUse.java:229)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:319)
	at org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse.factoryGetService(ServiceFactoryUse.java:226)
	at org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse.getService(ServiceFactoryUse.java:120)
	at org.eclipse.osgi.internal.serviceregistry.ServiceConsumer$2.getService(ServiceConsumer.java:48)
	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.getService(ServiceRegistrationImpl.java:588)
	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.getService(ServiceRegistry.java:590)
	at org.eclipse.osgi.internal.framework.BundleContextImpl.getService(BundleContextImpl.java:675)
	at org.apache.felix.scr.impl.manager.SingleRefPair.getServiceObject(SingleRefPair.java:88)
	at org.apache.felix.scr.impl.inject.methods.BindMethod.getServiceObject(BindMethod.java:669)
	at org.apache.felix.scr.impl.manager.DependencyManager.getServiceObject(DependencyManager.java:2625)
	at org.apache.felix.scr.impl.manager.DependencyManager.doInvokeBindMethod(DependencyManager.java:2091)
	at org.apache.felix.scr.impl.manager.DependencyManager.invokeBindMethod(DependencyManager.java:2074)
	at org.apache.felix.scr.impl.manager.SingleComponentManager.invokeBindMethod(SingleComponentManager.java:442)
	at org.apache.felix.scr.impl.manager.DependencyManager$MultipleDynamicCustomizer.addedService(DependencyManager.java:337)
	at org.apache.felix.scr.impl.manager.DependencyManager$MultipleDynamicCustomizer.addedService(DependencyManager.java:304)
	at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1232)
	at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1152)
	at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.trackAdding(ServiceTracker.java:959)
	at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.track(ServiceTracker.java:895)
	at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:1184)
	at org.apache.felix.scr.impl.BundleComponentActivator$ListenerInfo.serviceChanged(BundleComponentActivator.java:118)
	at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:134)
	at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:1000)
	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
	at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:151)
	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:999)
	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:933)
	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:146)
	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:321)
	at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:504)
	at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:931)
	at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:917)
	at org.apache.felix.scr.impl.manager.RegistrationManager.changeRegistration(RegistrationManager.java:133)
	at org.apache.felix.scr.impl.manager.AbstractComponentManager.registerService(AbstractComponentManager.java:986)
	at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:754)
	at org.apache.felix.scr.impl.manager.AbstractComponentManager.enableInternal(AbstractComponentManager.java:676)
	at org.apache.felix.scr.impl.manager.AbstractComponentManager.enable(AbstractComponentManager.java:439)
	at org.apache.felix.scr.impl.manager.ConfigurableComponentHolder.enableComponents(ConfigurableComponentHolder.java:671)
	at org.apache.felix.scr.impl.BundleComponentActivator.initialEnable(BundleComponentActivator.java:341)
	at org.apache.felix.scr.impl.Activator.loadComponents(Activator.java:610)
	at org.apache.felix.scr.impl.Activator.access$200(Activator.java:75)
	at org.apache.felix.scr.impl.Activator$ScrExtension.start(Activator.java:477)
	at org.apache.felix.scr.impl.AbstractExtender.createExtension(AbstractExtender.java:196)
	at org.apache.felix.scr.impl.AbstractExtender.modifiedBundle(AbstractExtender.java:169)
	at org.apache.felix.scr.impl.AbstractExtender.modifiedBundle(AbstractExtender.java:49)
	at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:488)
	at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:420)
	at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:232)
	at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:450)
	at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:987)
	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
	at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:151)
	at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEventPrivileged(EquinoxEventPublisher.java:237)
	at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:136)
	at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:128)
	at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor.publishModuleEvent(EquinoxContainerAdaptor.java:232)
	at org.eclipse.osgi.container.Module.publishEvent(Module.java:534)
	at org.eclipse.osgi.container.Module.start(Module.java:518)
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel$2.run(ModuleContainer.java:2110)
	at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor$1$1.execute(EquinoxContainerAdaptor.java:146)
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:2101)
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:2043)
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:2003)
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1915)
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
	at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:341)
2026-06-07 11:13:54.753 [WARN ] [discovery.addon.upnp.UpnpAddonFinder] - bundle org.openhab.core.config.discovery.addon.upnp:6.0.0.202606062107 (269)[org.openhab.core.config.discovery.addon.upnp.UpnpAddonFinder(361)] : Could not get service from ref {org.jupnp.UpnpService}={initialSearchEnabled=true, service.id=531, service.bundleid=268, service.scope=bundle, osgi.ds.satisfying.condition.target=(osgi.condition.id=true), component.name=org.jupnp.UpnpServiceImpl, component.id=359}
2026-06-07 11:13:54.754 [ERROR] [discovery.addon.upnp.UpnpAddonFinder] - bundle org.openhab.core.config.discovery.addon.upnp:6.0.0.202606062107 (269)[org.openhab.core.config.discovery.addon.upnp.UpnpAddonFinder(361)] : Error during instantiation of the implementation object: Unable to get service for reference $000
2026-06-07 11:13:54.755 [WARN ] [scovery.addon.AddonSuggestionService] - bundle org.openhab.core.config.discovery.addon:6.0.0.202606062107 (184)[org.openhab.core.config.discovery.addon.AddonSuggestionService(144)] : Could not get service from ref {org.openhab.core.config.discovery.addon.AddonFinder}={service.id=532, service.bundleid=269, service.scope=bundle, osgi.ds.satisfying.condition.target=(osgi.condition.id=true), component.name=upnp-addon-suggestion-finder, component.id=361}
2026-06-07 11:13:54.755 [WARN ] [scovery.addon.AddonSuggestionService] - bundle org.openhab.core.config.discovery.addon:6.0.0.202606062107 (184)[org.openhab.core.config.discovery.addon.AddonSuggestionService(144)] : DependencyManager : invokeBindMethod : Service not available from service registry for ServiceReference {org.openhab.core.config.discovery.addon.AddonFinder}={service.id=532, service.bundleid=269, service.scope=bundle, osgi.ds.satisfying.condition.target=(osgi.condition.id=true), component.name=upnp-addon-suggestion-finder, component.id=361} for reference AddonFinder
2026-06-07 11:14:03.867 [INFO ] [e.automation.internal.RuleEngineImpl] - Rule engine started.

@holgerfriedrich

Copy link
Copy Markdown
Member Author

@andrewfg Thanks for testing. Yes, expand the zip. Download the kar file and move it into the addons folder (in case you want more than just core).

It seems that you discovered two new bugs ;-)

  1. Local IP seems not to work properly; if you use http://localhost:8080/ it should work. I can reproduce the issue.
  2. jupnp issue in the log you provided, I have not seen this before.

@andrewfg

andrewfg commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

if you use http://localhost:8080/ it should work

Wow! Astonishingly it does indeed work! Fantastic job @holgerfriedrich !

image

There is however a lot of chatter in the logs openhab.zip relating to Jupnp, Jetty, Jersey etc. .. In particular I have the feeling that the HK2 log is somehow related to the Hue binding, even if the stack trace does not indicate it directly..

@holgerfriedrich

holgerfriedrich commented Jun 8, 2026

Copy link
Copy Markdown
Member Author

@andrewfg Thanks again for testing and providing the logs. I could already silence a few warnings and I have created a PR for jupnp.
I will focus a bit more on Karaf 4.5 for the next days. Once I have a new build, I will post it here.

@andrewfg

andrewfg commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

@holgerfriedrich I am more than happy to look deeper into "my" addons code in my IDE to see if there are any warnings etc. .. which means I must set the local reference of OH Core on my development PC to be your fork+branch of OH Core 6 rather than my fork+branch of OH Core 5 (main). I am not a great expert on Git commands and I don't want to munge my development environment, so I wonder if you have any tips on how I could do this?

Servlet / HTTP:
- Migrate all servlet imports to jakarta.servlet.*
- Upgrade Jetty 9.4.x → 12.0.23 (ee10 modules)
- Upgrade Pax Web 8.0.x → 11.0.1
- Replace org.apache.felix.http.servlet-api with jakarta.servlet-api 6.1.0

JAX-RS:
- Replace Apache Aries JAX-RS Whiteboard + CXF with
  Eclipse OSGi Tech REST backed by Jersey 3.1.3
- Switch osgi.service.jaxrs to osgi.service.jakartars (OSGi R8)
- Update all itest bndrun -runbundles accordingly

JAXB:
- Migrate maven-jaxb2-plugin → org.jvnet.jaxb:jaxb-maven-plugin 3.0.2
- Upgrade jakarta.xml.bind-api 2.3.3 → 3.0.0 (jakarta namespace)
- Replace org.glassfish.jaxb:jaxb-osgi with com.sun.xml.bind:jaxb-osgi 3.0.2
- Update .xjb binding files and XSD to JAXB 3 namespace
- Add openhab.tp-jaxb as dependency to openhab-core-base feature

Karaf:
- Upgrade karaf.compile.version and karaf.tooling.version to 4.5.0

Dependencies:
- Pin org.glassfish.hk2:osgi-resource-locator to 1.0.3 in bom/runtime
  to match feature.xml; Jersey 3.x requires this version range
- jupnp upgrade to jakarta, not yet available

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
@holgerfriedrich

Copy link
Copy Markdown
Member Author

@andrewfg I don't have a batch file to prepare everything required for the distro build. I have a local installation - and it is quite independent from the typical activities for 5.2. This is why I did the version bump (to 5.3 or 6.0 actually does not matter). The point is, all compiled and installed 6.0 packages stay in local .m2 repository and are not obsoleted by a CI snapshot build.

It needs some work, but if you want to set up a local build, I would recommend to get the gh cli tool. Then you can basically copy the steps from this GH workflow and clone all repos you don't have cloned yet. If you have one repo on disk, just use the gh pr checkout [number] - I have PRs on every OH repo. Then it is just like another branch, keep it up-to-date using git pull.

Though, I am typically using the builds created by the GH workflow.

btw: sorry for the late answer, I took some time today to upgrade to Karaf and OH to recent pax web from 11.1.1 (including Jetty 12.0 to 12.1).
I will have a closer look at the warnings tomorrow and provide a new build.

@andrewfg

Copy link
Copy Markdown
Contributor

@holgerfriedrich thanks for the suggestions above; do not worry about it too much, but it did not work for me as your k450 branch seems to be based on OH 4.5 rather than 5.x; and therefore mvn could not build it for me. But anyway don't worry about it; it was just an idea..

@holgerfriedrich

holgerfriedrich commented Jun 10, 2026

Copy link
Copy Markdown
Member Author

@andrewfg my k450 branches target Karaf 4.5.0-SNAPSHOT. Just clone Karaf and run mvn install -Drat.skip=true -DskipTests. Then you need pax and openhab-util as in the workflow, before you can compile/install OH core k450 branch.

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
@andrewfg

Copy link
Copy Markdown
Contributor

@holgerfriedrich I managed to install the necessary modules and succeeded to build OH-Core v6.x. And then I could open your fork version of org.openhab.binding.hue (in which you have updated the dependencies). And actually I could not find any compiler warnings or whatever. It all looks perfect.

I think this is because at that time the "proper" HTTP2 in Jetty 9.5.x was not good for purpose so I was forced to construct the binding using raw HTTP2 components and made my own customised HTTP2 client with its own session management, frame parsing, concurrency and locking , flow control, throttling, timeouts etc. In the meantime Jetty 12 has much improved its own HTTP2 client, so probably if I would rewrite the binding now, it would be a much easier task for me. The good news however is that all original raw HTTP2 raw components are still present in Jetty 12 albeit no longer expected to be used externally. So as a general rule my old code still works. Although I expect that once we get to real operative systems there may be a few edge cases and slight behaviour differences.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants