Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OSGI Version Upgrade (support building on JDK 17 and JDK 21) #2943

Comments

@YasasRangika
Copy link

Problem

Add support to building APIM on JDK 17 and JDK 21

Solution

OSGI Version Upgrade

Affected Component

APIM

Version

No response

Implementation

No response

Related Issues

No response

Suggested Labels

No response

@YasasRangika
Copy link
Author

[UPDATE]

I have successfully built the caron-kernel 4.9.x branch using JDK 17, after resolving the issues that arose during the process. Next, I built the carbon-apimgt branch with the new carbon-kernel version and the new version of axis2, after addressing the encountered issues. I am currently working on resolving OSGI issues while building the product-apim branch with JDK 17 and the aforementioned new versions.

@YasasRangika
Copy link
Author

YasasRangika commented Jun 19, 2024

[STATUS UPDATE]

I am still working on resolving OSGI issues in product-apim build that arose after upgrading the kernel and carbon-apimgt versions, which were built with JDK 17.

I was able to resolve the following issues in respective components to achieve a successful build status:

P2 plugin requires the Provide-Capability tag to be added to the manifest file of the bundle when an OSGi service is provided from the bundle. However, when the service is registered dynamically, this tag is not automatically added. To overcome this issue, I manually added the following classes to the corresponding components:

  • carbon-identity-framework:

    • org.wso2.carbon.identity.organization.management.service.OrganizationUserResidentResolverService
    • org.wso2.carbon.consent.mgt.core.ConsentManager
    • org.wso2.carbon.identity.application.authentication.framework.ApplicationAuthenticator
    • org.wso2.carbon.identity.claim.metadata.mgt.ClaimMetadataManagementService
    • org.wso2.carbon.identity.functions.library.mgt.FunctionLibraryManagementService
    • org.wso2.carbon.identity.user.profile.mgt.association.federation.FederatedAssociationManager
    • org.wso2.carbon.idp.mgt.IdpManager
    • org.wso2.carbon.identity.core.util.IdentityCoreInitializedEvent
  • carbon-governance:

    • org.wso2.carbon.registry.common.AttributeSearchService
    • org.wso2.carbon.registry.indexing.service.ContentSearchService
    • org.wso2.carbon.registry.indexing.service.TermsQuerySearchService
    • org.wso2.carbon.registry.indexing.service.TermsSearchService

Additionally, I made the required changes for identity-carbon-auth-saml2, identity-governance, identity-inbound-auth-oauth, and carbon-commons to resolve the issues that arose from these dependencies.

@YasasRangika
Copy link
Author

[STATUS UPDATE]

Added the required dependency version upgrades for the following branches so far. Some OSGi issues are still required to be fixed while building the product-APIM.

The affected branches are:

  • identity-governance
  • carbon-registry
  • carbon-identity-framework
  • maven-tools
  • identity-inbound-auth-oauth
  • identity-organization-management
  • identity-event-handler-notification
  • identity-event-handler-account-lock
  • wso2-axis2-transports

YasasRangika added a commit to YasasRangika/carbon-event-processing that referenced this issue Jul 3, 2024
YasasRangika added a commit to YasasRangika/identity-event-handler-notification that referenced this issue Jul 3, 2024
YasasRangika added a commit to YasasRangika/carbon-identity-framework-master that referenced this issue Jul 3, 2024
YasasRangika added a commit to YasasRangika/carbon-governance-public that referenced this issue Jul 3, 2024
YasasRangika added a commit to YasasRangika/identity-inbound-auth-oauth-1 that referenced this issue Jul 3, 2024
YasasRangika added a commit to YasasRangika/identity-carbon-auth-saml2 that referenced this issue Jul 3, 2024
YasasRangika added a commit to YasasRangika/identity-governance-1 that referenced this issue Jul 3, 2024
YasasRangika added a commit to YasasRangika/identity-governance-1 that referenced this issue Jul 3, 2024
YasasRangika added a commit to YasasRangika/carbon-commons that referenced this issue Jul 3, 2024
YasasRangika added a commit to YasasRangika/carbon-registry-public that referenced this issue Jul 3, 2024
YasasRangika added a commit to YasasRangika/wso2-axis2-transports that referenced this issue Jul 3, 2024
YasasRangika added a commit to YasasRangika/maven-tools that referenced this issue Jul 3, 2024
YasasRangika added a commit to YasasRangika/carbon-kernel-1 that referenced this issue Jul 3, 2024
YasasRangika added a commit to YasasRangika/apim-km-wso2is-1 that referenced this issue Jul 3, 2024
YasasRangika added a commit to YasasRangika/identity-organization-management that referenced this issue Jul 3, 2024
YasasRangika added a commit to YasasRangika/identity-outbound-auth-oidc that referenced this issue Jul 3, 2024
YasasRangika added a commit to YasasRangika/orbit-1 that referenced this issue Jul 3, 2024
YasasRangika added a commit to YasasRangika/carbon-analytics-common that referenced this issue Jul 3, 2024
@YasasRangika
Copy link
Author

