我已经为 OpenHab2 创建了自己的绑定,使用它构建它mvn clean package
并将其上传到/usr/share/openhab2/addons/
.
我的问题是捆绑没有启动。在日志中有这个警告:
2016-11-25 10:55:00.518 [警告] [org.apache.felix.fileinstall] - 启动捆绑时出错:文件:/usr/share/openhab2/addons/org.openhab.binding.rf24-2.0.0 -SNAPSHOT.jar org.osgi.framework.BundleException:无法解析模块:org.openhab.binding.rf24 [189] 未解决的要求:导入包:org.apache.log4j;版本="1.2.17"
at org.eclipse.osgi.container.Module.start(Module.java:434)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:] at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:393)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:] at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1245)[8:org.apache.felix.fileinstall:3.5.0] at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1217)[8:org.apache.felix.fileinstall:3.5.0] at org.apache.felix.fileinstall.internal.DirectoryWatcher.startAllBundles(DirectoryWatcher.java:1207)[8:org.apache.felix.fileinstall:3.5.0] at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:504)[8:org.apache.felix.fileinstall:3.5.0] at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:358)[8:org.apache.felix.fileinstall:3.5.0] at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:310)[8:org.apache.felix.fileinstall:3.5.0]
2016-11-25 10:55:00.536 [警告] [org.apache.felix.fileinstall] - 启动捆绑时出错:文件:/usr/share/openhab2/addons/org.openhab.binding.rf24-2.0.0 -SNAPSHOT.jar org.osgi.framework.BundleException:无法解析模块:org.openhab.binding.rf24 [189] 未解决的要求:导入包:org.apache.log4j;版本="1.2.17"
at org.eclipse.osgi.container.Module.start(Module.java:434)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:] at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:393)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:] at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1245)[8:org.apache.felix.fileinstall:3.5.0] at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1217)[8:org.apache.felix.fileinstall:3.5.0] at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:509)[8:org.apache.felix.fileinstall:3.5.0] at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:358)[8:org.apache.felix.fileinstall:3.5.0] at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:310)[8:org.apache.felix.fileinstall:3.5.0]
2016-11-25 11:00:16.306 [错误] [org.openhab.binding.rf24] - FrameworkEvent 错误 - org.openhab.binding.rf24 org.osgi.framework.BundleException:无法解析模块:org.openhab。 binding.rf24 [189] 未解决的要求:导入包:org.apache.log4j;版本="1.2.17"
at org.eclipse.osgi.container.Module.start(Module.java:434)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:] at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1582)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
通过http://docs.openhab.org/installation/linux.html在 RPi3 Raspbian 上安装