Replace bundle with custom version for real world testing

How to replace a bundle (eg. org.eclipse.smarthome.transform.javascript*.jar) with a custom version in a working (“production”) openhab2 installation?

Kind regards

First, uninstall the production version. If it was manually added to addons.cfg, it will need to be removed from there. If not, uninstall through a UI or Karaf. Then copy the jar file into the /addons/ directory. The location of addons depends on the OH installation method, and can be found in the documentation.

Once copied into addons, it is best to keep the file name consistent when upgrading, or the older version may get cached, requiring the older bundle to be uninstalled through Karaf, or by clearing the cache.

Manually installed bundles are unmanaged, so they will not be shown as installed when looking at a UI, but you’ll see them in Karaf. Also, if the bundle has dependencies, they will not be installed for you. For example, the zwave binding requires the openhab-transport-serial feature, which needs to be manually installed if the binding is manually installed.

Thanks for your describtion. But i’m not able to get it work.

Uninstall of JavaScript Transformation by PaperUI

2019-01-03 16:26:17.950 [DEBUG] [lipse.smarthome.transform.javascript] - ServiceEvent UNREGISTERING - {org.eclipse.smarthome.core.thing.profiles.ProfileFactory, org.eclipse.smarthome.core.thing.profiles.ProfileTypeProvider}={,, service.bundleid=191, service.scope=bundle,,} - org.eclipse.smarthome.transform.javascript
2019-01-03 16:26:17.962 [DEBUG] [lipse.smarthome.transform.javascript] - ServiceEvent UNREGISTERING - {org.eclipse.smarthome.core.thing.profiles.ProfileFactory, org.eclipse.smarthome.core.thing.profiles.ProfileTypeProvider}={,, service.bundleid=228, service.scope=bundle,,} - org.eclipse.smarthome.transform.javascript
2019-01-03 16:26:17.966 [DEBUG] [lipse.smarthome.transform.javascript] - ServiceEvent UNREGISTERING - {org.eclipse.smarthome.core.transform.TransformationService}={, service.bundleid=228, service.scope=bundle, smarthome.transform=JS,,} - org.eclipse.smarthome.transform.javascript
2019-01-03 16:26:17.970 [DEBUG] [lipse.smarthome.transform.javascript] - BundleEvent STOPPING - org.eclipse.smarthome.transform.javascript
2019-01-03 16:26:17.975 [DEBUG] [lipse.smarthome.transform.javascript] - BundleEvent STOPPED - org.eclipse.smarthome.transform.javascript
2019-01-03 16:26:17.979 [DEBUG] [lipse.smarthome.transform.javascript] - BundleEvent UNRESOLVED - org.eclipse.smarthome.transform.javascript
2019-01-03 16:26:17.989 [DEBUG] [lipse.smarthome.transform.javascript] - BundleEvent UNINSTALLED - org.eclipse.smarthome.transform.javascript
2019-01-03 16:26:18.189 [INFO ] [core.karaf.internal.FeatureInstaller] - Uninstalled 'openhab-transformation-javascript'

Copy jar into addons folder.
Content of /usr/share/openhab2/addons

-rw-r--r--. 1 openhab openhab 182006216 17. Dez 02:25 openhab-addons-2.4.0.kar
-rwxr--r--. 1 openhab openhab     15426  3. Jan 16:01 org.eclipse.smarthome.transform.javascript-0.11.0-SNAPSHOT.jar
-rw-r--r--. 1 openhab openhab        70 17. Dez 09:02 README

Install of JavaScript Transformation by PaperUI

2019-01-03 16:28:41.408 [DEBUG] [lipse.smarthome.transform.javascript] - BundleEvent INSTALLED - org.eclipse.smarthome.transform.javascript
2019-01-03 16:28:41.797 [DEBUG] [lipse.smarthome.transform.javascript] - BundleEvent RESOLVED - org.eclipse.smarthome.transform.javascript
2019-01-03 16:28:42.629 [DEBUG] [lipse.smarthome.transform.javascript] - BundleEvent STARTING - org.eclipse.smarthome.transform.javascript
2019-01-03 16:28:42.675 [DEBUG] [lipse.smarthome.transform.javascript] - ServiceEvent REGISTERED - {org.eclipse.smarthome.core.thing.profiles.ProfileFactory, org.eclipse.smarthome.core.thing.profiles.ProfileTypeProvider}={,, service.bundleid=191, service.scope=bundle,,} - org.eclipse.smarthome.transform.javascript
2019-01-03 16:28:42.682 [DEBUG] [lipse.smarthome.transform.javascript] - ServiceEvent REGISTERED - {org.eclipse.smarthome.core.transform.TransformationService}={, service.bundleid=249, service.scope=bundle, smarthome.transform=JS,,} - org.eclipse.smarthome.transform.javascript
2019-01-03 16:28:42.700 [DEBUG] [lipse.smarthome.transform.javascript] - ServiceEvent REGISTERED - {org.eclipse.smarthome.core.thing.profiles.ProfileFactory, org.eclipse.smarthome.core.thing.profiles.ProfileTypeProvider}={,, service.bundleid=249, service.scope=bundle,,} - org.eclipse.smarthome.transform.javascript
2019-01-03 16:28:42.703 [DEBUG] [lipse.smarthome.transform.javascript] - BundleEvent STARTED - org.eclipse.smarthome.transform.javascript

After that command bundle:list shows that the old and new bundle has been installed. ???

250 │ Waiting  │  80 │    │ Eclipse SmartHome JavaScript Transformation Service
251 │ Active   │  75 │ 0.10.0.oh240           │ Eclipse SmartHome JavaScript Transformation Service

What did a miss?

Kind regards

Any jar added to addons will auto install. If you also install through a UI, it will install the packaged version too (don’t do that).