Hi everyone,
I am testing simpleserver and simpleclient, they work fine, but when I run simpleserver in debug mode, it shows some error, I don't know what they meant. But if they are tagged as ERROR, I want to know more about them. PART I 45:26.707 ERROR: SRM-PSI: FindSVRDatabaseSize failed 45:26.707 DEBUG: SRM-DOXM: GetDoxmToDefault 45:26.707 ERROR: SRM-PSI: FindSVRDatabaseSize failed 45:26.707 ERROR: SRM-PSI: jsonSVRDbStr is NULL 45:26.707 INFO: OIC_RI_STACK: Entering OCCreateResource 45:26.707 INFO: OIC_RI_STACK: Added type oic.sec.doxm to /oic/sec/doxm 45:26.707 INFO: OIC_RI_STACK: Binding oic.mi.def interface to /oic/sec/doxm 45:26.707 INFO: OIC_RI_STACK: Binding oic.if.baseline interface to /oic/sec/doxm 45:26.707 ERROR: SRM-PSI: FindSVRDatabaseSize failed 45:26.707 INFO: OIC_RI_STACK: Entering OCCreateResource 45:26.707 INFO: OIC_RI_STACK: Added type oic.sec.pstat to /oic/sec/pstat 45:26.707 INFO: OIC_RI_STACK: Binding oic.mi.def interface to /oic/sec/pstat 45:26.707 INFO: OIC_RI_STACK: Binding oic.if.baseline interface to /oic/sec/pstat 45:26.707 ERROR: SRM-PSI: FindSVRDatabaseSize failed What does it means by SRM-PSI? Why FindSVRDatabaseSize failed? What database are we talking about, a JSON file? PART II 45:26.707 INFO: OIC_RI_STACK: Added type oic.wk.p to /oic/p 45:26.707 INFO: OIC_RI_STACK: Binding oic.if.baseline interface to /oic/p 45:26.707 INFO: OIC_RI_STACK: Binding oic.if.r interface to /oic/p 45:26.707 ERROR: SRM-AMSMGR: FreeCARequestInfo: Can't free memory. Received NULL requestInfo What does it means by SRM-AMSMGR? FreeCARequestInfo is there a memory management problem in simpleserver code? PART III 45:26.715 INFO: OIC_RI_OBSERVE: Resource has no observers 45:26.715 INFO: OIC_RI_STACK: Deleting resource /oic/d 45:26.715 INFO: OIC_RI_STACK: Notifying all observers 45:26.715 INFO: OIC_RI_OBSERVE: Entering SendObserverNotification 45:26.715 INFO: OIC_RI_OBSERVE: Resource has no observers 45:26.715 INFO: OIC_RI_STACK: Deleting resource /oic/p 45:26.715 INFO: OIC_RI_STACK: Notifying all observers 45:26.715 INFO: OIC_RI_OBSERVE: Entering SendObserverNotification 45:26.715 INFO: OIC_RI_OBSERVE: Resource has no observers 45:26.715 INFO: OIC_RI_STACK: Deleting resource /a/light 45:26.715 INFO: OIC_RI_STACK: Notifying all observers 45:26.715 INFO: OIC_RI_OBSERVE: Entering SendObserverNotification 45:26.715 INFO: OIC_RI_OBSERVE: Resource has no observers 45:26.715 ERROR: OIC_RI_STACK: Resource not found Why is the server deleting resource with no observers? What is OIC_RI_STACK resource not found error? That's all the error I've got from simpleserver. About generic support, I have done some testing Petre's branch (https://gerrit.iotivity.org/gerrit/#/c/7895/). Thank you for the contribution, this branch works. There is a minor problem when I run simpleserver (generic Java), it stops right after "All created resources have been registered". I looked at the code and compare it to the C++ simpleserver, the C++ simpleserver use a cv.wait(.) to keep the server alive. So I thought maybe Java simpleserver needs to add a waiting mechanism too? I have come up with a band-aid solution, but we should probably not call static method from an object instance, but anyway, here it is. Modify main() method in SimpleServer.java public static void main(String[] args){ SimpleServer svr = new SimpleServer(); svr.startSimpleServer(); synchronized(svr){ //acquire a lock, wait on it, should behavior like cv.wait() in C++ svr.wait(); } } A point to discuss, I have run simpleserver (C++), and it uses a argument to choose 1 out of 4 modes to run. Right now the Java example only have 1 mode, I guess it is "Non-secure and notify all observers". Would it be better if we align all examples for all support platforms? (Android, Java, C++, etc) -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20160621/df78c964/attachment.html>
