I tried using Eclipse already several times. Since it always generated errors while compiling, I decided to retry another time when the sources have been settled.
Now they are, and I retried. With the current version of OpenHAB, it still generates errors. If I use the master branch (OpenHAB 3) and choose OpenHAB Development and OpenHAB Add-ons, everything goes smoothly including running it, but when I try to access paperui (http://localhost:8080/paperui/ ) it returns a 404. So the server is up, but no contents. Strangely, I donât find any bundle, and ~/openhab-master/git/openhab-addons/bundles does not contain any subdirectory, as if the add-ons hadnât been loaded (that would explain why there is no paperui).
What did I wrong?
openHAB 3 is not yet fully functional. I believe people are currently using 2.5.x for addons development.
Indeed, master branch is not to be used for addon development atm.
Thank you both, @hmerk and @Bruce_Osborne.
First I had tried 2.5, but it didnât work, and still doesnât. It opened a window âErrors in running OSGi Frameworkâ but it had so many errors that both this window and the Console of the Eclipse IDE donât show the first errors, but just the last ones that donât help that much.
Sorry for this dumb question; I learned programming in an environment where I entered a compiler instruction at the command line and piped the output into a file or could just modify the Makefile to reach my goal.
I have not (yet) entered this Development world but have been lurking to try and learn.
I am very keen to debug and enhance existing bindings, also to give back to the community what I received, but the learning curve of the development platform is quite steepâŠ
Just a stupid question. But did you follow the eclipse ide documentation from the openHAB website?
Not a stupid question, but yes, I tried to follow it as precisely as possible. I didnât even add any binding to pom.xml because I just wanted to see if I can start a ânakedâ OpenHAB.
Ok. You should make sure you have for both openhab-distro and openHAB-addons the branch 2.5.x
checked out. During eclipse installation this is an option to select, but you can also do a git checkout 2.5.x
in both repositories.
I am sure I selected 2.5.x in both items. Do you suggest that I checkout the items manually?
If itâs not checkout you might check git status
and make sure check out 2.5.x. The master branch is for 3.0 development, which is not compatible with current 2.5
My outputs:
git/openhab-addons> git status
Auf Branch 2.5.x
Ihr Branch ist auf demselben Stand wie âorigin/2.5.xâ.
git/openhab-distro> git status
Auf Branch 2.5.x
Ihr Branch ist auf demselben Stand wie âorigin/2.5.xâ.
Now you should be able to import bindings. The URL in the development needs to be precise. It might be http://localhost:8080/paperui/index or try http://localhost:8080/start/index not sure if either must end with/
(not behind a computer right now, so can check)
You mean I should ignore all those errors that come when I âRun OSGiâ or âDebug OSGiâ? The server runs, at least 8080 is reachable. But neither /paperui/ nor /jpaperui/index nor /start/index work, all result in a 404 (not found). I also didnât find the regular OpenHAB logfile where eventual errors could be logged. I didnât change the logging configuration though but as a standard things are logged in OpenHAB.
You should not get errors. And it should log in the eclipse console. What errors do you get?
I get so many errors that the console doesnât show them all.
One of them is the following:
17:11:54.271 [9a-a11b40f0ce29] ERROR E.Framework.org.openhab.ui.paper:? - FrameworkEvent ERROR
org.osgi.framework.BundleException: Could not resolve module: org.openhab.ui.paper [129]
Unresolved requirement: Import-Package: org.openhab.ui.dashboard
-> Export-Package: org.openhab.ui.dashboard; bundle-symbolic-name=âorg.openhab.ui.dashboardâ; bundle-version=â2.5.1.202001031055â; version=â2.5.1â
org.openhab.ui.dashboard [127]
Unresolved requirement: Import-Package: org.openhab.core
-> Export-Package: org.openhab.core; bundle-symbolic-name=âorg.openhab.core.bootâ; bundle-version=â2.5.0â; version=â2.5.0â
org.openhab.core.boot [84]
Unresolved requirement: Import-Package: org.eclipse.smarthome.model.rule.runtime; version="[2.5.0,3.0.0)"
-> Export-Package: org.eclipse.smarthome.model.rule.runtime; bundle-symbolic-name=âorg.openhab.core.model.rule.runtimeâ; bundle-version=â2.5.0â; version=â2.5.0â
org.openhab.core.model.rule.runtime [108]
Unresolved requirement: Require-Bundle: org.openhab.core.model.rule
-> Bundle-SymbolicName: org.openhab.core.model.rule; bundle-version=â2.5.0â
org.openhab.core.model.rule [107]
Unresolved requirement: Import-Package: org.eclipse.jdt.annotation; resolution:=âoptionalâ
Unresolved requirement: Require-Bundle: org.eclipse.emf.mwe2.launch; resolution:=âoptionalâ
Unresolved requirement: Require-Bundle: org.openhab.core.model.lazygen; resolution:=âoptionalâ
Unresolved requirement: Require-Bundle: org.eclipse.xtext.generator; resolution:=âoptionalâ
Unresolved requirement: Import-Package: org.eclipse.smarthome.model.script.engine.action; version="[2.5.0,3.0.0)"
-> Export-Package: org.eclipse.smarthome.model.script.engine.action; bundle-symbolic-name=âorg.openhab.core.model.scriptâ; bundle-version=â2.5.0â; version=â2.5.0â
org.openhab.core.model.script [109]
Unresolved requirement: Import-Package: org.eclipse.jdt.annotation; resolution:=âoptionalâ
Unresolved requirement: Require-Bundle: org.eclipse.emf.mwe2.launch; resolution:=âoptionalâ
Unresolved requirement: Require-Bundle: org.openhab.core.model.lazygen; resolution:=âoptionalâ
Unresolved requirement: Require-Bundle: org.eclipse.xtext.generator; resolution:=âoptionalâ
Unresolved requirement: Import-Package: org.eclipse.smarthome.core.ephemeris; version="[2.5.0,3.0.0)"
-> Export-Package: org.eclipse.smarthome.core.ephemeris; bundle-symbolic-name=âorg.openhab.core.ephemerisâ; bundle-version=â2.5.0â; version=â2.5.0â
org.openhab.core.ephemeris [90]
Unresolved requirement: Import-Package: de.jollyday.util; version="[0.5.0,1.0.0)"
-> Export-Package: de.jollyday.util; bundle-symbolic-name=âjollydayâ; bundle-version=â0.5.8â; version=â0.5.8â; uses:=âde.jollyday,de.jollyday.config,javax.xml.bindâ
jollyday [9]
Unresolved requirement: Import-Package: javax.xml.bind
Unresolved requirement: Import-Package: de.jollyday; version="[0.5.0,1.0.0)"
-> Export-Package: de.jollyday; bundle-symbolic-name=âjollydayâ; bundle-version=â0.5.8â; version=â0.5.8â; uses:=âde.jollyday.datasource,de.jollyday.utilâ
Unresolved requirement: Require-Bundle: org.eclipse.xtext.xbase; visibility:=âreexportâ
-> Bundle-SymbolicName: org.eclipse.xtext.xbase; bundle-version=â2.19.0.v20190902-0952â; singleton:=âtrueâ
org.eclipse.xtext.xbase [54]
Unresolved requirement: Import-Package: com.ibm.icu.text; version=â4.0.0â; resolution:=âoptionalâ
Unresolved requirement: Import-Package: javax.annotation
-> Export-Package: javax.annotation; bundle-symbolic-name=âcom.eclipsesource.jaxrs.jersey-allâ; bundle-version=â2.22.2â; version=â1.2.0â
com.eclipsesource.jaxrs.jersey-all [3]
Unresolved requirement: Import-Package: javax.activation
Unresolved requirement: Require-Bundle: org.eclipse.xtext.xbase
-> Bundle-SymbolicName: org.eclipse.xtext.xbase; bundle-version=â2.19.0.v20190902-0952â; singleton:=âtrueâ
Unresolved requirement: Import-Package: org.eclipse.smarthome.model.script; version="[2.5.0,3.0.0)"
-> Export-Package: org.eclipse.smarthome.model.script; bundle-symbolic-name=âorg.openhab.core.model.scriptâ; bundle-version=â2.5.0â; version=â2.5.0â; uses:=âorg.eclipse.smarthome.core.events,org.eclipse.smarthome.core.items,org.eclipse.smarthome.core.thing,org.eclipse.smarthome.core.thing.binding,org.eclipse.smarthome.model.core,org.eclipse.smarthome.model.script.engine,org.eclipse.smarthome.model.script.engine.action,org.eclipse.smarthome.model.script.parser.antlr.internal,org.eclipse.smarthome.model.script.validationâ
Unresolved requirement: Require-Bundle: org.openhab.core.model.script
-> Bundle-SymbolicName: org.openhab.core.model.script; bundle-version=â2.5.0â
Unresolved requirement: Import-Package: org.eclipse.smarthome.model.script; version="[2.5.0,3.0.0)"
-> Export-Package: org.eclipse.smarthome.model.script; bundle-symbolic-name=âorg.openhab.core.model.scriptâ; bundle-version=â2.5.0â; version=â2.5.0â; uses:=âorg.eclipse.smarthome.core.events,org.eclipse.smarthome.core.items,org.eclipse.smarthome.core.thing,org.eclipse.smarthome.core.thing.binding,org.eclipse.smarthome.model.core,org.eclipse.smarthome.model.script.engine,org.eclipse.smarthome.model.script.engine.action,org.eclipse.smarthome.model.script.parser.antlr.internal,org.eclipse.smarthome.model.script.validationâ
Unresolved requirement: Import-Package: org.eclipse.smarthome.model.script.engine; version="[2.5.0,3.0.0)"
-> Export-Package: org.eclip47)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1685)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1665)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1627)
at org.eclipse.osgi.container.SystemModule.startWorker(SystemModule.java:267)
at org.eclipse.osgi.container.Module.doStart(Module.java:584)
at org.eclipse.osgi.container.Module.start(Module.java:452)
at org.eclipse.osgi.container.SystemModule.start(SystemModule.java:191)
at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:431)
at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:450)
at org.eclipse.osgi.launch.Equinox.start(Equinox.java:118)
at aQute.launcher.Launcher.activate(Launcher.java:463)
at aQute.launcher.Launcher.launch(Launcher.java:334)
at aQute.launcher.Launcher.run(Launcher.java:143)
at aQute.launcher.Launcher.main(Launcher.java:121)
at aQute.launcher.pre.EmbeddedLauncher.executeWithRunPath(EmbeddedLauncher.java:154)
at aQute.launcher.pre.EmbeddedLauncher.findAndExecute(EmbeddedLauncher.java:119)
at aQute.launcher.pre.EmbeddedLauncher.main(EmbeddedLauncher.java:51)
se.smarthome.model.script.engine; bundle-symbolic-name=âorg.openhab.core.model.scriptâ; bundle-version=â2.5.0â; version=â2.5.0â; uses:=âorg.eclipse.smarthome.core.thing.binding,org.eclipse.smarthome.model.script.engine.actionâ
Unresolved requirement: Import-Package: org.eclipse.xtext.xbase.interpreter
-> Export-Package: org.eclipse.xtext.xbase.interpreter; bundle-symbolic-name=âorg.eclipse.xtext.xbaseâ; bundle-version=â2.19.0.v20190902-0952â; version=â0.0.0â; x-friends:=âorg.eclipse.xtext.purexbase.ui, org.eclipse.xtext.xbase.tests, org.eclipse.xtend.coreâ
Unresolved requirement: Import-Package: org.eclipse.xtext.xbase
-> Export-Package: org.eclipse.xtext.xbase; bundle-symbolic-name=âorg.eclipse.xtext.xbaseâ; bundle-version=â2.19.0.v20190902-0952â; version=â0.0.0â
Unresolved requirement: Import-Package: org.eclipse.xtext.xbase.interpreter.impl
-> Export-Package: org.eclipse.xtext.xbase.interpreter.impl; bundle-symbolic-name=âorg.eclipse.xtext.xbaseâ; bundle-version=â2.19.0.v20190902-0952â; version=â0.0.0â; x-friends:=âorg.eclipse.xtext.purexbase.ui, org.eclipse.xtext.xbase.testsâat org.eclipse.osgi.container.Module.start(Module.java:447)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1685)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1665)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1627)
at org.eclipse.osgi.container.SystemModule.startWorker(SystemModule.java:267)
at org.eclipse.osgi.container.Module.doStart(Module.java:584)
at org.eclipse.osgi.container.Module.start(Module.java:452)
at org.eclipse.osgi.container.SystemModule.start(SystemModule.java:191)
at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:431)
at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:450)
at org.eclipse.osgi.launch.Equinox.start(Equinox.java:118)
at aQute.launcher.Launcher.activate(Launcher.java:463)
at aQute.launcher.Launcher.launch(Launcher.java:334)
at aQute.launcher.Launcher.run(Launcher.java:143)
at aQute.launcher.Launcher.main(Launcher.java:121)
at aQute.launcher.pre.EmbeddedLauncher.executeWithRunPath(EmbeddedLauncher.java:154)
at aQute.launcher.pre.EmbeddedLauncher.findAndExecute(EmbeddedLauncher.java:119)
at aQute.launcher.pre.EmbeddedLauncher.main(EmbeddedLauncher.java:51)
org.openhab.ui.paper, one of the modules it isnât able to find, is listed in the âRun Requirementsâ, and the window that appears when I klick on âResolveâ doesnât show anything particular or an error, and also lists org.openhab.ui.paper (I didnât add any âOptional Resourcesâ though).
I do not know if this applies, but there was an issue in 2.5.0 addons corrected in 2.5.1. They added the dashboard-ui
to addons, if I recall correctly
I tried to add dashboard-ui, but it didnât help. And if you said ârecentlyâ, probably it is anyway corrected meanwhile, because if I understood it right, the sources/settings are downloaded daily.
Whatâs your Java version?
Iâm also experiencing a âbeginner problemâ after following the latest Eclipse IDE Setup
Note: I tried using multiple versions of Eclipse: the âlatest releaseâ 2019-12, 2019-09 and 2019-06 (as shown in the screenshots from the IDE Setup page). Switching versions didnât solve my problem
After importing my binding into Eclipse, Iâm getting an error in pom.xml (on the opening <parent>
tag):
Description | Resource | Path | Location | Type |
---|---|---|---|---|
Plugin execution not covered by lifecycle configuration: com.diffplug.spotless:spotless-maven-plugin:1.24.3:check (execution: codestyle_check, phase: initialize) | pom.xml | /org.openhab.binding.unifi | line 5 | Maven Project Build Lifecycle Mapping Problem |
Searching the forums I found someone else had a similar problem:
However the steps in that thread didnât resolve my issue
Maybe one of the Eclipse / IDE experts now whatâs happening here?
Thanks in advance!
Matthew