[SOLVED] OpenHAB Cloud 2.5 activate method exception

Hello and happy new year to all !

I have an issue, i migrate my openhab install to a fresh debian 10 installation, everything works fine except openhabcloud. My previous install was already in 2.5 but with openjdk, now i’m using zulu as recommended.
I try to remove the cloud addon, secret and uuid, clear the cache, reinstall but nothing.

The error log is about activate method string index out of range:

2020-01-02 16:32:15.368 [ERROR] [org.openhab.io.openhabcloud         ] - bundle 
org.openhab.io.openhabcloud: (262) 
Service(264)] : The activate method has thrown an exception
java.lang.StringIndexOutOfBoundsException: String index out of range: 2
    at java.lang.StringLatin1.charAt(StringLatin1.java:44) ~[?:?]
    at java.lang.String.charAt(String.java:692) ~[?:?]
    at org.openhab.io.openhabcloud.internal.CloudService.activate(CloudService.java:154) ~[?:?] 

Thanks a lot for your help

What is the java version?

Also post what is inside:

or depending on your system


Here is the java version

openjdk version "10" 2018-03-20
OpenJDK Runtime Environment Zulu10.1+11 (build 10+46)
OpenJDK 64-Bit Server VM Zulu10.1+11 (build 10+46, mixed mode)

And here the /opt/openhab2/userdata/config/org/openhab/openhabcloud.config


Need to change to Java version 8 as OH does not yet support other versions.

oups you are right
when installing zulu i choose the last one … not the version 8
will install the good version and retry

I would also restart OH (may need to clean cache as well, but only once) a few times if you continue to see the error. Took me 3 restarts for OH to load and run correctly.

No more errors, works like a charm !!
Thanks a lot @H102

1 Like

@Johan_Thomas: Glad to help.:smiley:

Please click square box on solution post to mark topic as solved.