Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Kura » ConfigurableExample service isn't showed in Kura Web UI
ConfigurableExample service isn't showed in Kura Web UI [message #1716588] Sat, 05 December 2015 15:36 Go to next message
Paolo Patierno is currently offline Paolo PatiernoFriend
Messages: 17
Registered: December 2015
Junior Member

Hello,
I followed the hello example from the Kura documentation and it seems to work fine.
I followed the configurable example but I'm in troubles.

The configurable example service isn't showed in the Kura services Web UI.

The strange thing is that I can see the bundle in the Active state (from Device -> Bundles menu) but I can't see in the console the message printed by the logger instance as provided by the class implementation.
So ... the bundle is active but the active() method isn't executed ?
I'm using the emulator.
The active() method of hello example works fine.

I can't see any error.

What's the problem ?

Thanks,
Paolo.
Re: ConfigurableExample service isn't showed in Kura Web UI [message #1716707 is a reply to message #1716588] Mon, 07 December 2015 16:16 Go to previous messageGo to next message
David Woodard is currently offline David WoodardFriend
Messages: 420
Registered: July 2014
Senior Member
Hi Paolo,

If you are running the emulator, please go to the Eclipse IDE Console window and press 'enter'. This should bring up an 'osgi>' prompt. From the prompt enter the 'ls' command and paste the results to the forum. We need to make sure your configurable example is satisfied and being exposed as a service.

Thanks,
--Dave
Re: ConfigurableExample service isn't showed in Kura Web UI [message #1716733 is a reply to message #1716707] Mon, 07 December 2015 20:42 Go to previous messageGo to next message
Paolo Patierno is currently offline Paolo PatiernoFriend
Messages: 17
Registered: December 2015
Junior Member

Hi Dave,
thanks for your reply. I noticed the following ...

If the configuration policy of the ConfigurableExample is set to "require" as documentation describes, this is the output of "ls" command.
As you can see the service is in the list with Unsatisfied state.

ID State Component Name Located in bundle
1 Unsatisfied org.eclipse.kura.example.configurable org.eclipse.kura.example.configurable(bid=1)
2 Active org.eclipse.kura.deployment.agent org.eclipse.kura.deployment.agent(bid=2)
3 Active org.eclipse.kura.data.DataService org.eclipse.kura.core(bid=4)
4 Active org.eclipse.kura.db.DbService org.eclipse.kura.core(bid=4)
5 Active org.eclipse.kura.core.data.transport.mqtt.MqttDataTransport org.eclipse.kura.core(bid=4)
6 Active org.eclipse.kura.ssl.SslManagerService org.eclipse.kura.core(bid=4)
7 Active org.eclipse.kura.system.SystemService org.eclipse.kura.core(bid=4)
8 Active org.eclipse.kura.system.SystemAdminService org.eclipse.kura.core(bid=4)
9 Active org.eclipse.kura.emulator.Emulator org.eclipse.kura.emulator(bid=9)
10 Active org.eclipse.kura.watchdog.WatchdogService org.eclipse.kura.emulator(bid=9)
11 Active org.eclipse.kura.position.PositionService org.eclipse.kura.emulator(bid=9)
12 Active org.eclipse.kura.clock.ClockService org.eclipse.kura.emulator(bid=9)
13 Active org.eclipse.kura.net.NetworkService org.eclipse.kura.emulator(bid=9)
14 Active org.eclipse.kura.usb.UsbService org.eclipse.kura.emulator(bid=9)
15 Active org.eclipse.kura.cloud.CloudService org.eclipse.kura.core.cloud(bid=11)
16 Active org.eclipse.kura.cloud.CloudCallService org.eclipse.kura.core.cloud(bid=11)
17 Active org.eclipse.kura.cloud.app.command.CommandCloudApp org.eclipse.kura.core.cloud(bid=11)
18 Active org.eclipse.kura.web.Console org.eclipse.kura.web(bid=14)
19 Active org.eclipse.kura.configuration.ConfigurationService org.eclipse.kura.core.configuration(bid=15)
20 Active org.eclipse.kura.status.CloudConnectionStatusService org.eclipse.kura.linux.status(bid=23)
21 Active org.eclipse.kura.certificate.CertificatesService org.eclipse.kura.core.certificates(bid=36)
22 Active org.eclipse.equinox.event org.eclipse.equinox.event(bid=38)
23 Active org.eclipse.kura.crypto.CryptoService org.eclipse.kura.core.crypto(bid=49)
24 Active org.eclipse.kura.gpio.GPIOService org.eclipse.kura.emulator.gpio(bid=50)
25 Active org.eclipse.kura.core.comm.CommConnectionFactory org.eclipse.kura.core.comm(bid=51)
26 Active org.eclipse.kura.example.hello_osgi org.eclipse.kura.example.hello_osgi(bid=53)
27 Active org.eclipse.kura.demo.heater.Heater org.eclipse.kura.demo.heater(bid=54)

