I’ve followed these steps to install everything i need for creating my own binding.
Openhab:
Eclipse:
I managed to create my binding, but when i run app.bndrun -> Run OSGI, my binding won’t be listed in my Paper UI and the console give me following warnings (picture). Do i have to create a new log4j file? Any suggestions? Thank you in advance!
I also had problems, the Eclipse IDE documentation needs to be updated again.
I am collaborating for a new Openwebnet binding that is not yet official.
I use Eclipse IDE with win10.
I used the following steps to install an Openwebnet binding with it still official with the dependency of a lib file:
I cleaned up the old installations, under the user directory I deleted the directors .bnd - .eclipse - .karaf - .m2 - .p2
I started from a new Eclipse IDE
Installed the 03-2019 version
I selected Java Development and also Addons
Wait for everything to be installed and compiled.
I close all the bindings, except Astro, including the entry (one gives me an error) via the Close Project menu
I close Esclipse IDE
Downloaded from your Openwebnet git
I copy the Openwebnet folder under \git\openhab2-addons\bundles
Edit file \bom\openhab-addons\pom.xml and I insert:
Double click on app.bndrun
** Note problems: **
In the window for dragging in Run Requirements the Openwebnet binding is not present, Astro yes.
I ran several tests to solve it but nothing …
Exit from Eclipse IDE
From windows command prompt, by command cd I move under the openhab2-addons folder and compile it all with the command mvn -DskipChecks -DskipTests clean install -U
I open Eclipse
Double click on app.bndrun
I dragged the Openwebnet and Astro bindings to Run Requirements
(the command from the prompt solved the problem, there will be another way to avoid waiting 40min ???)
What is meant by that, what do i have to do exactly? (sorry i’m new here)
My own binding is shown on the left window and i can drag it. The problem is, when i drag a binding (e.g. astro) to the right side and run app.bndrun, i get errors (in the picture) and http: // localhost: 8080 / start / index is empty.
the .items .thing files are customized files, you can skip this step and only the ones from the default demo will be loaded.
Also the point of the library is customized for the binding that I use, external libretia, maybe you have your own or maybe you don’t need that passage.
errors warn there are also from me, but it works.
start from clean installation as from my list, we hope it works.
First of all thank you for your help. I tried reinstalling it but it still doesn’t work for me, same error messages. How exactly is eclipse connecting to my localhost.
Maybe it’s an issue with openhab? I followed all these steps:
" You can connect to openHAB’s console using the the C:\openHAB2\runtime\bin\client.bat script on the local machine."
If you use Eclipse IDE you don’t need to install OH in windows.
This is my log when I use “Debug OSGi”
____________________________
Welcome to Apache Felix Gogo
g! 20:31:23.094 [nfig-1-thread-1] WARN o.o.p.w.u.ServletContainerInitializerScanner:136 - failed to parse and instantiate of javax.servlet.ServletContainerInitializer in classpath
20:31:23.112 [nfig-1-thread-1] WARN o.o.p.w.u.ServletContainerInitializerScanner:136 - failed to parse and instantiate of javax.servlet.ServletContainerInitializer in classpath
20:31:25.055 [main] WARN o.o.p.w.u.ServletContainerInitializerScanner:136 - failed to parse and instantiate of javax.servlet.ServletContainerInitializer in classpath
20:31:25.060 [main] WARN o.o.p.w.u.ServletContainerInitializerScanner:136 - failed to parse and instantiate of javax.servlet.ServletContainerInitializer in classpath
20:31:28.205 [main] WARN o.o.p.w.u.ServletContainerInitializerScanner:136 - failed to parse and instantiate of javax.servlet.ServletContainerInitializer in classpath
20:31:28.207 [main] WARN o.o.p.w.u.ServletContainerInitializerScanner:136 - failed to parse and instantiate of javax.servlet.ServletContainerInitializer in classpath
20:31:37.347 [main] WARN o.e.s.m.c.i.folder.FolderObserver:126 - Directory 'scripts' does not exist in 'D:/eclipse-installer_build/openhab-master/git/openhab-distro/launch/app/runtime/conf'. Please check your configuration settings!
log4j:WARN No appenders could be found for logger (org.eclipse.xtext.parser.antlr.AbstractInternalAntlrParser).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
20:31:41.181 [main] INFO o.e.s.m.c.i.ModelRepositoryImpl:123 - Loading model 'Bticino_Michele.items'
20:31:41.833 [main] INFO o.e.s.m.c.i.ModelRepositoryImpl:123 - Loading model 'demo.items'
20:31:44.082 [main] INFO o.e.s.m.c.i.ModelRepositoryImpl:123 - Loading model 'mapdb.persist'
20:31:45.252 [main] INFO o.e.s.m.c.i.ModelRepositoryImpl:123 - Loading model 'Biticino_Michele.sitemap'
20:31:45.368 [main] INFO o.e.s.m.c.i.ModelRepositoryImpl:123 - Loading model 'demo.sitemap'
20:31:46.206 [main] INFO o.e.s.m.c.i.ModelRepositoryImpl:123 - Loading model 'demo.things'
20:31:46.545 [main] INFO o.e.s.m.c.i.ModelRepositoryImpl:123 - Loading model 'Bticino_Michele.things'
20:32:01.056 [main] INFO o.e.s.m.c.i.ModelRepositoryImpl:123 - Loading model 'demo.rules'
20:32:08.976 [main] WARN o.o.p.w.u.ServletContainerInitializerScanner:136 - failed to parse and instantiate of javax.servlet.ServletContainerInitializer in classpath
20:32:08.978 [main] WARN o.o.p.w.u.ServletContainerInitializerScanner:136 - failed to parse and instantiate of javax.servlet.ServletContainerInitializer in classpath
20:32:11.382 [main] WARN o.o.p.w.u.ServletContainerInitializerScanner:136 - failed to parse and instantiate of javax.servlet.ServletContainerInitializer in classpath
20:32:11.385 [main] WARN o.o.p.w.u.ServletContainerInitializerScanner:136 - failed to parse and instantiate of javax.servlet.ServletContainerInitializer in classpath
20:32:11.697 [main] WARN o.o.p.w.u.ServletContainerInitializerScanner:136 - failed to parse and instantiate of javax.servlet.ServletContainerInitializer in classpath
20:32:11.699 [main] WARN o.o.p.w.u.ServletContainerInitializerScanner:136 - failed to parse and instantiate of javax.servlet.ServletContainerInitializer in classpath
20:32:12.393 [main] WARN o.o.p.w.u.ServletContainerInitializerScanner:136 - failed to parse and instantiate of javax.servlet.ServletContainerInitializer in classpath
20:32:12.395 [main] WARN o.o.p.w.u.ServletContainerInitializerScanner:136 - failed to parse and instantiate of javax.servlet.ServletContainerInitializer in classpath
20:32:17.575 [main] WARN o.o.p.w.u.ServletContainerInitializerScanner:136 - failed to parse and instantiate of javax.servlet.ServletContainerInitializer in classpath
20:32:17.578 [main] WARN o.o.p.w.u.ServletContainerInitializerScanner:136 - failed to parse and instantiate of javax.servlet.ServletContainerInitializer in classpath
20:32:19.244 [main] WARN o.e.j.util.thread.ThreadPoolBudget:156 - Low configured threads: (max=8 - required=1)=7 < warnAt=8 for QueuedThreadPool[ServletModel-25]@56b66cc6{STARTING,8<=0<=8,i=0,q=0}[ReservedThreadExecutor@244c0fbe{s=0/1,p=0}]
20:32:20.375 [main] WARN o.o.p.w.u.ServletContainerInitializerScanner:136 - failed to parse and instantiate of javax.servlet.ServletContainerInitializer in classpath
20:32:20.377 [main] WARN o.o.p.w.u.ServletContainerInitializerScanner:136 - failed to parse and instantiate of javax.servlet.ServletContainerInitializer in classpath
20:32:20.647 [main] WARN o.o.p.w.u.ServletContainerInitializerScanner:136 - failed to parse and instantiate of javax.servlet.ServletContainerInitializer in classpath
20:32:20.650 [main] WARN o.o.p.w.u.ServletContainerInitializerScanner:136 - failed to parse and instantiate of javax.servlet.ServletContainerInitializer in classpath
20:32:20.938 [main] WARN o.o.p.w.u.ServletContainerInitializerScanner:136 - failed to parse and instantiate of javax.servlet.ServletContainerInitializer in classpath
20:32:20.940 [main] WARN o.o.p.w.u.ServletContainerInitializerScanner:136 - failed to parse and instantiate of javax.servlet.ServletContainerInitializer in classpath
20:32:21.332 [main] WARN o.o.p.w.u.ServletContainerInitializerScanner:136 - failed to parse and instantiate of javax.servlet.ServletContainerInitializer in classpath
20:32:21.334 [main] WARN o.o.p.w.u.ServletContainerInitializerScanner:136 - failed to parse and instantiate of javax.servlet.ServletContainerInitializer in classpath
20:32:24.266 [main] WARN o.o.p.w.u.ServletContainerInitializerScanner:136 - failed to parse and instantiate of javax.servlet.ServletContainerInitializer in classpath
20:32:24.269 [main] WARN o.o.p.w.u.ServletContainerInitializerScanner:136 - failed to parse and instantiate of javax.servlet.ServletContainerInitializer in classpath
20:32:49.701 [openhab.addons)] ERROR L.org.apache.felix.configadmin:? - Unexpected problem delivering configuration event to [org.osgi.service.cm.ConfigurationListener, id=47, bundle=19/file:/C:/Users/Michele/.m2/repository/org/apache/felix/org.apache.felix.log/1.2.0/org.apache.felix.log-1.2.0.jar]
java.lang.reflect.UndeclaredThrowableException: null
at com.sun.proxy.$Proxy4.configurationEvent(Unknown Source)
at org.apache.felix.cm.impl.ConfigurationManager$FireConfigurationEvent.sendEvent(ConfigurationManager.java:1685)
at org.apache.felix.cm.impl.ConfigurationManager$FireConfigurationEvent.run(ConfigurationManager.java:1637)
at org.apache.felix.cm.impl.UpdateThread.run0(UpdateThread.java:138)
at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:105)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.reflect.InvocationTargetException: null
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.felix.log.ConfigurationListenerImpl$CLProxy.getProperties(ConfigurationListenerImpl.java:161)
at org.apache.felix.log.ConfigurationListenerImpl$CLProxy.access$500(ConfigurationListenerImpl.java:67)
at org.apache.felix.log.ConfigurationListenerImpl$CLProxy$1.invoke(ConfigurationListenerImpl.java:147)
... 6 common frames omitted
Caused by: java.lang.NullPointerException: null
at org.apache.felix.cm.impl.ConfigurationAdapter.getProcessedProperties(ConfigurationAdapter.java:293)
... 13 common frames omitted
20:32:49.701 [openhab.addons)] ERROR L.org.apache.felix.configadmin:? - Unexpected problem delivering configuration event to [org.osgi.service.cm.ConfigurationListener, id=47, bundle=19/file:/C:/Users/Michele/.m2/repository/org/apache/felix/org.apache.felix.log/1.2.0/org.apache.felix.log-1.2.0.jar]
java.lang.reflect.UndeclaredThrowableException: null
at com.sun.proxy.$Proxy4.configurationEvent(Unknown Source)
at org.apache.felix.cm.impl.ConfigurationManager$FireConfigurationEvent.sendEvent(ConfigurationManager.java:1685)
at org.apache.felix.cm.impl.ConfigurationManager$FireConfigurationEvent.run(ConfigurationManager.java:1637)
at org.apache.felix.cm.impl.UpdateThread.run0(UpdateThread.java:138)
at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:105)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.reflect.InvocationTargetException: null
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.felix.log.ConfigurationListenerImpl$CLProxy.getProperties(ConfigurationListenerImpl.java:161)
at org.apache.felix.log.ConfigurationListenerImpl$CLProxy.access$500(ConfigurationListenerImpl.java:67)
at org.apache.felix.log.ConfigurationListenerImpl$CLProxy$1.invoke(ConfigurationListenerImpl.java:147)
... 6 common frames omitted
Caused by: java.lang.NullPointerException: null
at org.apache.felix.cm.impl.ConfigurationAdapter.getProcessedProperties(ConfigurationAdapter.java:293)
... 13 common frames omitted
20:32:51.300 [e.i18nprovider)] INFO o.e.s.c.i.i18n.I18nProviderImpl:245 - Location set to '45.956867599999995,8.870837'.
Okay… i found the problem. I installed OH while using Eclipse IDE… everytime i call my localhost my OH (without eclipse) is shown. Thank you for your help
Hi I’ve a similar issue. Working on a new binding, but with openhab.demo.app binding is not shown.
Starting the demo app with no issues. The only thing I’ve investigated is that when I use the “resolve” functionality in app.bndrun I get a missing dependency: