Broken following update!

Hi folks,
I have just tried to update from 3.x to 5.x on Windows 10. I took the precaution of making a copy of the OH folder structure (C:\openhab) before I started. I also updated to Java 21 as per the instructions. I then followed the update.ps1 and then update instructions. Lots of notes/warnings, but it completed fine. However the updated OH will not start! No messages on screen - just another command prompt. Nothing that I can see in the Event Viewer either.

To try and get back working again, I renamed the folder where 5.x was installed (to “openhab-new”) and renamed my backup to “openhab” in the hope that everything would then be back as it was before on 3.x - but that’s not starting either, so now I am in panic mode!

If renaming the “old folder” back should have got me back to a working 3.x system then I can only assume that the issue lies somewhere around the Java update (as 3.x will now be running with Java 21).

I’d love to get OH running version 5.x but, right now, I’d really appreciate some pointers to getting something (anything!) working!

Thank you!!!

I think you need to go in steps, not directly from 3.x to 5.0.

Just renaming the folder won’t work as by now you also have java21 installed and openHAB3 is not java21 compatible.

It should not be needed to do an interim step. But it is a big step I must say, so I would suggest to take it bit by bit.

There are multiple upgrade paths possible. It depends on the size of your setup, used bindings and if you used managed or file based configuration.

First I would want to make sure a fresh openHAB 5.0 starts as expected. Can be in a different location. Just to make sure it starts.

If that is confirmed you could either place config files from your backup to the new oh instance, start from scratch or redo all the upgrade again.

Just make sure you have one untouched copy of the original 3.x somewhere elsewhere. As ‘snapshot’ to return to

My first guess on your issue is Java environment is not properly configured after you did Java upgrade.

verify that your java path and environment settings are correct for the version of OH you are trying to run

Java 11 for OH3. and Java 21 for OH5 if you upgraded Java the upgrade may not have updated all of the java variables fully/correctly. Most times when you install a new version of Java on windows it does not remove the older version it just installs a new version in a different subfolder and sometimes prepends the path to the new version at the end of the path statement which if the older version was still installed and path variable is earlier in the path statement it will not behave correctly.

Other thing is if you had installed OH as a windows service you may also have to repeat the steps to configure the service again.

But as others have said you can extract a copy of any version of OH to pretty much any folder and as long as you have the correct supported version of java and the environment setup to correctly point to that version of java OH will run just fine.

obviously without any logs or error messages being shared to provide more clues all we can do is give you best guess guidance.

Refer back to setup instructions for windows from the beginning and just use a different folder location for your test OH extraction maybe C:\openhabtest as an example and then maybe provide some logs or screen shots of your configuration if you still have issues.

Thank you for the support gentlemen!

I now have OH3 running properly again. I had not realised that Java was not backwards compatible and that OH3 would have to have Java 11. I removed Java 21 (for now), reinstalled Java 11 and made sure the Path and Environment Variables were set correctly.

Then a reboot with bated breath - and the OpenHAB Windows service started and everything is back to normal.

So, thank you all for the help - I can now take my time and gradually move towards OH5.

:grinning_face_with_smiling_eyes: