Imported OSGi JDBC configuration not working | Community
Skip to main content
Martin-Nekula
Level 2
October 6, 2024
Solved

Imported OSGi JDBC configuration not working

  • October 6, 2024
  • 2 replies
  • 694 views

I tried to import a JDBC config from another AEM instance into /apps/system/config/ via Package Manager, but it seems it is not recognized even afer server restart. I can see it in the configuration page, but not directly under the Day Commons JDBC Connection Pool, like other JDBC configurations that were created manually.

Can anyone give me a hint, what is needed? When I open the jcr_content file, the attributes look the same as in the valid configurations already present.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by MukeshYadav_

Hi @martin-nekula ,

Adding via package might not work, so try to add/create under Day Commons JDBC Connections Pool manually or build and deploy via code(by allowing in vault filter)

Reference https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/aem-6-5-adding-custom-factory-configuration-for-cors-does-not/m-p/321577

Or you may try to refresh bundle once.

Thanks 

2 replies

MukeshYadav_
Community Advisor
MukeshYadav_Community AdvisorAccepted solution
Community Advisor
October 7, 2024

Hi @martin-nekula ,

Adding via package might not work, so try to add/create under Day Commons JDBC Connections Pool manually or build and deploy via code(by allowing in vault filter)

Reference https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/aem-6-5-adding-custom-factory-configuration-for-cors-does-not/m-p/321577

Or you may try to refresh bundle once.

Thanks 

Martin-Nekula
Level 2
October 14, 2024

Thank You, manually works of course, but we will try to change the deployment to code and keep it in version control if that is the recommended way.

ambersingh121
Level 2
October 7, 2024

Hi @martin-nekula 

Your JDBC connection pool config is not getting picked up due to incorrect naming convention. Notice the tilde sign in between the PID.

 

This means OSGI is not recognizing this as a JDBC connection pool config and that is why it is not appearing below "Day Commons JDBC Connection Pool" along with other JDBC configs.

 

To overcome this, you can try renaming your config in CRX (/apps/system/config). Just put a tilde sign (~) before the unique identifier begins.

 

e.g.
com.day.commons.datasource.jdbcpool.JdbcPoolService~0b6e7108-9542-44ea-bc13-7969a49bb962.config

 

Of course, this is just a workaround, correct solution would be to deploy this config via code or create manually.

 

Regards,

Amber