If I leave empty the configuration policy in the component.xml, the ConfigurableExample is activated as you can see (Active state) :

All Components:
ID State Component Name Located in bundle
1 Active org.eclipse.kura.example.configurable org.eclipse.kura.example.configurable(bid=1)
2 Active org.eclipse.kura.deployment.agent org.eclipse.kura.deployment.agent(bid=2)
3 Active org.eclipse.kura.data.DataService org.eclipse.kura.core(bid=4)
4 Active org.eclipse.kura.db.DbService org.eclipse.kura.core(bid=4)
5 Active org.eclipse.kura.core.data.transport.mqtt.MqttDataTransport org.eclipse.kura.core(bid=4)
6 Active org.eclipse.kura.ssl.SslManagerService org.eclipse.kura.core(bid=4)
7 Active org.eclipse.kura.system.SystemService org.eclipse.kura.core(bid=4)
8 Active org.eclipse.kura.system.SystemAdminService org.eclipse.kura.core(bid=4)
9 Active org.eclipse.kura.emulator.Emulator org.eclipse.kura.emulator(bid=9)
10 Active org.eclipse.kura.watchdog.WatchdogService org.eclipse.kura.emulator(bid=9)
11 Active org.eclipse.kura.position.PositionService org.eclipse.kura.emulator(bid=9)
12 Active org.eclipse.kura.clock.ClockService org.eclipse.kura.emulator(bid=9)
13 Active org.eclipse.kura.net.NetworkService org.eclipse.kura.emulator(bid=9)
14 Active org.eclipse.kura.usb.UsbService org.eclipse.kura.emulator(bid=9)
15 Active org.eclipse.kura.cloud.CloudService org.eclipse.kura.core.cloud(bid=11)
16 Active org.eclipse.kura.cloud.CloudCallService org.eclipse.kura.core.cloud(bid=11)
17 Active org.eclipse.kura.cloud.app.command.CommandCloudApp org.eclipse.kura.core.cloud(bid=11)
18 Active org.eclipse.kura.web.Console org.eclipse.kura.web(bid=14)
19 Active org.eclipse.kura.configuration.ConfigurationService org.eclipse.kura.core.configuration(bid=15)
20 Active org.eclipse.kura.status.CloudConnectionStatusService org.eclipse.kura.linux.status(bid=23)
21 Active org.eclipse.kura.certificate.CertificatesService org.eclipse.kura.core.certificates(bid=36)
22 Active org.eclipse.equinox.event org.eclipse.equinox.event(bid=38)
23 Active org.eclipse.kura.crypto.CryptoService org.eclipse.kura.core.crypto(bid=49)
24 Active org.eclipse.kura.gpio.GPIOService org.eclipse.kura.emulator.gpio(bid=50)
25 Active org.eclipse.kura.core.comm.CommConnectionFactory org.eclipse.kura.core.comm(bid=51)
26 Active org.eclipse.kura.example.hello_osgi org.eclipse.kura.example.hello_osgi(bid=53)
27 Active org.eclipse.kura.demo.heater.Heater org.eclipse.kura.demo.heater(bid=54)

However in both cases it doesn't appear in the Kura Web UI.
Any idea ?

Thanks,
Paolo.
Re: ConfigurableExample service isn't showed in Kura Web UI [message #1716876 is a reply to message #1716733] Tue, 08 December 2015 17:56 Go to previous messageGo to next message
David Woodard is currently offline David WoodardFriend
Messages: 420
Registered: July 2014
Senior Member
Hi Paolo,

For this you want the configuration policy to be "required". The issue appears that ConfigurationAdmin can't find your metatype XML. Did you create all the directories and xml files from the tutorial in your bundle? It should look something like:

/META-INF
/META-INF/MANIFEST.MF
/OSGI-INF
/OSGI-INF/metatype
/OSGI-INF/metatype/org.eclipse.kura.example.configurable.ConfigurableExample.xml
/OSGI-INF/component.xml

The step about including the OSGI-INF directory in your build.xml file is also very important. You should be able to compare your example with the org.eclipse.kura.example.heater project. The two setups should be nearly identical except for the namespace.

Thanks,
--Dave
Re: ConfigurableExample service isn't showed in Kura Web UI [message #1716878 is a reply to message #1716876] Tue, 08 December 2015 17:58 Go to previous messageGo to next message
Paolo Patierno is currently offline Paolo PatiernoFriend
Messages: 17
Registered: December 2015
Junior Member

It's what I have done. It seems that the two projects are identical Sad
For this reason it's driving me crazy !

I can't find a reason why ConfigurableExample doesn't work properly.
Re: ConfigurableExample service isn't showed in Kura Web UI [message #1716881 is a reply to message #1716878] Tue, 08 December 2015 18:21 Go to previous messageGo to next message
David Woodard is currently offline David WoodardFriend
Messages: 420
Registered: July 2014
Senior Member
Hi Paolo,

It is almost certainly a typo somewhere. Can you attach your XML files or, preferably, send a link to a Github site with your source files?

Thanks,
--Dave
Re: ConfigurableExample service isn't showed in Kura Web UI [message #1716885 is a reply to message #1716881] Tue, 08 December 2015 19:24 Go to previous messageGo to next message
Paolo Patierno is currently offline Paolo PatiernoFriend
Messages: 17
Registered: December 2015
Junior Member

For sure ... I agree with you ... there is something I'm missing.
Attached the XML files and the manifest.

Thanks for your help.
Re: ConfigurableExample service isn't showed in Kura Web UI [message #1716996 is a reply to message #1716885] Wed, 09 December 2015 14:07 Go to previous messageGo to next message
Benjamin Cabé is currently offline Benjamin CabéFriend
Messages: 201
Registered: July 2009
Location: Toulouse, France
Senior Member

Please make sure that your packaged bundle actually contains the resources in the OSGI-INF folder.
Your build.properties should contain a bin.includes entry along the lines of:

bin.includes = META-INF/,\
               .,\
               OSGI-INF/


[Updated on: Wed, 09 December 2015 14:07]

Report message to a moderator

Re: ConfigurableExample service isn't showed in Kura Web UI [message #1717004 is a reply to message #1716996] Wed, 09 December 2015 15:00 Go to previous messageGo to next message
Paolo Patierno is currently offline Paolo PatiernoFriend
Messages: 17
Registered: December 2015
Junior Member

The build.properties is the following :

output.. = bin/
bin.includes = META-INF/,\
               .,\
               OSGI-INF/
source.. = src/
additional.bundles = org.eclipse.osgi.services,\
                     slf4j.api,\
                     org.eclipse.kura.api
Re: ConfigurableExample service isn't showed in Kura Web UI [message #1717013 is a reply to message #1716733] Wed, 09 December 2015 15:23 Go to previous messageGo to next message
Benjamin Cabé is currently offline Benjamin CabéFriend
Messages: 201
Registered: July 2009
Location: Toulouse, France
Senior Member

Paolo Patierno wrote on Mon, 07 December 2015 21:42
Hi Dave,
thanks for your reply. I noticed the following ...

If the configuration policy of the ConfigurableExample is set to "require" as documentation describes, this is the output of "ls" command.
As you can see the service is in the list with Unsatisfied state.

ID State Component Name Located in bundle
1 Unsatisfied org.eclipse.kura.example.configurable org.eclipse.kura.example.configurable(bid=1)


typing comp 1 (or whichever is the ID of the bogus component) may give you more hints on what's actually wrong.
I would suggest you do as Dave said and provide us with a link to a git repo with the full code, as that may help tremendously narrow down the problem.


Re: ConfigurableExample service isn't showed in Kura Web UI [message #1717021 is a reply to message #1717013] Wed, 09 December 2015 16:00 Go to previous messageGo to next message
Paolo Patierno is currently offline Paolo PatiernoFriend
Messages: 17
Registered: December 2015
Junior Member

I have just created a temporary GitHub project :

https://github.com/ppatierno/kura_temp/tree/master/org.eclipse.kura.example.configurable

Thank you very much for your help !
Re: ConfigurableExample service isn't showed in Kura Web UI [message #1717520 is a reply to message #1717021] Mon, 14 December 2015 14:27 Go to previous messageGo to next message
David Woodard is currently offline David WoodardFriend
Messages: 420
Registered: July 2014
Senior Member
Hi Paolo,

I was able to get your example running. It is a simple typo, but probably not well described in the tutorial. The issue is in the 'name' field of your component.xml file. The 'name' field must match the id specified in the configuration file. You 'name' field was set to:

org.eclipse.kura.example.configurable

It should be set to:

org.eclipse.kura.example.configurable.ConfigurableExample

I think if you make this change, the example should work for you.

Thanks,
--Dave
Re: ConfigurableExample service isn't showed in Kura Web UI [message #1717534 is a reply to message #1717520] Mon, 14 December 2015 15:32 Go to previous messageGo to next message
Paolo Patierno is currently offline Paolo PatiernoFriend
Messages: 17
Registered: December 2015
Junior Member

Now it works !

Thank you very much David Wink
Re: ConfigurableExample service isn't showed in Kura Web UI [message #1721685 is a reply to message #1717520] Fri, 29 January 2016 08:11 Go to previous messageGo to next message
Abel Gr is currently offline Abel GrFriend
Messages: 13
Registered: January 2016
Junior Member
Hi Dave,

I have the same problem with Paolo ( can't show this example on GUI web kura)
But my component.xml still right name as your said.
here is my code on github:
https://github.com/hptphuong/IOT_Gateway/tree/master/org.eclipse.kura.example.configurable
Please help me solve it.
Thank a lot
Re: ConfigurableExample service isn't showed in Kura Web UI [message #1721835 is a reply to message #1721685] Sun, 31 January 2016 21:49 Go to previous messageGo to next message
David Woodard is currently offline David WoodardFriend
Messages: 420
Registered: July 2014
Senior Member
Hello,

The project looks ok. Can you please use the OSGi console and provide the output of these two commands:

ss
ls

Thanks,
--Dave
Re: ConfigurableExample service isn't showed in Kura Web UI [message #1721846 is a reply to message #1721835] Mon, 01 February 2016 03:26 Go to previous messageGo to next message
Abel Gr is currently offline Abel GrFriend
Messages: 13
Registered: January 2016
Junior Member
Thank Dave,
I found out what is the problems.
I try to save component.xml with:
-Configuration policy: require
- Check box option: This component is enabled when started & This component is immedieately actived.

But it's not really save to my component.xml.

I try to re-saved it again. And it's ok.

Thank you very much, Dave.

Re: ConfigurableExample service isn't showed in Kura Web UI [message #1782637 is a reply to message #1716588] Tue, 27 February 2018 10:07 Go to previous message
Ahmed Gharssellaoui is currently offline Ahmed GharssellaouiFriend
Messages: 31
Registered: February 2018
Member
Hi guys,

I have the same issue,
I installed the package following the configurable example in the documentation but nothing appeared in my Wed UI.
Previous Topic:Kura Username/Password Change
Next Topic:I can't import JDK.dio to my project
Goto Forum:
  


Current Time: Thu Dec 12 15:19:37 GMT 2024

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

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

Back to the top