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
Related
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.
I'm trying t use the InfoRecoverySample in IS 5.0.0. I was able to build it as according to the instructions here:
https://docs.wso2.com/display/IS500/Recovering+Account+Information+Using+a+Webapp
However after placing the war file in [IS_HOME]/repository/deployment/server/webapps/ and restarting, I get errors in the application logs. Unfortunately they are very vague:
org.apache.axis2.deployment.DeploymentException: Error occurred while deploying webapp : [IS_HOME]/repository/deployment/server/webapps/InfoRecoverySample.war
Error occurred while deploying webapp : [IS_HOME]/repository/deployment/server/webapps/InfoRecoverySample.war
Error while deploying webapp: StandardContext[InfoRecoverySample.war].File[repository/deployment/server/webapps/InfoRecoverySample.war]
My best guess is that the pom.xml file is out of date because I see lots of references to 4.2.0. This is the pom.xml file I'm using:
https://svn.wso2.org/repos/wso2/people/chamathg/samples/is/InfoRecoverySample/pom.xml
Does it sound like I'm on the right track? If so, is there an updated pom.xml file (or sample project) out there?
TIA,
Mike
Deploy the war file in your tomcat/webapps folder, not the identity server webapps. then access via localhost:8080
edit:
The way the pom is designed is for deployment on your localhost, not the wso2 server. Despite what the instructions say. However, you can deploy it to [IS_HOME]/repository/deployment/server/webapps/ as long as you remove most of the jar files that are created in the war's WEB-INF/lib directory. These will conflict when being run from the IS. The only one you need to leave is org.wso2.carbon.identity.sso.agent-1.2.0.jar. remove, re-zip, and then redeploy.
i am very new to web services and i have one problem please suggest me .. i.e i have a WSDL(SOAP) file and with that i created the Web Service-server and web service-Client using Top-Down approach with JAX-WS in eclipse Juno Java EE. i integrated the Tomcat 7 with that Eclipse and from eclipse its working fine.
But my problem is i need to run the Tomcat from out side of the eclipse and i need to deploy the web service in to the tomcat. i don't want to run the Tomcat using eclipse? i just need to run the client from eclipse but i dont want to run the tomcat from eclipse. Please Help me.
File -> Export -> Web -> War (configure where to create it)
Deploying a tomcat application consist of building a war file then deploying it. We call this servlet.
Building the WAR
As you already have your server code, you should now complet the WEB-INF/web.xml file. This file describe the path of your servlet(your server code), on the tomcat server. Depending of your framework you can have some configuration to add in your META-INF/context.xml file.
In an eclipse project, thoses file are generaly under a directory name 'webapp' in your project. (src/main/webapp for a maven project).
First you must use the javaee & javaweb tools of eclipse to build a war file that contains all yours libs, files, class and web.xml
Alternativly you can use a maven build process to get a war, if you use maven.
Deploying the war
After installing tomcat, the deployement is as simple as drop the .war file is deploy directory of the home-directory of tomcat. Then your application is usable on default port 8080.
If you have install also the manager webapp of tomcat, you can see all yours currently deployed application in the manager http://myurl:8080/manager/html.
When you install tomcat, let be sure that your eclipse pseudo server is shutdown, or your tomcat server will have problem to get it's port and startup.
I have a Web Service deployed (as an aar) file to Axis2, but the dependencies (in the form of .jar files within the lib directory of the aar file) are not found on execution. They do get used properly if I copy them into the WEB-INF lib directory of the Axis2 installation, but this is not an ideal workaround.
Does anybody know of any configuration settings I might have missed? Has anybody got a
aar file (on OC4J or other server) with Axis2 v1.2? I'm not sure whether my problem is with Axis2, so might have to deploy the service to a Tomcat server to check but would rather not go through that cycle if someone can point me in the right direction.
Thanks,
You can put the jars into a lib directory inside the AAR. as pointed out in Where to deploy a jar dependency of my webservice?
This will help you understand the structure of the aar file -http://axis.apache.org/axis2/java/core/docs/quickstartguide.html
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).