Mahmoud Saleh
Mahmoud Saleh

Reputation: 33605

org.osgi.framework.BundleException: Could not resolve module: org.wso2.carbon.capp.monitor

I am using WSO2 Integration Studio 8.1.0 to develop an API on my machine, and when trying to run on Micro Integrator, I get the following error :

ERROR {Framework} - FrameworkEvent ERROR org.osgi.framework.BundleException: Could not resolve module: org.wso2.carbon.capp.monitor [170]
  Unresolved requirement: Import-Package: org.wso2.carbon.application.deployer

    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)

But after the error appears in the console the application runs fine.

Any ideas why I get this error and how to avoid it ?

Upvotes: 1

Views: 1911

Answers (2)

Nadun Kulatunge
Nadun Kulatunge

Reputation: 1731

The components of the MI product are activated as OSGI bundles at the kernel level during the server startup process. In this case, the OSGI bundle related to org.wso2.carbon.capp.monitor module is not activated because the org.wso2.carbon.application.deployer module is not available at the time when the OSGI bundle related to org.wso2.carbon.capp.monitor module is activated. As a result, the bundle activation issue will be visible during the initial server startup process.

However, once the bundle related to org.wso2.carbon.application.deployer is successfully activated, the OSGI bundle related to org.wso2.carbon.capp.monitor module will also be successfully re-activated, even if the bundling exception occurred during the initial bundle activation process.

We can check whether the OSGI bundle related to the org.wso2.carbon.capp.monitor module was successfully activated by looking for the org.wso2.carbon.capp.monitor-3.0.0.jar file in the <Integration_STUDIO_INSTALLED_LOCATION>/runtime/microesb/dropins directory after starting the MI server; additionally, the CAR application will not be deployed successfully if the OSGI bundle was not properly activated during the server startup process.

You can also validate it by redeploying the CAR application into the MI server. You will not notice the issue during the CAR application redeployment process because it occurs due to the order in the bundle activation process during the server startup.

This issue has been reported: https://github.com/wso2/api-manager/issues/772

Please take the latest update by following the official guide: https://apim.docs.wso2.com/en/latest/integrate/develop/installing-wso2-integration-studio/#get-the-latest-updates

Cheers! Nadun.

Upvotes: 0

sanoJ
sanoJ

Reputation: 3128

This issue is happening due to a bug[1] in the Integration Studio. Due to this bug, the Studio was using the configuration of the older MI version to run/debug CApps. To fix this you will need to update the Integration Studio and manually remove some configurations as follows,

  1. Remove the server configurations under ESB Mediation Debugger and Generic Server in Debug Configurations,

enter image description here

  1. If the org.wso2.carbon.capp.monitor-3.0.0 jar is already present in IntegrationStudio/runtime/microesb/dropins folder remove it as well.

  2. Restart the Integration Studio to load the new configurations shipped with the latest updates.

Please refer Get the latest updates to install the latest updates to Integration Studio.

[1] - https://github.com/wso2/api-manager/issues/772

Upvotes: 1

Related Questions