Problems with latest IDE install

Due to the recent problems with ZWave and ZigBee builds after all the repos changes, I thought I would grab the latest build environment - unfortunately, that also no longer seems to work for these bindings out of the box.

I tried initially a reasonably simple IDE install and then importing my original repositories, but when running up the bnd app ZigBee didn’t appear in the list of bundles. So, I thought I’d instead use the installer to install the default repositories thinking that must work - but it doesn’t, and I have the same problem.

There is an error showing in the ZigBee pom on the parent -:

Execution default of goal biz.aQute.bnd:bnd-maven-plugin:4.2.0:bnd-process failed: A required class was missing while executing biz.aQute.bnd:bnd-maven-plugin:4.2.0:bnd-process: aQute/bnd/osgi/ActivelyClosingClassLoader$1
-----------------------------------------------------
realm =    plugin>biz.aQute.bnd:bnd-maven-plugin:4.2.0
strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
urls[0] = file:/Users/chris/.m2/repository/biz/aQute/bnd/bnd-maven-plugin/4.2.0/bnd-maven-plugin-4.2.0.jar
urls[1] = file:/Users/chris/.m2/repository/org/apache/maven/shared/maven-mapping/3.0.0/maven-mapping-3.0.0.jar

As above, the bundles aren’t listed in the bnd repositories list. We also have the issue with zigbee and zwave repository CI builds that have been broken for the past few weeks - I’m not sure if that’s related (@wborn and @martinvw I think you guys were looking at that?).

Any thoughts would be useful given the ever changing development world that we now seem to live…

Thanks
Chris

1 Like

That is only an issue for Jenkins because it is using an outdated Maven version which cannot handle parent version ranges.

The Z-Wave and ZigBee bundles are probably missing from that screen because those bundles aren’t defined in any of the App BOM dependencies.

1 Like

Thanks @wborn

Ok - is that something that we expect to resolve? At the moment all CI builds are breaking and this raises errors for merging and we’re holding off merging ZigBee PRs due to this. If it’s not going to be fixed we may as well disable CI so at least we don’t get the merge restrictions.

I’m not really familiar with how this is configured - is it possible to add them?

A quick fix for getting the Z-Wave and ZigBee PR builds working again could be to temporarily resolve the openhab-super-pom range in the openhab2-addons POM to 1.0.1. Maybe @pfink has some plans to update the PR builds to a pipeline as a fix? Another workaround could be to use Travis CI for building PRs of the Z-Wave/ZigBee repositories until it’s properly fixed.

Yes we could add those bundles to a BOM so they can be resolved by bnd. Since the Karaf features for these bundles are already in openhab-distro we could maybe create a BOM for these in openhab-distro as well. Do you think the features and BOMs of Z-Wave/ZigBee should be added to openhab-distro or the respective repositories @Kai, @maggu2810?

1 Like

Hi @wborn, I am involved in openHAB distro, so it is up to the distro maintainers Sign in to GitHub · GitHub

Guys - any news here? I’d really like to get the ZigBee and ZWave bindings back into a working state.

1 Like

I’ve opened an issue for this.

@kai are you able to answer @wborn question above -:

I’d really like to get the ZigBee and ZWave bindings working again within the IDE…

Sure, any of the official bindings should also be available in the IDE - so if all that is required is to add their boms in here, then please briefly test it and create an according PR - I’ll happily merge it!

Done for ZWave.

1 Like

I have just created a PR for zigbee: https://github.com/openhab/openhab-distro/pull/936

With this PR I can now select the zigbee binding in the app.bndrun to be started. However, I cannot start the runtime because basicui complains that it wants to have a gson version >2.8 and <3.0 but there are only 2.3.1 and 2.7 available :frowning:

Resolution failed. Capabilities satisfying the following requirements could not be found:
[<<INITIAL>>]
  ⇒ osgi.identity: (osgi.identity=org.openhab.ui.basic)
      ⇒ [org.openhab.ui.basic version=2.5.0.201906161112]
          ⇒ osgi.wiring.package: (&(osgi.wiring.package=com.google.gson)(&(version>=2.8.0)(!(version>=3.0.0))))
[org.openhab.transform.jinja version=2.5.0.201906282104]
  ⇒ osgi.wiring.package: (&(osgi.wiring.package=com.hubspot.jinjava))
[org.apache.aries.jpa.container version=2.7.0]
  ⇒ osgi.service: (objectClass=javax.persistence.spi.PersistenceProvider)
[net.minidev.accessors-smart version=1.2.0]
  ⇒ osgi.wiring.package: (&(osgi.wiring.package=org.objectweb.asm)(&(version>=5.0.0)(!(version>=6.0.0))))
[org.openhab.transform.bin2json version=2.5.0.201906282103]
  ⇒ osgi.wiring.package: (&(osgi.wiring.package=com.google.gson)(&(version>=2.8.0)(!(version>=3.0.0))))

Any ideas whats wrong there?

I’ve tried a complete reinstall of the IDE, and still can’t get this to work.

I installed the IDE as per the latest guide, except I added ZWave and ZigBee bindings as well as those shown. Once the downloads all completed, I immediately ran app.bndrun and hit Resolve and this came up with errors. I then followed the instructions to rebuild the BOM (mvn -DskipChecks -DskipTests clean install from the openhab2-addons/bom/openhab-addons folder) thinking that might be the issue, but I still get one error (which is better than before building the BOM at least!) -:

Also, after rebuilding the BOM, I get neither the ZWave or ZigBee bindings listed in the Repositories box - before rebuilding the BOM I did at least have the ZWave binding, but not the ZigBee bundles.

The latest changes from @Kai to try and fix the ZigBee binding were merged yesterday, so I’m assuming these should have migrated through the system by now?

Any other ideas on how to get this working again.

Try this… IDE setup · Issue #927 · openhab/openhab-distro · GitHub. That is the same error I was getting before clearing the m2. I haven’t tried with a controller yet, but i can run zwave in the IDE. Note, you’ll also need to add the transport…

I haven’t been able to get zigbee to work though…

Description	Resource	Path	Location	Type
Failed to read artifact descriptor for org.openhab.addons.bom:org.openhab.addons.bom.zigbee:pom:2.5.0-SNAPSHOT

org.eclipse.aether.resolution.ArtifactDescriptorException: Failed to read artifact descriptor for org.openhab.addons.bom:org.openhab.addons.bom.zigbee:pom:2.5.0-SNAPSHOT
	at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:323)
	at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.readArtifactDescriptor(DefaultArtifactDescriptorReader.java:192)
	at org.eclipse.aether.internal.impl.DefaultDependencyCollector.resolveCachedArtifactDescriptor(DefaultDependencyCollector.java:539)
	at org.eclipse.aether.internal.impl.DefaultDependencyCollector.getArtifactDescriptorResult(DefaultDependencyCollector.java:522)
	at org.eclipse.aether.internal.impl.DefaultDependencyCollector.processDependency(DefaultDependencyCollector.java:411)
	at org.eclipse.aether.internal.impl.DefaultDependencyCollector.processDependency(DefaultDependencyCollector.java:365)
	at org.eclipse.aether.internal.impl.DefaultDependencyCollector.process(DefaultDependencyCollector.java:353)
	at org.eclipse.aether.internal.impl.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:256)
	at org.eclipse.aether.internal.impl.DefaultRepositorySystem.collectDependencies(DefaultRepositorySystem.java:282)
	at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(DefaultProjectDependenciesResolver.java:169)
	at org.apache.maven.project.DefaultProjectBuilder.resolveDependencies(DefaultProjectBuilder.java:212)
	at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:185)
	at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:116)
	at org.eclipse.m2e.core.internal.embedder.MavenImpl.readMavenProject(MavenImpl.java:628)
	at org.eclipse.m2e.core.internal.project.registry.DefaultMavenDependencyResolver.resolveProjectDependencies(DefaultMavenDependencyResolver.java:63)
	at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.refreshPhase2(ProjectRegistryManager.java:525)
	at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.lambda$1(ProjectRegistryManager.java:489)
	at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:177)
	at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:151)
	at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.refresh(ProjectRegistryManager.java:488)
	at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.refresh(ProjectRegistryManager.java:349)
	at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.refresh(ProjectRegistryManager.java:296)
	at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod.getProjectFacade(MavenBuilder.java:155)
	at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod$1.call(MavenBuilder.java:90)
	at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:177)
	at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:151)
	at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:99)
	at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod.execute(MavenBuilder.java:87)
	at org.eclipse.m2e.core.internal.builder.MavenBuilder.build(MavenBuilder.java:201)
	at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:833)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:220)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:263)
	at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:316)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:319)
	at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:371)
	at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:392)
	at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:154)
	at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:244)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Caused by: org.apache.maven.model.resolution.UnresolvableModelException: Failure to find org.openhab.addons.bundles:org.openhab.addons.zigbee.reactor:pom:2.5.0-20190516.035420-7 in https://openhab.jfrog.io/openhab/libs-snapshot was cached in the local repository, resolution will not be reattempted until the update interval of openhab-artifactory-snapshot has elapsed or updates are forced
	at org.apache.maven.repository.internal.DefaultModelResolver.resolveModel(DefaultModelResolver.java:178)
	at org.apache.maven.repository.internal.DefaultModelResolver.resolveModel(DefaultModelResolver.java:224)
	at org.apache.maven.model.building.DefaultModelBuilder.readParentExternally(DefaultModelBuilder.java:1052)
	at org.apache.maven.model.building.DefaultModelBuilder.readParent(DefaultModelBuilder.java:830)
	at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:332)
	at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:314)
	... 40 more
Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: Failure to find org.openhab.addons.bundles:org.openhab.addons.zigbee.reactor:pom:2.5.0-20190516.035420-7 in https://openhab.jfrog.io/openhab/libs-snapshot was cached in the local repository, resolution will not be reattempted until the update interval of openhab-artifactory-snapshot has elapsed or updates are forced
	at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:422)
	at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:224)
	at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:201)
	at org.apache.maven.repository.internal.DefaultModelResolver.resolveModel(DefaultModelResolver.java:174)
	... 45 more
