Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » OM2M » Error in OSGi console(OM2M, OSGi, Linux Debian)
Error in OSGi console [message #1741142] Tue, 23 August 2016 10:36 Go to next message
Trung Luu is currently offline Trung LuuFriend
Messages: 32
Registered: June 2016
Member
Hi all,

I'm currently running OM2M on Linux Debian, when I want to type an URI of get Notification on the OSGi console with the code:
String addr2 = "/" + CSE_ID + "/" + CSE_NAME + "/" + actuatorId + "/" + DATA2;
Subscription sub2 = new Subscription();
Scanner key2 = new Scanner(System.in);
System.out.println("insert getNotification IP address: ");
String a2 = key2.nextLine();
System.out.println(a2);
//String a2 = "http://127.0.0.1:1402/monitor2";
sub2.getNotificationURI().add(a2);
sub2.setNotificationContentType(BigInteger.valueOf(2));
RequestSender.createSubscription(addr2,SUB2,sub2);

The error shows that the command is not found as the figure below:
index.php/fa/26843/0/

Does anyone used to solve this problem? Thanks in advanced!

[Updated on: Tue, 23 August 2016 10:37]

Report message to a moderator

Re: Error in OSGi console [message #1741910 is a reply to message #1741142] Tue, 30 August 2016 14:35 Go to previous messageGo to next message
Francois AissaouiFriend
Messages: 38
Registered: April 2015
Member
Hi,

Since the configuration we made uses the Equinox Console of OSGi, the stdin buffer is not accessible for application to be read.
I do not know how to make Equinox Console gives the hand to another plugin for stdin...

For this kind of configuration, you should use directly a configuration file instead of requesting the information from the user with stdin.
This is a good practice for OSGi use I believe.

Regards,
François
Re: Error in OSGi console [message #1741918 is a reply to message #1741910] Tue, 30 August 2016 14:49 Go to previous message
Trung Luu is currently offline Trung LuuFriend
Messages: 32
Registered: June 2016
Member
Hi François,
I tried to used the temporary way to solve this problem and it worked fine. I created the JFrame with textField to type the URI. I hope it is useful for anyone need it. Thanks for your reply François.

Best Regards,
Trung
Previous Topic:Router internal error when running in-cse
Next Topic:Error code 4103 and 5000 when receiving notification response
Goto Forum:
  


Current Time: Sun Sep 23 08:04:26 GMT 2018

Powered by FUDForum. Page generated in 0.01547 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top