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

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 ?

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,
Remove the server configurations under ESB Mediation Debugger and Generic Server in Debug Configurations,
If the org.wso2.carbon.capp.monitor-3.0.0 jar is already present in IntegrationStudio/runtime/microesb/dropins folder remove it as well.
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

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.

Related

error deploying to aws container from visual studio

I installed the visual studio aws tookit for vs, created a dotnet core app, deployed, and after a few tries deployed it and reached from browser.
Now I'm trying to deploy an updated version of the app and I have problems: after a few test I see that now the problem is the creation of the task that gives me the error (in the aws console)
CannotPullContainerError: failed to register layer: expected integer
What does it means? how can I fix it? After I saw the app running seems to me I didn't change anything in the configuration files.

Team Foundation Server Deployment error

I have setup my own Team Foundation Build server and I am using Visual Studio Online to host my project online. I have a django project which I am trying to deploy on windows azure cloud service. The project can be published from my dev machine without any errors however when the build server tries to build it, it gives the following error during uploading the package:
Exception Message: Could not load file or assembly 'Microsoft.WindowsAzure.Storage, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified. (type FileNotFoundException)
I checked in .pyproj and found a reference to Microsoft.WindowsAzure.Storage but there the version is 2.1.0.0 and that is the version that is installed on the server as well.
Also there are no errors during the build process but only during the deployment stage. How do I make Msbuild use Storage version 2.1.0.0 instead of 2.0.0.0 . Also, which SDK version contains Storage version 2.0.0.0
I just had this problem. This is the same problem as TFS Build Controller : "Could not load file or assembly 'Microsoft.WindowsAzure.StorageClient, Version=1.7.0.0".
You'll need to copy Microsoft.WindowsAzure.Storage.dll version 2.0.0.0 to "C:\Program Files\Microsoft Team Foundation Server 12.0\Tools", and then restart the Visual Studio Team Foundation Build Service Host 2013 service.

when start application on cloudfoundry got error of 310, "web.xml not found"

Today when I tried to run the sample application hello-java which from git#github.com:SpringSource/cloudfoundry-samples.git, I got the following errors when start the application,
Starting hello-java-from-linux-1... FAILED
CFoundry::AppStagingError: 310: Staging failed: 'Staging task failed:
Staging plugin failed: /var/vcap/packages/stager/vendor/bundle/ruby/1.9.1/gems/vcap_staging-0.1.64/lib/vcap/staging/plugin/java_web/plugin.rb:28:in block in stage_application': Web application staging failed: web.xml not found (RuntimeError)
from /var/vcap/packages/stager/vendor/bundle/ruby/1.9.1/gems/vcap_staging-0.1.64/lib/vcap/staging/plugin/java_web/plugin.rb:22:inchdir'
from /var/vcap/packages/stager/vendor/bundle/ruby/1.9.1/gems/vcap_staging-0.1.64/lib/vcap/staging/plugin/java_web/plugin.rb:22:in stage_application'
from /var/vcap/packages/stager/bin/run_plugin:19:in'
I've checked the target war "hello-java-1.0.war" built by maven, the web.xml has been already packaged under WEB-INF.
Here is the pom.xml of the sample application,
http://maven.apache.org/maven-v4_0_0.xsd">
4.0.0
org.cloudfoundry.samples
hello-java
1.0
war
javax.servlet
servlet-api
2.5
provided
And here are the vmc version and maven version info,
- vmc 0.4.7,
- Apache Maven 3.0.4
Can anyone help on how to solve the issue? Thanks a lot!
BTW, I've searched the cloudfoundry support site, and found some tips to check log files, however seems that I cannot get log files to check the real error, I ran into the following issues when tried to get the log files.
[niy#niy-fedora hello-java]$ vmc files hello-java-from-linux-1 logs
Getting file contents... FAILED
CFoundry::AppStopped: 305: Operation not permitted on a stopped app
For more information, see ~/.vmc/crash
When deploying a java or spring WAR with vmc it's important to be in the same directory as the WAR file at the time you execute vmc.

Cannot export Web Application to WSO2 Application Server with Developer Studio 2.1.0

I downloaded the latest version of WSO2 Developer Studio:
developer-studio-eclipse-jee-helios-linux-gtk-x86_64-2.1.0.zip
and the WSO2 Carbon 4 based Application Server version:
wso2as-5.0.1.zip
unzipped both and started Developer Studio. As I want to deploy a Maven
webapp project, I installed m2e on top of WSO2 Developer Studio.
Then I followed this article:
http://wso2.org/library/articles/2012/09/develop-deploy-web-applications-using-wso2-developer-studio#section3
apart from the fact that the WSO2 Carbon and WSO2 AS versions are different and that I already
have a maven war project which is imported into my workspace.
After creating a distribution project for my web app project, I add the webapp project
to it. Afterwards I add that distribution project to the Carbon Server (wit 'Add/Remove').
The WSO2 Carbon server is started, but then a message is shown 'Can't find export handler for war'.
We repeated the steps several times, sometimes this stack trace appears on the console:
java.lang.Exception: Can't find export handler for war
at org.wso2.developerstudio.eclipse.platform.core.project.export.util.ExportUtil.buildProject(ExportUtil.java:84)
at org.wso2.developerstudio.eclipse.distribution.project.export.CarExportHandler.exportArtifact(CarExportHandler.java:184)
at org.wso2.developerstudio.eclipse.platform.core.project.export.util.ExportUtil.buildProject(ExportUtil.java:81)
at org.wso2.developerstudio.eclipse.platform.core.project.export.util.ExportUtil.BuildCAppProject(ExportUtil.java:105)
at org.wso2.developerstudio.eclipse.distribution.project.ui.wizard.DistributionProjectExportWizard.performFinish(DistributionProjectExportWizard.java:181)
at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:811)
at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:430)
at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:624)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:234)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3540)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3161)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
at org.eclipse.jface.window.Window.open(Window.java:801)
at org.wso2.developerstudio.eclipse.distribution.project.ui.action.ExportDistributionAction.run(ExportDistributionAction.java:36)
at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:251)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3540)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3161)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
What is the correct way of deploying a mavenized web app to the WSO2 Carbon Application Server from WSO2 Developer Studio?
Thanks
Can you paste the content of the Eclipse error log here for more inspection? Though it says it cannot find the Handler for WebApp, i suspect the real error is something else.
You can find the Eclipse Error log at /.metadata/.log file.
Regarding the correct way to deploy a Web-App to WSO2AS from WSO2 Developer Stidio, this article you referred explains the correct approach.
/Harshana
Maybe m2e on top of WSO2 Developer Studio is the problem. As I can deploy WARs into WSO2AS without running into any exception, but I don't have installed m2e in my WSO2 Developer Studio.
Have you compared your existing POM with the POM generated for a webproject by the WSO2 Developer Studio?