[STATUS UPDATE]

In progress building product APIM branch with JDK17, resolving the missing classes by adding the provide-capability tag to the identified code repositories.

Tracked all the changes and PRs in [1].

[1] https://docs.google.com/spreadsheets/d/1ElOQFXoS1D6lSlxS_ROChEvBspTlgK0byhvkTerOEUQ/edit?usp=sharing

YasasRangika added a commit to YasasRangika/carbon-apimgt that referenced this issue Jul 8, 2024
YasasRangika added a commit to YasasRangika/carbon-identity-framework-master that referenced this issue Jul 8, 2024
YasasRangika added a commit to YasasRangika/identity-carbon-auth-saml2 that referenced this issue Jul 8, 2024
YasasRangika added a commit to YasasRangika/carbon-mediation-1 that referenced this issue Jul 8, 2024
YasasRangika added a commit to YasasRangika/product-apim that referenced this issue Jul 8, 2024
YasasRangika added a commit to YasasRangika/carbon-apimgt that referenced this issue Jul 8, 2024
@nandika nandika added this to the APIM 4.5.0 milestone Jul 23, 2024
@hisanhunais
Copy link

[STATUS UPDATE]

  • Fetched all the PR changes sent by Yasas and built all the components.
  • Faced an issue when building the maven-tools repo due a missing package. Had to change the import statement to add the proper package.
  • Currently, facing an issue as follows when building the product-apim repo.
Cannot complete the install because one or more required items could not be found.
	Software being installed: WSO2 Carbon - Api Management Feature 9.29.160.SNAPSHOT (org.wso2.carbon.apimgt.feature.group 9.29.160.SNAPSHOT)
	Missing requirement: org.wso2.carbon.apimgt.impl 9.29.160.SNAPSHOT (org.wso2.carbon.apimgt.impl 9.29.160.SNAPSHOT) requires 'java.package; org.eclipse.osgi.services [3.12.0,3.13.0)' but it could not be found
	Cannot satisfy dependency:
		From: WSO2 Carbon - Api Management Feature 9.29.160.SNAPSHOT (org.wso2.carbon.apimgt.feature.group 9.29.160.SNAPSHOT)
		To: org.eclipse.equinox.p2.iu; org.wso2.carbon.apimgt.keymanager.feature.group [9.29.160.SNAPSHOT,9.29.160.SNAPSHOT]
	Cannot satisfy dependency:
		From: WSO2 Carbon - Api Management Key Manager Feature 9.29.160.SNAPSHOT (org.wso2.carbon.apimgt.keymanager.feature.group 9.29.160.SNAPSHOT)
		To: org.eclipse.equinox.p2.iu; org.wso2.carbon.apimgt.impl [9.29.160.SNAPSHOT,9.29.160.SNAPSHOT]

@hisanhunais
Copy link

[STATUS UPDATE]

  • Removed the org.eclipse.osgi.services from the relevant repos. This solved the issue mentioned above. But need to verify whether that jar is required.
  • Proceeding forward, faced several issues as shown below.
Missing requirement: org.wso2.carbon.apimgt.broker.lifecycle 9.29.160.SNAPSHOT (org.wso2.carbon.apimgt.broker.lifecycle 9.29.160.SNAPSHOT) requires 'osgi.service; (objectClass=org.wso2.carbon.andes.service.QpidService)' but it could not be found
  • This issue requires adding these services to the <Provide-Capability> tag in the relevant pom files.
  • Added the required services and moved forward. Still facing similar issues. Need to identify all of these and do the changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment