I am new to web services and I have deployed a web service locally ( I am able to see the wsdl)
I tried to query the web service by creating a request in SOAPUI.
The response I got back was
<env:Fault>
<faultcode>env:Server</faultcode>
<faultstring>java.lang.NoClassDefFoundError: org/apache/commons/lang/StringEscapeUtils
</faultstring>
</env:Fault>
I see a bunch of errors in the jboss console in eclipse...
11:53:06,226 ERROR [SOAPFaultHelperJAXWS]
SOAP requestexceptionjava.lang.RuntimeException:
java.lang.NoClassDefFoundError:org/apache/commons/lang/StringEscapeUtils
Can someone help me in figuring out what the problem could be?
Is something wrong with the way I setup my SOAPUI or is it I missed something in my project(web service server)
You need commons-lang.jar in your classpath
How do you exactly deploy the web service? For example, if you create an .aar archive, please verify that the corresponding jar (commons-lang.jar?) is available into the lib folder of the archive. For example:
your_service_root
->META-INF
->lib
->commons-lang.jar
-> com
->bla
->bla
Related
I get the error when generating web service. I have a simple class that i want to create web service.
I am using CXF 2.7 and Tomcat 7 version.
org.apache.cxf.tools.common.ToolException: Fail to load class :RequestLimit
at org.apache.cxf.tools.util.AnnotationUtil.loadClass(AnnotationUtil.java:88)
at org.apache.cxf.tools.java2wsdl.processor.JavaToWSDLProcessor.getServiceClass(JavaToWSDLProcessor.java:284)
at org.apache.cxf.tools.java2wsdl.processor.JavaToWSDLProcessor.getServiceBuilder(JavaToWSDLProcessor.java:181)
at org.apache.cxf.tools.java2wsdl.processor.JavaToWSDLProcessor.process(JavaToWSDLProcessor.java:100)
at org.apache.cxf.tools.java2ws.JavaToWSContainer.processWSDL(JavaToWSContainer.java:110)
at org.apache.cxf.tools.java2ws.JavaToWSContainer.execute(JavaToWSContainer.java:75)
at org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:103)
at org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:58)
at org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:40)
at org.apache.cxf.tools.java2ws.JavaToWS.run(JavaToWS.java:77)
at org.apache.cxf.tools.java2ws.JavaToWS.main(JavaToWS.java:45)
It is all about project hasnt been built. I selected Project->Build Automatically in Eclipse.
More information. Solution here
I am using axis2 on Apache Tomcat. I am writing client side to consumer SOAP WS. I configured Eclipse to use Tomcat as a server and while executing that line
stub._getServiceClient().engageModule("addressing");
I was getting that error "unable to engage module addressing". To fix that issue I add following line in the VM arguments of run configuration
-Daxis2.repo="E:\axis2\repository"
Now I export my project as a war file and deploy it on the real server. But Now I am again getting the same error(I checked the log file). I don't know how to fix, can every one help me. Thanks
It got resolved on my side in the following way:
I had an outdated WEB-INF/modules/axis2-jaxws-mar*.mar or rather 2 versions of it and the classloader got the older one of it and AxisServlet didn't start altogether
java.lang.NoSuchMethodError: org.apache.axis2.engine.AxisConfiguration.getGlobalModules()Ljava/util/List;
at org.apache.axis2.jaxws.module.JAXWSModule.registerGlobalModule(JAXWSModule.java:51)
Currently, I use a Maven project. I don't have any Tomcat server. I use the local google appengine server to test my application.
I would like to use the spring tags, especially the 'form' tags.
On a forum(http://forum.spring.io/forum/spring-projects/web/74017-the-absolute-uri-http-www-springframework-org-tags-form-cannot-be-resolved), I heard that I had to copy the spring-form.tld file from the spring-webmvc-3.1.0.RELEASE.jar in src/main/webapp/WEB-INF. It's done.
But when I launch the appengine server and I go to this url : http://www.springsource.org/tags/form , I've a 404 error.
What does it happen ?
Do you have any solutions ?
Thank you
404 means that the specific path you are trying to access does not exist.
So either it did not deploy properly or it is not stored where you think it is
Add the spring-webmvc-3.1.x.RELEASE.jar to your application (lib folder), thats all you need.
In your jsp use: http://www.springframework.org/tags/form
The tld file itselfe is located inside spring-webmvc-3.1.x.RELEASE.jar : \META-INF\spring-form.tld
Im trying to use a web service.
My project is Java 6, using Jboss 4.3.2.GA.
I've tryied to import the web service using the New-> Web Service Client in Eclipse.
Like this tutorial http://www.craigsprogramming.com/2011/03/tutorial-consume-any-web-service-using.html
But when i try to get the Soap Client in this code:
WebServiceEscolaSoapStub service = (WebServiceEscolaSoapStub)new WebServiceEscolaLocator().getWebServiceEscolaSoap();
I get the following error.
org.apache.commons.discovery.DiscoveryException: Class org.apache.commons.logging.impl.SLF4JLogFactory does not implement org.apache.commons.logging.LogFactory
at org.apache.commons.discovery.tools.ClassUtils.verifyAncestory(ClassUtils.java:180)
at org.apache.commons.discovery.tools.SPInterface.verifyAncestory(SPInterface.java:201)
at org.apache.commons.discovery.tools.SPInterface.newInstance(SPInterface.java:195)
at org.apache.commons.discovery.tools.DiscoverClass.newInstance(DiscoverClass.java:579)
at org.apache.commons.discovery.tools.DiscoverSingleton.find(DiscoverSingleton.java:418)
at org.apache.commons.discovery.tools.DiscoverSingleton.find(DiscoverSingleton.java:378)
at org.apache.axis.components.logger.LogFactory$1.run(LogFactory.java:45)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.axis.components.logger.LogFactory.getLogFactory(LogFactory.java:41)
at org.apache.axis.components.logger.LogFactory.<clinit>(LogFactory.java:33)
at org.apache.axis.handlers.BasicHandler.<clinit>(BasicHandler.java:43)
at org.apache.axis.client.Service.getAxisClient(Service.java:104)
at org.apache.axis.client.Service.<init>(Service.java:113)
at br.com.portalpitagorasdeeducacao.gestaodeusuarios.Service.WebServiceEscolaLocator.<init>(WebServiceEscolaLocator.java:12)...
The error is pretty clear.
You are mixing two jars slf4j and commons-logging. Get rid of commons-logging.jar file.
On second thought remove all logging for now and just a run webservice client to see if you get an output. Later you can add the logging. This error has nothing to do with webservice error.
I have created a jersey web service with neatbeans using glassfish as my server, everything works fine but i have issues trying to install the same app on websphere 7.
i get this error "Error 500 An error occurred while processing request: /ibm/console/upload.do Message: java.lang.NoClassDefFoundError: javax.servlet.ServletInputStream".
I even tried creating a simple web app and tried to deploy on websphere, again, i have the same error.
Anybody with ideas? I need your help so badly ya'll. Thanks in advance
Make sure you don't have servlet-api.jar in your WEB-INF/lib. If its there it may interfere with the one already present in websphere a trick the classloader
I did below steps which worked for me :
Go to the server in console(which was stand - alone in my case i.e no DMGR)
Change the class loader policy to "multiple".
I suppose I am not too late to reply to this question. The HttpServlet class can be found in the j2ee.jar. WAS does not bundle it in servlet-api.jar, the way Tomcat does it.
You need to bundle servlet-api.jar file in your application.