Expand my Community achievements bar.

SOLVED

Localhost AEM throws error: Use 'service.ranking:Integer' as the key

Avatar

Level 5

Hello friends, I have a Brightcove third party that when I was using my old version of AEM on localhost I could build the project locally with no problems, but now that I upgraded my local AEM both the JDK and SDK I get the following error now

[ERROR] The analyser found the following errors for author and publish :
[ERROR] [configurations-basic] Configuration org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended~brightcove_admin: Service.ranking is not of type Integer. Use 'service.ranking:Integer' as the key. (com.tfs:aem-tfs-project.all:0.0.1-SNAPSHOT|com.coresecure:brightcove.all:6.1.10|com.coresecure:brightcove.ui.config:6.1.10)

The versions of the update are the next one:

JDK: Oracle JDK 21.0.6

SDK: AEM SDK v2025.1.19149.20250116T154450Z-250100

I modified the file of the configuration:

org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended-brightcove_admin.cfg.json

With the next code:

{
  "service.ranking:Integer": "0",
  "user.mapping": [
      "brightcove.core:brightcoveWrite=[brightcove_admin]"
  ]
}
And even with that still happend the same issue, what can else I can do?

I even tried to do the next modifications and still not working:
"service.ranking:Integer": "0"

"service.ranking": "0"

"service.ranking:Integer": 0

"service.ranking": 0
Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Level 4

Hi @Aaron_Dempwolff 

 

Can you let me know the reason for keeping the ranking of this service? Are there multiple similar Brightcove services already present? since this is going to be unique you can simply remove the service.ranking from here.

 

Please refer to https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/security/best-pr... for best practices.

View solution in original post

4 Replies

Avatar

Level 7

1. Try changing the config format: If you're using a .cfg.json file, switch to a .config file instead, as AEM might interpret it better.

2. Check for any formatting issues in your JSON and ensure the service config is correct.

3. Restart AEM and clear the OSGi cache to reload the configuration.

4. Check compatibility between your new AEM version and the Brightcove integration (make sure the version you're using is compatible with AEM 2025). 

5. Directly set the integer without quotes:

{
  "service.ranking:Integer": 0,
  "user.mapping": [
    "brightcove.core:brightcoveWrite=[brightcove_admin]"
  ]
}

6. Ensure AEM is actually refreshing the configuration after changes. Sometimes AEM caches configurations, so after modifying the files, restarting the AEM instance and clearing the OSGi cache is key.

Avatar

Level 4

hi @Aaron_Dempwolff ,

Hope you have already found the solution for the same. If not please check the below link and the example class below if it helps

 

 

 

Small note: it's possible to define service.ranking property in the @Component annotation when you manage this component code. However, @Aaron_Dempwolff is talking about creating of OSGi configuration for Sling OOTB OSGi component. It is impossible to modify java code for that service.

Avatar

Correct answer by
Level 4

Hi @Aaron_Dempwolff 

 

Can you let me know the reason for keeping the ranking of this service? Are there multiple similar Brightcove services already present? since this is going to be unique you can simply remove the service.ranking from here.

 

Please refer to https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/security/best-pr... for best practices.