Initialization problem with openHAB 2.2 Build 1017 on Windows 10

I have made a fresh install of the latest Build of openHAB 2.2. After the start the Karaf console shows the following message:

Error in initialization script: E:\openhab-2.2.0-SNAPSHOT\userdata\openhab-2.2.0-SNAPSHOTuserdataetc\shell.init.script: E:\openhab-2.2.0-SNAPSHOT\userdata\openhab-2.2.0-SNAPSHOTuserdataetc\shell.init.script

It seems that a backslash is missing somewhere. Any idea where this could be fixed?

BTW: which would be the correct GitHub repo to report this problem?

confirmed. I experience the same error.

I am trying to identify the root cause also.

I don’t get it…
OH2 seems to be running ok even with this error and the shell.init.script seems to be already loaded.
The console reports:

Error in initialization script: C:\openHAB2\userdata\openHAB2userdataetc\shell.init.script: C:\openHAB2\userdata\openHAB2userdataetc\shell.init.script
openhab> system:property |grep -i shell.init.script\openHAB2\userdata\etc/shell.init.script
openhab> system:property |grep -i karaf.etc
openhab> source etc/shell.init.script

something is causing the directory name and the userdata dir to be re-introduced in the path (without slashes)

still looking into the startup scripts to see where this is coming from…

Maybe it is caused by the mixed slash type in the script path. Even on Windows it is normally better to use forward slashes in Java because you don’t have to care about escaping backslashes.
Here we have two different types in the same path definition.

mixed slashes work ok in windows. I had the same in the windows service installation (wrapper) config and there was no problem.

something else is wrong… something is adding “openHAB2userdata” in the path after “C:\openHAB2\userdata” (and before: “etc\shell.init.script”)
it looks like the karaf_etc variable is not set correctly somewhere… I still haven’t found it :frowning:

openhab> shell:source c:\openhab2\userdata\etc\shell.init.script
Error executing command: java.lang.NullPointerException
openhab> shell:source c:/openhab2/userdata/etc/shell.init.script

karaf on windows likes the forward slashes better :slight_smile:

Yes I know. My idea was that maybe Karaf gets “confused” by the different slash types.

If it helps tracking down the issue, I saw this when I went from build 1001 to build 1010.

If it helps, I saw this on Windows 8.1 when I went from build 1003 to 1018 today, so seems still to be unfixed…

I have the same problem and maybe one more
Does openHAB 2.2.0 snapshot build 1017 require a new Java VM ? I used openHAB 1 on the same Windows homeserver 2011 (based on Windows server 2008) for years without problems. Now I get a few errors from karaf.

I am migrating my installation with astro1,exec1,http1,network, plugwise,rfxcom and zwave to openHAB2.
I hope someone has a tip to help me proceed beyond this point.


you just need to go install the JDK to get rid of that warning. I updated to #1029 today and see this error too… my system seems fairly unusable though I’m not sure this is related.

There are no Items in paperUI, log:tail does nothing. is this on anyone’s radar to fix?

I did a fresh install of build #1029 on Windows 10 and apart from the Karaf error message, everything seems to work at first glance.
I am using Java 8 Build 144.

@Kai I am not sure whether these messages are a Karaf or ESH/openHAB problem and where to report it. What would you say?

I am not sure either. To find it out, it would be nice if you could try to start a plain Karaf 4.1.2 and see if it has the same issue.

I downloaded Karaf 4.1.2 and started it without seeing the issue.

Karaf 4.1.2 works fine. I have created an issue in the openHAB Distro repo:

Not sure if it is related as I am running in a docker on an Ubuntu machine (not Windows), but I had exactly the same error running any build after 1024. The error seems to be related to an update in JLine and its corresponding interaction with the terminal I think.

To get openHAB to work properly, I had to specifically add a -t flag in the docker run command (which allocates a pseudo tty terminal).

I think this is a different problem and probably docker related. Starting the latest openHAB on Ubuntu Linux does not give any error messages.

Yes, that is quite possible/probable. It is odd though that the error is exactly the same and in the same file, hence partly why I think it may be jline related rather than karaf.

S1031 on a x64 Win10 with latest Oracle’s JVM has the same issue:
didn’t have time to dig deeper to see what could be the root cause

I made a diff between the original karaf.bat and karaf.bat delivered with openHAB. There are several differences and maybe there was a change in the original karaf.bat that was not taken into account in the openHAB karaf.bat.

1 Like

Having the same error. I switched from Build 982 to 1039.