Caused by: org.eclipse.aether.transfer.ArtifactNotFoundException: Failure to find org.openhab.addons.bundles:org.openhab.addons.zigbee.reactor:pom:2.5.0-20190516.035420-7 in https://openhab.jfrog.io/openhab/libs-snapshot was cached in the local repository, resolution will not be reattempted until the update interval of openhab-artifactory-snapshot has elapsed or updates are forced
	at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.newException(DefaultUpdateCheckManager.java:233)
	at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.checkArtifact(DefaultUpdateCheckManager.java:208)
	at org.eclipse.aether.internal.impl.DefaultArtifactResolver.gatherDownloads(DefaultArtifactResolver.java:563)
	at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:481)
	at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:399)
	... 48 more
	pom.xml	/org.openhab.demo.app	line 1	Maven Dependency Problem

Thanks - I was just going to try scrubbing down the m2 and p2 - I’ve been desperately trying to avoid that as it will likely lead to having to reinstall a load more software that is also eclipse based :frowning:

I just deleted .m2/repository/org/openhab and zigbee showed up, but haven’t managed to get it to load…

image

Well, after a LOT of messing around I’ve managed to at least get ZWave “running” (I think!). The install still comes up with a lot of errors, and didn’t show any repositories until I rebuilt the BOM.

ZigBee does now also show in the repo list, but it won’t resolve still.

The “I think” above relating to ZWave working is now “I don’t think” since although it is listed in the bnd repo list, it doesn’t show up in PaperUI. I tried changing the logging to DEBUG for ZWave, but it seems it’s not starting as there is nothing listed.

I also note that when starting the environment (ie running app.run) it is very slow to start taking around 1 1/2 minutes each time. Maybe that’s just my machine, although it never used to do this, and doesn’t do it with other Eclipse workspaces.

I’m happy to try anything if anyone has any ideas, but having spent another 6 hours on this this morning and last night, I’m going to do something else for a while before my computer takes an unscheduled trip across the room :wink:

Changes to the logback.xml will only take effect when you start the app again. Logging for zwave is working for me. so it looks to be working. Just haven’t put in a controller yet. Oddly, everything seems to be logged twice though.

For zigbee, maybe you could try remote debugging until things get sorted?

Yes, of course. As I said - it doesn’t appear to be starting. I started this from scratch, and I also added DEBUG to other parts of the system and the logging is working.

If it was just a logging problem, then I would still have expected to show the binding in PaperUI, and also list ZWave things when adding things.

I’m pretty confident that it is simply not starting.

Do you see zwave when you do a lb in the console? And I have to ask… did you add the serial transport?

If you find concrete issues, I’d suggest to track and discuss them on https://github.com/openhab/openhab-distro/issues/927.