Failed to deploy Webservice into weblogic server - web-services

I developed webservice and I want to deploy it into weblogic, so that I can integrate it with my portal application.
My webservice works well in integrated Weblogic server(10.3.5). But, when I try to deploy it into development server (10.3.6), Weblogic throw an exception.
I also try to deploy it into EAR file, and I got the same exception.
The error message is :
[02:16:01 PM] Caused by: java.lang.ClassCastException: com.sun.xml.bind.AccessorFactoryImpl cannot be cast to com.sun.xml.bind.InternalAccessorFactory
Does anyone know how to fix this issue? I'm still trying to deploy it into 10.3.6 version.

Please check versions in web.xml.
WebApp_ID version should be as javaee version you specified.

I reinstall the weblogic server using jrockit 1.6.0_33 then I able to deploy my webservice. Means that I downgrade jdk (not latest version).

Related

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 ?
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.

WSO2 AS 5.3.0 Linkage Error with slf4j

I try to deploy a war web application into WSO2 AS (5.3.0) and get an unexpected error regarding to slf4j as below,
The application is working well in both Tomcat 8.0.32 and Wildfly 10 Application Server.
Thanks,
Sean
If Carbon runtime environment is not needed, you may add the webapp-classloading.xml into your webapp, and configure it to use Tomcat runtime as explained in "Webapp Classloading" document.

Is it possible to run WSO2 ESB in Openshift?

We are trying to create a WSO2 ESB cartridge to run on Openshift but haven't had much success yet. Is it even possible to run WSO2 ESB on Openshift or do we have to rely on Fuse ESB? Happy to run WSO2 either through cartridge option or just an EAR file if that's possible.
I was trying to install WSO2 ESB in an Openshift DIY cartridge. But I'm getting an port binding issue. The nasty thing is the message does not say which port it is unable to be bind into.
Please let me know if you passed this stage while trying to deploy WSO2 ESB in Openshift.
[esb3-yasas.rhcloud.com bin]> sh wso2server.sh
Starting WSO2 Carbon (in unsupported JDK) [ERROR] CARBON is
supported only on JDK 1.6 and 1.7 JAVA_HOME environment variable is
set to
/var/lib/openshift/57dca6070c1e66b48000003c/app-root/data/java/jdk1.8.0_45/
CARBON_HOME environment variable is set to
/var/lib/openshift/57dca6070c1e66b48000003c/app-root/data/esb Java
HotSpot(TM) 64-Bit Server VM warning: ignoring option
MaxPermSize=256m; support was removed in 8.0 Error: Exception thrown
by the agent : java.rmi.server.ExportException: Port already in use:
0; nested exception is:
java.net.BindException: Permission denied
Snapshot
Thanks !

can not invoke web service from websphere portal

I am facing a problem related to axis.jar classes.
I have a WAR file that has axis.jar in its lib directory.
this WAR deployed on IBM websphere environment1 and this WAR is working fine.
when I deploy the same WAR in IBM websphere environment2 not working.
I got the following exception when I try to invoke a webservice:
java.lang.NoClassDefFoundError: org.apache.axis.configuration.EngineConfigurationFactoryDefault
I have no idea why this class not loaded in environment2.
Note that the same WAR woking fine on environment1 and not working on environment2.
Any help please??
You should check your Websphere classloader configuration.
I've faced these errors before, and they happen when you mix your version of axis, with missing dependencies, that are taken from Websphere. Usually, these Websphere dependencies are outdated, and some classes/methods don't exist.
Provide axis.jar and its dependencies on the WEB-INF/lib folder, and configure classloading to PARENT_LAST.
Also be sure that your MANIFEST.MF is referencing axis libraries as well
This should do the work

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?