我已经为OpenHab2创建了自己的绑定,使用mvn clean package
构建它并将其上传到/usr/share/openhab2/addons/
。
我的问题是捆绑没有启动。在日志中有这样警告:
安装在RPi3 Raspbian上2016-11-25 10:55:00.518 [WARN] [org.apache.felix.fileinstall] - 启动bundle时出错:file:/usr/share/openhab2/addons/org.openhab.binding.rf24- 2.0.0-SNAPSHOT.jar org.osgi.framework.BundleException:无法解析模块:org.openhab.binding.rf24 [189] 未解决的要求:Import-Package: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 [WARN] [org.apache.felix.fileinstall] - 启动bundle时出错:file:/usr/share/openhab2/addons/org.openhab.binding.rf24- 2.0.0-SNAPSHOT.jar org.osgi.framework.BundleException:无法解析模块:org.openhab.binding.rf24 [189] 未解决的要求:Import-Package: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 [ERROR] [org.openhab.binding.rf24] - FrameworkEvent ERROR - org.openhab.binding.rf24 org.osgi.framework.BundleException:无法解析模块:org.openhab.binding.rf24 [189] 未解决的要求:Import-Package: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:]