-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HTTP Bug #115
Comments
Hi @Prometheus89, As you say, it seems that the JVM is using the Apache APIs included in the If you are not using Android, you don't need to include that library in the classpath, you just need to have the following ones: Hope this helps! Regards, |
Hey Ruben, thanks for the quick reply. I don't know if you can change the transitive behaviour on your side. It might be worth thinking about it, because it can take a lot of time to figure out, that you might have dependency collisions with other packages you did not specifically included. (It took me about 2 days to figure that out) Regards, |
Glad to hear that! Yes, we will fix that behavior for the next release. Sorry for the inconvenience. Regards, |
Hello,
I have encountered a weird bug when using the XBeeJavaLibrary and HTTP. I am developing an application with an XBee connected to a PC that is supposed to collect data from some sensors. The data should be persisted in a remote database (Apache Jena) which I have to use HTTP for. Usually that should not be the problem since the database API offers some nice abstractions, which at the end wraps up and HTTP Post and sends it to the database.
If I want to use that abstraction, or any of Apache HTTP for that matter, the implementation does not work because of a runtime error stating the message "Stub!". After some debugging it turns out that by default the HTTP implementation from Apache located in the android sdk that is shipped with the xbee library is used, instead of the one I am providing through gradle. And in that (android) implementation the classes used in the PC-version of the HTTP library are all deprecated and just throw a runtime exception as a hint that they are deprecated.
When looking deeper into the code it turns out that at some point the types are pointing towards the android sdk. The imports in those classes just point to "org.apache...". At this point the JVM behaves silly: since there are technically two packages with the same name in the classpath it just resovles the first one, in my case the android one, since it is located in a "com" package rather then a "org" package. Does this mean that you can not use the xbee library with anything that it might collide with in the android sdk?
I really like the XBee devices and the library, since there are easy to use, which makes it handy when it comes to teaching (I am working at an embedded systems departement at a university). I have used the last version of the library before and I would like to continue using it, but not having the ability to use HTTP kind of defeats the purpose, especially in an Internet of Things context.
Do you have any suggestions, help insights?
Regards,
Prometheus
The text was updated successfully, but these errors were encountered: