Expand my Community achievements bar.

problem with properties in osgi:config node

Avatar

Level 9

Hi All,

One of our scheduler is unable to read one property from osgi:config node.Due to this behavior we schedule is not working as expected.

Any one has any idea how to fix this problem?

Thanks,

Kishore

5 Replies

Avatar

Administrator

Hi 

Did you try this community article :

Link:- https://helpx.adobe.com/experience-manager/using/osgi_config.html

// Reading Adobe Experience Manager OSGi Configuration Values

 

Similar old post:- http://help-forums.adobe.com/content/adobeforums/en/experience-manager-forum/adobe-experience-manage...

// How to read property from OSGI configuration in AEM

ou can use ConfigurationAdmin and get the properties using pid of the service from where you need to read the properties

ex:

@Reference

Private ConfigurationAdmin config;

Configuration config = configAdmin.getConfiguration(<pid>);

 

I hope this would help you.

~kautuk



Kautuk Sahni

Avatar

Level 9

My OSGI config has 5 properties and i am retrieving all the in the same way but is there a reason why the one property is not read when scheduler is ready to run?

The piece of code is working in other environments.How to debug this issue?

Thanks,

Kishore

Avatar

Level 4

You may try the following options.

  1. Verify the configuration in config screen.
  2. Verify if the configurations are updated in the config node as well.
  3. Put additional loggers while reading each property in your code.

Please revert with possible error message or screenshot if my response didn't help or mark solved if it helped!

Avatar

Community Advisor
  • Please delete the configuration and create it again.
  • Assure that you are using the right type (String, INT value etc). Both while setting and retreiving the value

 


Aanchal Sikka

Avatar

Community Advisor

Check the timezone of the box and then make sure you have set the scheduler expression accordingly.

If its a recurring execution, then you will need to put the logs at the method entry point and see if it is getting triggered or not.

- Runal