Search code examples
wso2wso2-identity-server

WSO2 Identity Server 6.1


I recently compiled the WSO2 Identity server from source and trying to start the service. But I am observing lots of erros related to OSGI bundles like


2023-08-02 16:21:29,126] [] ERROR {Events.Framework} - FrameworkEvent ERROR org.osgi.framework.BundleException: Could not resolve module: org.wso2.identity.apps.common [515]
  Unresolved requirement: Import-Package: org.wso2.carbon.identity.oauth; version="[6.1.0,7.0.0)"
    -> Export-Package: org.wso2.carbon.identity.oauth; bundle-symbolic-name="org.wso2.carbon.identity.oauth"; bundle-version="6.11.21"; version="6.11.21"; uses:="com.nimbusds.jwt,org.apache.commons.logging,org.wso2.carbon.core,org.wso2.carbon.core.common,org.wso2.carbon.identity.application.authentication.framework.model,org.wso2.carbon.identity.application.common,org.wso2.carbon.identity.application.common.model,org.wso2.carbon.identity.base,org.wso2.carbon.identity.oauth.dao,org.wso2.carbon.identity.oauth.dto,org.wso2.carbon.identity.oauth2,org.wso2.carbon.identity.oauth2.model,org.wso2.carbon.identity.openidconnect.model,org.wso2.carbon.user.core"
       org.wso2.carbon.identity.oauth [345]
         Unresolved requirement: Import-Package: waffle.util; version="[1.6.0,2.0.0)"
  Unresolved requirement: Import-Package: org.wso2.carbon.identity.oauth.dto; version="[6.1.0,7.0.0)"
    -> Export-Package: org.wso2.carbon.identity.oauth.dto; bundle-symbolic-name="org.wso2.carbon.identity.oauth"; bundle-version="6.11.21"; version="6.11.21"

    at org.eclipse.osgi.container.Module.start(Module.java:457)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel$1.run(ModuleContainer.java:1820)
    at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor$2$1.execute(EquinoxContainerAdaptor.java:150)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1813)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1770)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1735)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1661)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
    at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:234)
    at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:345)

How do I figure out the issue and fix the dependencies?

I checked various forums but could not find the correct answer.

I even tried to start the karaf console or osgi console to check, but no luck.


Solution

  • This WSO2 IS startup failure encounters when using the latest JDK versions 11 (JDK 11.0.20) and 17 (JDK 17.0.8+9). This is due to a fix that has been implemented by JDK [1].

    According to the JDK release notes [2] [3], we can disable these newly introduced validations to preserve backward compatibility. These validations can be disabled by adding the following parameters to the wso2server.sh file located in the <WSO2_IS_HOME>/bin directory. Please stop the server and apply the parameters and start the server again.

    -Djdk.util.zip.disableZip64ExtraFieldValidation=true \
    -Djdk.nio.zipfs.allowDotZipEntry=true \
    

    [1] - https://bugs.openjdk.org/browse/JDK-8251329

    [2] - https://www.oracle.com/java/technologies/javase/11-0-20-relnotes.html

    [3] - https://www.oracle.com/java/technologies/javase/17all-relnotes.html