I have an ubuntu 14.04 installation and have running Openhab 1.0 with rfxcom. However, when I try openhab 2.0, I am not able to connect at all to the usb device (/dev/ttyUSB0). The exception that is thrown indicates that some libraries are not found. I am not able to find the solution for this. From the code in the RFXComSerialConnect line 178, it seems to be that it is able to connect to the device and read some data, but not able to convert the data… Can somebody help me out with this?
openhab> Exception in thread “Thread-39” java.lang.NoClassDefFoundError: javax/xml/bind/DatatypeConverter
at org.openhab.binding.rfxcom.internal.connector.RFXComSerialConnector$SerialReader.run(RFXComSerialConnector.java:178)
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.DatatypeConverter cannot be found by org.openhab.binding.rfxcom_2.0.0.b1
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:432)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:345)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:337)
at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:160)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
… 1 more
thanks for the quick reply. Not sure if you mean this, but I did update the binding in the .things file as below. I also installed libjaxb-api-java package. and passed the class path -> sudo ./start_debug.sh -cp /usr/share/java
If i change the name of the device to a non existing device, there is no such error and it complains at startup that the connection failed… with the settings below it doesn’t give a connection error… but the class not found error.
my .things config
Bridge rfxcom:bridge:usb0 [ serialPort="/dev/ttyUSB0" ] {
Thing temperature 12046 [deviceId=“12046”, subType=“TFA_TS34C__CRESTA”]
}
This is weird. I thought I had tested and fixed them all, but it seems that my commit got somehow lost
Would be great if you could send PRs for all problems that you find - thanks!
thanks for the quick fix. Not sure though but it looked like the latest build (73) didn’t include the changes. after modifying the manifest myself, it works. thanks.
I think I see something else that goes wrong. It looks like that the auto detection of the usb devices fails. Manually adding the rfxcom binding works. I will check open PRs. If nothing shows up I will make a PR for it tomorrow. thanks