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
Thomas

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.

@5iver
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.id=389, TransformationService.target=(smarthome.transform=JS), service.bundleid=191, service.scope=bundle, component.name=org.eclipse.smarthome.transform.javascript.internal.profiles.JavascriptTransformationProfileFactory, component.id=47} - 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.id=390, TransformationService.target=(smarthome.transform=JS), service.bundleid=228, service.scope=bundle, component.name=org.eclipse.smarthome.transform.javascript.internal.profiles.JavascriptTransformationProfileFactory, component.id=243} - 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.id=388, service.bundleid=228, service.scope=bundle, smarthome.transform=JS, component.name=org.eclipse.smarthome.transform.javascript.internal.JavaScriptTransformationService, component.id=242} - 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.id=500, TransformationService.target=(smarthome.transform=JS), service.bundleid=191, service.scope=bundle, component.name=org.eclipse.smarthome.transform.javascript.internal.profiles.JavascriptTransformationProfileFactory, component.id=47} - 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.id=499, service.bundleid=249, service.scope=bundle, smarthome.transform=JS, component.name=org.eclipse.smarthome.transform.javascript.internal.JavaScriptTransformationService, component.id=314} - 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.id=501, TransformationService.target=(smarthome.transform=JS), service.bundleid=249, service.scope=bundle, component.name=org.eclipse.smarthome.transform.javascript.internal.profiles.JavascriptTransformationProfileFactory, component.id=315} - 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 │ 0.11.0.201901031500    │ Eclipse SmartHome JavaScript Transformation Service
251 │ Active   │  75 │ 0.10.0.oh240           │ Eclipse SmartHome JavaScript Transformation Service

What did a miss?

Kind regards
Thomas

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).