jwiseman
(Mr. Wiseman (OH 4.2 Snapshot on Pi4))
July 30, 2019, 2:12pm
1
I’m running OH 2.4 and need to upgrade my com.google.gson from 2.7.x to 2.8.x.
I tried dropping it in the Add-On’s folder with the same result; both installed. I tried to install it with this syntax with the same result; both installed.
bundle:install http://central.maven.org/maven2/com/google/code/gson/gson/2.8.5/gson-2.8.5.jar
The newer version is needed for the DarkSky Binding. I have them both running but I’m seeing weirdness now.
Is there a way to manually replace com.google.gson JAR? Where is it located?
openhab> bundle:list -s | grep gson
21 │ Active │ 80 │ 2.7.0.v20170129-0911 │ com.google.gson
268 │ Resolved │ 80 │ 2.8.5 │ com.google.gson
Best, Jay
jwiseman
(Mr. Wiseman (OH 4.2 Snapshot on Pi4))
July 30, 2019, 4:44pm
3
KidSquid:
can’t you
This will work but it won’t survive a cleanup of \cache and \tmp directories since the new gson 2.8.x file resides in one of them.
Looking for a more of a permanent placement if all possible?
Best, Jay
KidSquid
(The Squid)
July 30, 2019, 4:53pm
4
could you not place it in the addon folder for persistence?
jwiseman
(Mr. Wiseman (OH 4.2 Snapshot on Pi4))
July 30, 2019, 5:00pm
5
KidSquid:
place it in the addon
I tried to place it in the addon folder but it did NOT load for some reason.
Best, Jay
jwiseman
(Mr. Wiseman (OH 4.2 Snapshot on Pi4))
July 30, 2019, 5:23pm
6
jwiseman:
place it in the addon
Hey @KidSquid - Thank you very much!
I decided to use your logic to see if it would work step by step and it did.
Stopped/Removed gson 2.8.x version
Dropped gson 2.8.x version into AddOn’s
Stopped/Removed 2.7.x version
openhab> bundle:list -s | grep gson
269 │ Active │ 80 │ 2.8.5 │ com.google.gson
This will survive a reboot and hopefully it will load properly during a \cache and \tmp cleanup the next time I do it.
Best, Jay
KidSquid
(The Squid)
July 30, 2019, 7:23pm
7
Awesome…glad to hear it worked…if you get a sec, mark it solved so it will be easy for others to find.
Squid
1 Like
jwiseman
(Mr. Wiseman (OH 4.2 Snapshot on Pi4))
July 31, 2019, 4:02pm
8
Well I blew away \cache and \tmp this morning and did a clean restart and both are online again.
Based on the low object number of the older one; that 2.7.x version must be needed for the core of OH 2.4 is my only guess.
Oh well, we tried . . .
openhab> list -s | grep gson
21 │ Active │ 80 │ 2.7.0.v20170129-0911 │ com.google.gson
209 │ Active │ 80 │ 2.8.5 │ com.google.gson
Best, Jay