Skip to content
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

Build fails with: ! Failed to start bundle org.apache.aries.jax.rs.whiteboard-2.0.1, exception activator error Bad type on operand stack #1327

Closed
frederictobiasc opened this issue Oct 26, 2021 · 48 comments

Comments

@frederictobiasc
Copy link

frederictobiasc commented Oct 26, 2021

Hi,
since today, my development setup stopped working. When running, just a black page is presented instead of openhab. I'm using openhab-distro from the latest main.

Steps to reproduce:

  1. Checkout main from openhab-distro
  2. Open launch/app/app.bndrun
  3. Click "Resolve" and "Update"
  4. Click "Run OSGi"

Workaround

Open the source of app.bndrun and remove the line: jakarta.ws.rs-api;version='[2.1.6,2.1.7)',\

or more persistent, define an exclusion

Console output

! Failed to start bundle org.apache.aries.jax.rs.whiteboard-2.0.1, exception activator error Bad type on operand stack
Exception Details:
  Location:
    org/apache/aries/jax/rs/whiteboard/activator/CxfJaxrsBundleActivator.<clinit>()V @56: invokestatic
  Reason:
    Type 'org/apache/cxf/jaxrs/impl/RuntimeDelegateImpl' (current frame, stack[0]) is not assignable to 'javax/ws/rs/ext/RuntimeDelegate'
  Current Frame:
    bci: @56
    flags: { }
    locals: { 'java/lang/Class', 'java/lang/Class' }
    stack: { 'org/apache/cxf/jaxrs/impl/RuntimeDelegateImpl' }
  Bytecode:
    0000000: 1273 b800 74b3 0008 1275 4ba7 0006 4c01
    0000010: 4b12 774c 2ac7 000a 2bb8 0078 a700 1205
    0000020: bd00 7959 032b 5359 042a 53b8 0062 b300
    0000030: 7abb 0005 59b7 0006 b800 07b1          
  Exception Handler Table:
    bci [8, 11] => handler: 14
  Stackmap Table:
    same_locals_1_stack_item_frame(@14,Object[#218])
    append_frame(@17,Object[#219])
    append_frame(@31,Object[#219])
    same_locals_1_stack_item_frame(@46,Object[#220])
 from: java.lang.Class:getDeclaredConstructors0#-2
org.osgi.framework.BundleException: Error starting module. osgi.identity; osgi.identity="org.apache.aries.jax.rs.whiteboard"; type="osgi.bundle"; version:Version="2.0.1" [id=30]
	at org.eclipse.osgi.container.Module.doStart(Module.java:614)
	at org.eclipse.osgi.container.Module.start(Module.java:468)
	at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:445)
	at aQute.launcher.Launcher.start(Launcher.java:687)
	at aQute.launcher.Launcher.startBundles(Launcher.java:667)
	at aQute.launcher.Launcher.activate(Launcher.java:573)
	at aQute.launcher.Launcher.launch(Launcher.java:403)
	at aQute.launcher.Launcher.run(Launcher.java:185)
	at aQute.launcher.Launcher.main(Launcher.java:161)
	at aQute.launcher.pre.EmbeddedLauncher.executeWithRunPath(EmbeddedLauncher.java:170)
	at aQute.launcher.pre.EmbeddedLauncher.findAndExecute(EmbeddedLauncher.java:135)
	at aQute.launcher.pre.EmbeddedLauncher.main(EmbeddedLauncher.java:52)
Caused by: java.lang.VerifyError: Bad type on operand stack
Exception Details:
  Location:
    org/apache/aries/jax/rs/whiteboard/activator/CxfJaxrsBundleActivator.<clinit>()V @56: invokestatic
  Reason:
    Type 'org/apache/cxf/jaxrs/impl/RuntimeDelegateImpl' (current frame, stack[0]) is not assignable to 'javax/ws/rs/ext/RuntimeDelegate'
  Current Frame:
    bci: @56
    flags: { }
    locals: { 'java/lang/Class', 'java/lang/Class' }
    stack: { 'org/apache/cxf/jaxrs/impl/RuntimeDelegateImpl' }
  Bytecode:
    0000000: 1273 b800 74b3 0008 1275 4ba7 0006 4c01
    0000010: 4b12 774c 2ac7 000a 2bb8 0078 a700 1205
    0000020: bd00 7959 032b 5359 042a 53b8 0062 b300
    0000030: 7abb 0005 59b7 0006 b800 07b1          
  Exception Handler Table:
    bci [8, 11] => handler: 14
  Stackmap Table:
    same_locals_1_stack_item_frame(@14,Object[#218])
    append_frame(@17,Object[#219])
    append_frame(@31,Object[#219])
    same_locals_1_stack_item_frame(@46,Object[#220])

	at java.base/java.lang.Class.getDeclaredConstructors0(Native Method)
	at java.base/java.lang.Class.privateGetDeclaredConstructors(Class.java:3137)
	at java.base/java.lang.Class.getConstructor0(Class.java:3342)
	at java.base/java.lang.Class.getConstructor(Class.java:2151)
	at org.eclipse.osgi.internal.framework.BundleContextImpl.loadBundleActivator(BundleContextImpl.java:797)
	at org.eclipse.osgi.internal.framework.BundleContextImpl.start(BundleContextImpl.java:749)
	at org.eclipse.osgi.internal.framework.EquinoxBundle.startWorker0(EquinoxBundle.java:1028)
	at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.startWorker(EquinoxBundle.java:371)
	at org.eclipse.osgi.container.Module.doStart(Module.java:605)
	... 11 more
____________________________
Welcome to Apache Felix Gogo

g! 11:45:19.882 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'demo.items'
11:45:20.148 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'mapdb.persist'
11:45:20.310 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'demo.sitemap'
11:45:20.406 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'demo.things'
@kaikreuzer
Copy link
Member

I cannot reproduce this issue - it starts nicely for me.

Are you sure that you have the latest code of main and that the resolve operation was successful? I cannot see any jakarta.ws.rs-api in the app.bndrun, so your workaround sounds a bit odd to me...

@wborn
Copy link
Member

wborn commented Nov 7, 2021

Haven't seen this issue either. Maybe it helps if you update your JDK to get fixes or wipe your Maven cache so the artifacts are redownloaded which may help incase the files on your disk got corrupt.

@AixNPanes
Copy link

AixNPanes commented Nov 8, 2021

I'm getting the same thing in my development environment (exactly as far as I can tell). I'm running MacOS Monterey 12.0.1, java zulu-16, eclipse 20210910-1417. The run continues and I can do some debug, but my UI is a blank screen. I get the stack traces in the console and a popup with the OSGI error.

@wborn
Copy link
Member

wborn commented Nov 8, 2021

java zulu-16

We only support running openHAB with Java 11 currently.

@AixNPanes
Copy link

My eclipse->Preferences->Java->Installed JREs specifies JRE for JavaSE-11 from the Zulu-16 library. That should be sufficient, shouldn't it? I'll see if I can force the Zulu 11 runtime.

@wborn
Copy link
Member

wborn commented Nov 9, 2021

That should be sufficient, shouldn't it?

It could still be that plugins like bnd don't work correctly with newer Java versions. I haven't tested that myself and would be surprised if it all worked flawlessly with these newer Java versions. 😉

@AixNPanes
Copy link

I've put the Java 11 home/bin in the eclipse.ini in the eclipse.ini in the openHAB folder. I've also placed the Java 11 home in /etc/profile and /etc/zprofile and rebooted. java --version shows:

% java --version
openjdk 11.0.12 2021-07-20 LTS
OpenJDK Runtime Environment Zulu11.50+19-CA (build 11.0.12+7-LTS)
OpenJDK 64-Bit Server VM Zulu11.50+19-CA (build 11.0.12+7-LTS, mixed mode)

I open the openHAB eclipse by clicking the eclipse.app in the openHAB folder. The problem persists. Do I need to recompile everything. I did the original install of openHAB while running java 16.

@wborn
Copy link
Member

wborn commented Nov 9, 2021

Recompilation might help if there are issues with newer Java versions.

Is your Mac using Intel or Apple (M1) silicon?

@AixNPanes
Copy link

Intel

@wborn
Copy link
Member

wborn commented Nov 10, 2021

The Intel Macs should be pretty well tested and supported. AFAIK @kaikreuzer has a similar setup.
I develop using an Intel CPU running Ubuntu 20.04 🐧 and Zulu 11.0.13 , so can't really test the Mac use case.

@openhab-bot
Copy link
Collaborator

This issue has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/main-ui-all-black/128675/3

@mvalla
Copy link

mvalla commented Nov 13, 2021

Same error on my env with Win10 and java 11.0.11 2021-04-20 LTS.
The workaround makes the error disappear, however several bundles added to the dev environment are not loaded, making the development environment unusable.

@dalgwen
Copy link
Contributor

dalgwen commented Nov 13, 2021

Exact same issue (same log, same empty screen (but a white one !?)), with a totally new development environnement. Two attempts :

  • Win 10 and jdk 11.0.2
  • Win 10 and openjdk (zulu build) 11.0.8
    Both tests with a full rebuild of all projects.

The workaround works for me.

@AixNPanes
Copy link

I've rebuilt everything with Zulu-11 (11.0.12). I get the same problem.

@chingon007
Copy link

Same issue for me. I just realized that I created the same issue here as I am not aware that it is most likely the same thing. I just encounter a white screen.
Has anyone tried to back in the repo commits to see what is the latest version which is working in order to find out what is causing the problem?

@chingon007

This comment has been minimized.

@chingon007
Copy link

I cannot reproduce this issue - it starts nicely for me.

Are you sure that you have the latest code of main and that the resolve operation was successful? I cannot see any jakarta.ws.rs-api in the app.bndrun, so your workaround sounds a bit odd to me...

In the original app.bndrun the entry jakarta.ws.rs-api;version='[2.1.6,2.1.7)',\ is not included. It appears in the file as soon as you hit Resolve and Update in Eclipse.
So the question is, where does it come from and why is it appearing?

@AixNPanes
Copy link

chingon007, what workaround? Did you mean not clicking Resolve?

@chingon007
Copy link

Hello,
as stated above at the beginning of the issue:

Open the source of app.bndrun and remove the line: jakarta.ws.rs-api;version='[2.1.6,2.1.7)',\

However I just works for me by getting the environment running again, but including bundles is not working though with this workaround

@AixNPanes
Copy link

Removing that line fixed it for me. Thanks!

@mvalla
Copy link

mvalla commented Nov 17, 2021

@AixNPanes are you able to add some binding / bundles to the run configuration? is it activated ?

@chingon007
Copy link

I was not able to get it running with a binding. Is there nobody who can tell how to fix the whole thing? Seems to be a valid bug.

@AixNPanes
Copy link

I am able to get it running.

@chingon007
Copy link

@AixNPanes Can you describe a bit more in detail your environment. As mentioned by @mvalla and me, both of us get the environment running, however due to the failure (at least I guess so) we cannot hock up some bindings, which is at least my goal in order to continue with my binding development.

@frederictobiasc
Copy link
Author

Binding development works for me. For instance, I'm adding the Modbus binding and applying the described workaround in comment #1. From there, everything works as expected.

@chingon007
Copy link

Do you have the a lot of errors in the console after you removed the dependency? I have a lot of errors in the console as mentioned above.

@frederictobiasc
Copy link
Author

frederictobiasc commented Nov 18, 2021

I don't get any errors in the console. Maybe your resolve even adds more bad dependencies. You could follow the same approach as I did to identify:

  1. Checkout the latest main of openhab-distro
  2. Open launch/app/app.bndrun
  3. Click "Resolve" and "Update"
  4. Compare the introduced changes to launch/app/app.bndrun and try to alter them manually.

@chingon007
Copy link

Ok, thx I will try that and give feedback.

@dbadia
Copy link

dbadia commented Nov 19, 2021

Ok, just did a fresh eclipse install to continue my zwave S2 work, I'm having the same error and black screen. Win10 and java 11 - I've tried a couple of java builds - amazon corrento, openjdk, etc.

I can't tell if the workaround is causing problems for my binding development. Dumb quetsion.. the binding UI looks different in this build: there's no search or + button Screenshot

Does that mean no bindings are currently installed/being seen? I added the modbus binding since someone said that one is showing up with the workaround in place

@AixNPanes
Copy link

So far I think I have it working on MacOS Monterey/Zulu-11, Windows 11/Zulu-11 on an Intel NUC. I'm trying now on Fedora 34/java-11-openjdk on a RaspberryPi 4B+. So far, I have avoided clicking the Resolve button and everyting works fine at least on the first 2. I'll update with a detailed procedure after I finish the RPI. I have Buster installed on a RPI 3B+ but obviously I won't try an install there as that's not a 64-bit install and I only have 1GB memory on that system.

@chingon007
Copy link

I don't get any errors in the console. Maybe your resolve even adds more bad dependencies. You could follow the same approach as I did to identify:

  1. Checkout the latest main of openhab-distro
  2. Open launch/app/app.bndrun
  3. Click "Resolve" and "Update"
  4. Compare the introduced changes to launch/app/app.bndrun and try to alter them manually.

After I once reinstalled it from scratch, it works for me with the workaround. I did the exact same steps as you did. Then deleted the entry manually out of the app.bndrun.

I am not not receiving errors in the console and now I am able also deploy my binding. Just a small hint for the others. On the first startup my binding did not appear.
I closed the complete eclipse environment and open it again. Then I run again, then my binding appeared. I am not sure if is related, but this is how I got it working now.

@AixNPanes
Copy link

Sorry, I forgot. Can't do RPi with the normal install as it takes a downloaded version of Eclipse. With RPi you have to compile Eclipse.

@AixNPanes
Copy link

Here's a detailed procedure I developed while running on Windows 11. I've used the same procedure on MacOS with the differences noted that I can remember. Similar results should be obtainable on Intel-based Linux. If you have trouble with the install, try switching Java to Zulu-11 and see if that helps.

  1. Reference https://www.openhab.org/docs/developer/
  2. Make sure you have Java version 11 installed (I recommend Zulu 11 from Azur.zom) and in your path
  3. Make sure you have Maven 3.x installed and in your path
  4. Start Eclipse installer
  5. Note steps 3) through 4) do not happen on MacOS Monterey
  6. Click 3 bars in upper right corner of Eclipse installer
  7. Click Advanced Mode
  8. Click Eclipse IDE for Java Developers
  9. Click Next
  10. If necessary, click arrow next to GitHub projects to see project list
  11. If necessary, click arrow next to openHAB projects to see project list
  12. Select openHAB Development and openHAB Add-ons
  13. Click Next
  14. If desired, update installation folder name. This will be the openhab home and will normally be in the user's home folder.
  15. Click Next
  16. Click Finish
  17. Wait until installation completes and click Finish
  18. Read what every you wish from the Welcome window and then close the welcome window by clicking the X next to the Welcome tab.
  19. Wait for the project to complete its update if it hasn't by checking the status in the bottom right border of the Eclipse window to the left of the light bulb.
  20. Open a command prompt on Windows or terminal on MacOS
  21. Change the working dir to the the bundles folder in the openhab home.
    1. For windows, cd to the openhab home, then cd git\openhab-addons\bundles
    2. For MacOS, cd to the openhab home, then cd git/openhab-addons/bundles
  22. Initialize a new binding.
    1. On MacOS, enter the command ./create_openhab_binding_skeleton.sh ""
    2. On Windows, enter the command create_openhab_binding_skeleton.cmd ""
    3. I would use all lower case for the binding name as the project will be org.openhab.binding. and will conform to other names. Unfortunately, it also forms the prefix to the class names, so you'll want to rename the generated classes to camel-case to conform to Java conventions.
    4. Use your name for
    5. Use your GitHub username for
  23. Enter Y when prompted
  24. In the Eclipse UI, click File->Import
  25. Select Maven->Existing Maven Projects
  26. Click Next
  27. Click Browse in the upper right
  28. This will open a Finder/File Explorer with openhab-main/ws as the current directory. Click openhab-main to move up a folder, then open git, then openhab-addons, then bundles, and then select org.openhab.binding. and click Select Folder
  29. Click Finish
  30. Wait for the import to finish by watching the status in the bottom right border of the Eclipse window
  31. In the Eclipse Project Explorer (left pane) open Infrastructure/Launch/App, also open Infrastructure/org.openhab.demo.app
  32. Notice that in each structure there is an app.bndrun entry. In my case, if I use the entry in the Launch structure I get errors at launch, if I use org.openhab.demo.app I do not get errors.
  33. Double-click the app.bndrun entry to open an app tab in the main pane.
  34. Click Debug OSGi in the upper right of the app pane.
  35. On Windows, you may get a popup indicating a need to configure the Firewall. For local testing you should be able to ignore firewall changes.
  36. Open a browser and enter the URL localhost:8080, you should get a screen inviting you to enter the administrator account credentials.
  37. Complete the setup on the Web GUI.
  38. Go back to Eclipse Project explorer and close the Infrastructure expansion.
  39. Expand OH Add-ons, org.openhab.binding., src/main/java, org.openhab.binding..internal
  40. In turn, rename the classes BindingConstants.java, Configuration.java, Handler.java, HandlerFactory.java
    1. Right click on the name in Project Explorer
    2. Select Refactor->Rename
    3. Change the name to proper camel-case, for example mybindingConstants to MyBindingConstants
    4. Click Finish
  41. Right-click on org.openhab.binding. and select Maven->Update Project, make sure org.openhab.binding. is check and click OK
  42. Wait for updating to finish by checking the status in the lower right.
  43. In the app tab in the main pane, select the + sign to the right of the Run Requirements, scroll to the bottom of the left pane of the popup and select org.openhab.binding. and then Add --> between the panes and then click Finish
  44. Repeat with Run Bundles.
  45. Save app with command-s on MacOS or ctrl-s on Windows, or select File->Save. The * in the app tab should disappear when the save is complete
  46. In the Project Explorer double-click the renamed Handler.java file
  47. Find the createHandler method (about line 46)
  48. In the next line, set a breakpoint by double-clicking the pane border to the left of the line number. You should get a blue dot indicating a breakpoint. (You can reset the breakpoint later by double-clicking again)
  49. Open the console tab in the bottom pane. If there is a red square in the upper border of this pane, that means that the app is running. If it is, click the red square to stop it.
  50. Open the app tab in the main pane and click Debug OSGi.
    1. If you don't get an invitation to switch to debug perspective, stop the app by clicking the red square and click Debug OSGi again.
  51. Enable the switch to debug perspective
  52. You should get a switch in perspective. this indicates that you are now debugging the new binding.

@mvalla
Copy link

mvalla commented Nov 20, 2021

I did a fresh install of the IDE on a brand new Win10 computer:

  • installed latest Oracle Java 11, Git, MVN from scratch
  • followed instructions on the OH developer page, waited all tasks in Eclipse to complete
  • in the Eclipse Project Explorer (left pane) opened Infrastructure/org.openhab.demo.app
  • opened app.bndrun and clicked Debug OSGi --> openHAB started correctly with no errors and I could access Main UI correctly
  • stopped openHAB, edited pom.xml under Infrastructure/org.openhab.demo.app and added dependency to hue binding as suggested in the OH dev guide
  • opened app.bndrun searched hue under Browse Repos and added it to the right list, then saved
  • clicked Resolve and saw result windows, closed it and saved app.bndrun again
  • clicked Debug OSGi--> the following error popup now appeared
    error
  • in the Eclipse console, the error already reported at the beginning of the issue appeared:
! Failed to start bundle org.apache.aries.jax.rs.whiteboard-2.0.1, exception activator error Bad type on operand stack
Exception Details:
  Location:
    org/apache/aries/jax/rs/whiteboard/activator/CxfJaxrsBundleActivator.<clinit>()V @56: invokestatic
  Reason:
    Type 'org/apache/cxf/jaxrs/impl/RuntimeDelegateImpl' (current frame, stack[0]) is not assignable to 'javax/ws/rs/ext/RuntimeDelegate'
  Current Frame:
    bci: @56
    flags: { }
    locals: { 'java/lang/Class', 'java/lang/Class' }
    stack: { 'org/apache/cxf/jaxrs/impl/RuntimeDelegateImpl' }
[.....]
  • now if I open Main UI I get only a blank screen (black in my case since t the first run I activated black mode): so elements in the UI are not working anymore.

This (repeatable) test shows that the current OH Eclipse IDE dev env for Win10 is broken, starting from a fresh install without any changes/customizations from the developer.

It should be noted that the console shows a problem starting bundle org.apache.aries.jax.rs.whiteboard-2.0.1, and that one of the latest commit from @wborn on openhab-distro is 31fbf28 and is related to org.apache.aries.jax.rs.whiteboard dependency.

@wborn, @kai can you test a fresh install and reproduce the problem?
Can the dependecy for bundle org.apache.aries.jax.rs.whiteboard-2.0.1 be checked and maybe rolled back?

@AixNPanes
Copy link

I thought I'd try a test as @mvalla is requesting of others. I took the build I detailed above with no other changes other than restarting Eclipse. I clicked Resolve and got the following errors in the Resolve popup:

Resolution failed. Capabilities satisfying the following requirements could not be found:
[<>]
⇒ osgi.identity: (osgi.identity=org.openhab.binding.x)
[org.apache.karaf.kar.core version=4.3.3]
⇒ osgi.service: (objectClass=org.apache.karaf.features.FeaturesService)

@chingon007
Copy link

I did a fresh install of the IDE on a brand new Win10 computer:

  • installed latest Oracle Java 11, Git, MVN from scratch
  • followed instructions on the OH developer page, waited all tasks in Eclipse to complete
  • in the Eclipse Project Explorer (left pane) opened Infrastructure/org.openhab.demo.app
  • opened app.bndrun and clicked Debug OSGi --> openHAB started correctly with no errors and I could access Main UI correctly
  • stopped openHAB, edited pom.xml under Infrastructure/org.openhab.demo.app and added dependency to hue binding as suggested in the OH dev guide
  • opened app.bndrun searched hue under Browse Repos and added it to the right list, then saved
  • clicked Resolve and saw result windows, closed it and saved app.bndrun again
  • clicked Debug OSGi--> the following error popup now appeared
    error
  • in the Eclipse console, the error already reported at the beginning of the issue appeared:
! Failed to start bundle org.apache.aries.jax.rs.whiteboard-2.0.1, exception activator error Bad type on operand stack
Exception Details:
  Location:
    org/apache/aries/jax/rs/whiteboard/activator/CxfJaxrsBundleActivator.<clinit>()V @56: invokestatic
  Reason:
    Type 'org/apache/cxf/jaxrs/impl/RuntimeDelegateImpl' (current frame, stack[0]) is not assignable to 'javax/ws/rs/ext/RuntimeDelegate'
  Current Frame:
    bci: @56
    flags: { }
    locals: { 'java/lang/Class', 'java/lang/Class' }
    stack: { 'org/apache/cxf/jaxrs/impl/RuntimeDelegateImpl' }
[.....]
  • now if I open Main UI I get only a blank screen (black in my case since t the first run I activated black mode): so elements in the UI are not working anymore.

This (repeatable) test shows that the current OH Eclipse IDE dev env for Win10 is broken, starting from a fresh install without any changes/customizations from the developer.

It should be noted that the console shows a problem starting bundle org.apache.aries.jax.rs.whiteboard-2.0.1, and that one of the latest commit from @wborn on openhab-distro is 31fbf28 and is related to org.apache.aries.jax.rs.whiteboard dependency.

@wborn, @kai can you test a fresh install and reproduce the problem? Can the dependecy for bundle org.apache.aries.jax.rs.whiteboard-2.0.1 be checked and maybe rolled back?

As said, I did the exact same thing and can also reproduce the problem on Windows 11 with Java 11

@mvalla
Copy link

mvalla commented Nov 21, 2021

I can confirm that on a fresh install (Win10, Java 11), using latest opeanhab-distro main, if each time after clicking Resolve in app.bndrun the following line is removed:
jakarta.ws.rs-api;version='[2.1.6,2.1.7)',\
then after launching Debug, OH3 starts correctly in Eclipse and other selected bundles are also loaded correctly.
So the bug in the resolution remains, but at least the workaround works for now.

@wborn
Copy link
Member

wborn commented Dec 10, 2021

@wborn, @kai can you test a fresh install and reproduce the problem? Can the dependecy for bundle org.apache.aries.jax.rs.whiteboard-2.0.1 be checked and maybe rolled back?

I've rolled the Whiteboard upgrade of #1325 back with #1342.
So after it is merged, maybe everybody can check if it fixes the issue in Eclipse?

@mherwege
Copy link
Contributor

@wborn I upgraded my Eclipse install to the latest version and updated my add-on development environment. I did not do a reinstall. But I still run into this same issue. I could not run my binding from Eclipse (had the same error as shown above) without the workaround from @mvalla.
As indicated, I did not do a re-install. Could the newer version still be used from a cache? If not, it must be something else.

@chingon007
Copy link

chingon007 commented Jan 7, 2022

Hello, I did a complete reinstall today. Seems not to work. Getting still a white screen afterwards. Some other errors are thrown in the console:
image
@wborn

@mvalla
Copy link

mvalla commented Jan 7, 2022

Hello, I did a complete reinstall today. Seems not to work. Getting still a white screen afterwards. Some other errors are thrown in the console

this seems to be another problem, as the bundle that does not start is now org.openhab.core.addon.marketplace.

@chingon007 : can you get around it by removing the following line from app.bndrun ?
jakarta.ws.rs-api;version='[2.1.6,2.1.7)',\

@chingon007
Copy link

chingon007 commented Jan 7, 2022

I played with it and yes that's another issue. However I receive the same error as mentioned above and I am also able to start again by applying the workaround removing the mentioned line. Therefore I think @wborn that your last commit did not lead to the expected success or am I wrong?

@wborn
Copy link
Member

wborn commented Jan 8, 2022

@chingon007 this is another issue, see openhab/openhab-core#2673.
It seems to have been introduced by openhab/openhab-core#2592.

@kgoderis
Copy link
Contributor

kgoderis commented Jan 8, 2022

I have the same issue over here after a fresh install

Darwin Karels-M1-MacBook-Pro.local 21.2.0 Darwin Kernel Version 21.2.0: Sun Nov 28 20:28:41 PST 2021; root:xnu-8019.61.5~1/RELEASE_ARM64_T6000 arm64

openjdk 11.0.13 2021-10-19 LTS [This is x86 via Rosetta, but problem prevails with an arm64 JVM]
OpenJDK Runtime Environment Zulu11.52+13-CA (build 11.0.13+8-LTS)
OpenJDK 64-Bit Server VM Zulu11.52+13-CA (build 11.0.13+8-LTS, mixed mode)

@giamma
Copy link

giamma commented Jan 22, 2022

Same issue for me on MacOS Monterey with Java 11.

The offending jakarta.ws.rs jar comes as a transitive dependency of CXF

immagine

A nicer workaround is to define an exclusion in the maven dependencies:

    <dependency>
      <groupId>org.openhab.core.bom</groupId>
      <artifactId>org.openhab.core.bom.runtime</artifactId>
      <version>${project.version}</version>
      <type>pom</type>
      <scope>runtime</scope>
      <exclusions>
      	<exclusion>
      		<groupId>jakarta.ws.rs</groupId>
      		<artifactId>jakarta.ws.rs-api</artifactId>
      	</exclusion>
      </exclusions>
    </dependency>

@frederictobiasc
Copy link
Author

The issue is still present and my workaround still works.

wborn added a commit to wborn/openhab-distro that referenced this issue Mar 13, 2022
* Upgrade bnd to 6.2.0 as well as the other Maven plugins to the latest version
* Blacklist jakarta.ws.rs-api to prevent openhab#1327

See also: openhab/openhab-core#2836

Signed-off-by: Wouter Born <github@maindrain.net>
kaikreuzer pushed a commit that referenced this issue Mar 13, 2022
)

* Upgrade bnd to 6.2.0 as well as the other Maven plugins to the latest version
* Blacklist jakarta.ws.rs-api to prevent #1327

See also: openhab/openhab-core#2836

Signed-off-by: Wouter Born <github@maindrain.net>
@wborn
Copy link
Member

wborn commented Mar 13, 2022

The jakarta.ws.rs-api bundle should no longer be resolved now as it is blacklisted with the changes in #1379.
Can you check if that resolves this issue?

@mvalla
Copy link

mvalla commented Mar 13, 2022

correct, with the latest update the package jakarta.ws.rs-api is not resolved and now OH can be started with no error and selected bundles are also started correctly.
The workaround is not needed anymore.

@wborn wborn closed this as completed Mar 16, 2022
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