How do I install Jetty WTP Server Adapter for Eclipse 3.5?

Currently I am attempting to install the Jetty WTP Server Adapter for Eclipse 3.5 and get the following errors:
An error occurred while collecting items to be installed session context was:(profile=epp.package.jee,phase=org.eclipse.equinox.internal.provisional.p2.engine.phases.Collect, operand=, action=).
No repository found containing: osgi.bundle,org.mortbay.jetty.serveradaptor,1.0.4
No repository found containing: org.eclipse.update.feature,org.mortbay.jetty.serveradaptor,1.0.4
To install, I attempt to add a new server runtime, click 'Install Additional Server Adapters' and follow the wizard I get when I click on the Generic Jetty Server Adapter that eventually loads. I've had this error in all the RCs up to this point, but currently the active RC is RC4.
I also found the 'Download additional server adapters" route to adding the Jetty (and Glassfish) server adapters failed, with the same dependency issues as the Original Poster.
Downloading the .jar and copying it into the 'plugins' dir of my Eclipse install idd not work. The Jetty server adapter was still not a recognised installed plugin.
I had to go to "Help->Install New Software->Add..." and enter the http://www.webtide.com/eclipse site manually. Then I could see the Jetty adapter, and install it successfully. It seems to have installed into the eclipse/plugins/ rather than copied a .jar file into eclipse/plugins.
This may be what the poster on 2 Jul was trying to say, but it wasn't very clear.
I don't know why, but the "download additional server adapters" dialog hasn't worked for me once with Eclipse 3.5, the install always fails with dependency issues.
I also found I had to manually install all the WST Adapter items to get around failed dependencies, for example:
"Web, XML and Java EE Development->JST Server Adapters", "WST Server Adapters"
and also the "Database Development" items. I'm not sure which were required.. when I'd installed everything that looked likely, all my dependency issues were resolved when installing the Glassfish and Jetty server adapters from their update sites.
There's a new (official!) Jetty WTP Plugin to support Jetty 7.x and 8.x: http://wiki.eclipse.org/Jetty_WTP_Plugin
The problem could be resolved installing the JST Server UI before the Jetty Server Adapter. It is a current bug (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=321663).
That way you can install it either as a plugin or in the servers view.
I think you need org.mortbay.jetty.serveradaptor.1.0.4.jar to install jetty adapter, download from http://www.webtide.com/eclipse , put it in plugins of eclipse.
Hope the answer could help you.