BobRak / OpenHAB-Smartthings

53 stars 54 forks source link

Unresolved dependency #37

Closed ghost closed 4 years ago

ghost commented 6 years ago

Just putting this up incase it helps. I had an unresolved dependency error when setting this up on Windows. I added the below package into the addons folder which resolved the issue. http://www.java2s.com/Code/Jar/o/Downloadorgapachecommonscodecjar.htm

Full error was: 2018-03-30 06:44:08.976 [ERROR] [org.openhab.binding.smartthings ] - FrameworkEvent ERROR - org.openhab.binding.smartthings org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.smartthings [209] Unresolved requirement: Import-Package: org.apache.commons.codec

at org.eclipse.osgi.container.Module.start(Module.java:444) [?:?]
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1620) [?:?]
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1600) [?:?]
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1571) [?:?]
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1514) [?:?]
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1) [?:?]
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) [?:?]
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340) [?:?]

2018-03-30 06:44:09.

BobRak commented 6 years ago

Hi: Thanks for reporting this. And, I apologize for the late response. I remember having the same problem quite a while ago but don't remember the details.

My only windows setup is my eclipse development environment. When I look at the OpenHAB installation there I find org.apache.commons.codec_1.6.0.v201305230611.jar in D:\eclipse-oxygen\openhab2-master\ws.metadata.plugins\org.eclipse.pde.core.bundle_pool\plugins. It has the same date as other files in that directory so it doesn't seem like I would have installed it later.

I don't have any org.apache.commons.codec* files in my addons directory.

I did download the current binary from http://www.openhab.org/downloads.html and looking in the zip file I find: org.apache.commons.codec_1.3.0.v201101211617.jar and org.apache.commons.codec_1.4.0.v201209201156.jar in the server/plugins directory. Do you have either of those files in your installation?

In my Linux RaspberryPi installation I find commons-codec-1.6.jar and again it has the same date as the other files in that directory which is in the OpenHAB directory structure opposed to the addons directory.

Is your installation current? I am wondering if you possibly have an older installation and that was added later.

I haven't had anyone else tell me they had to add that jar manually but I will keep in mind that you had this problem. Outside of performing my own Window installation I'm not sure where to look.

Thanks,

Bob

diervo commented 6 years ago

Same here, I just had the same issue while installing the jar in the 2.2 release of OpenHab. I had a branch new installation of everything off the shelve for a Rasberry Pi.

I did check if the jar was there, and indeed is in system, so I wonder if is not being requested by OSGI somehow?

BobRak commented 6 years ago

Thanks for the feedback. Right now I'm in the middle of moving and don't have access to much of my computer equipment. Nor, the time to try anything. As soon as I get a chance I'll try a new installation. I expect I'll have the same problem. If I do I'll raise and issue on the openHAB community

AJax2012 commented 6 years ago

I am having the same problem. It appears as though I have the commons-codec-1.6.jar file in /usr/share/openhab2/runtime/system/commons-codec/commons-codec/1.6/. I am running OpenHabian on a Raspberry Pi 3B. I updated the system, even though I just installed it last night...Any ideas?

AJax2012 commented 6 years ago

I got it working by copying the jar file to the addons directory.

BobRak commented 6 years ago

All:

I just built a new smartthings binding jar file which is available here. I did a clean install of OpenHabian on my Raspberry Pi. I am not seeing this issue now. Can you please install the new jar file and remove the old 2.2.0-SNAPSHOT jar and codec. Please do a reboot. And, let me know if this is resolved.

Thanks,

Bob