Axis error when deploying using deploy.wsdd: java.lang.ClassNotFoundExcepti
843833Nov 25 2005 — edited Mar 28 2008Hi
I am trying to create a service from POJO using axis.
Steps followed:
1. created a java class
package com.calculator;
public interface Calculator {
public int addition(int i , int j);
}
2. created a wsdl file using Java2WSDL utility
3. created java files stubs, deploy and other files using WSDL2Java
4. after all the files are compiled, i tried to deploy using DEPLOY.WSDD AND ADMINCLIENT utility. This is where the problem is.
i am getting java.lang.classnot found exception even though the jar file and respective class files are in the class path and in tomcat/webapps/axis/lib directory. i am able to access the class files in the classpath.
i am using tomcat 5.5.9 and java 1.5_04.
the service is supposed to be in port 9000 other than default 8080
error logs:
D:\projects\WebServices>java org.apache.axis.client.AdminClient -lhttp://localho
st:9000/axis/services/calculator deploy.wsdd
Processing file deploy.wsdd
Exception: AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: org.apache.axis.ConfigurationException: Could not find class for t
he service named: calculator.ws.CalculatorSoapBindingImpl
Hint: you may need to copy your class files/tree into the right location (which
depends on the servlet system you are using).; nested exception is:
java.lang.ClassNotFoundException: calculator.ws.CalculatorSoapBindingImp
l
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.generalException
faultSubcode:
faultString: Could not find class for the service named: calculator.ws.Calculat
orSoapBindingImpl
Hint: you may need to copy your class files/tree into the right location (which
depends on the servlet system you are using).; nested exception is:
java.lang.ClassNotFoundException: calculator.ws.CalculatorSoapBindingImp
l
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}hostname:zxxxx
Could not find class for the service named: calculator.ws.CalculatorSoapBindingI
mpl
Hint: you may need to copy your class files/tree into the right location (which
depends on the servlet system you are using).; nested exception is:
java.lang.ClassNotFoundException: calculator.ws.CalculatorSoapBindingImp
l
at org.apache.axis.providers.java.JavaProvider.getServiceClass(JavaProvi
der.java:432)
at org.apache.axis.providers.java.JavaProvider.initServiceDesc(JavaProvi
der.java:461)
at org.apache.axis.handlers.soap.SOAPService.getInitializedServiceDesc(S
OAPService.java:285)
at org.apache.axis.deployment.wsdd.WSDDService.makeNewInstance(WSDDServi
ce.java:500)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getNewInstance(WSD
DDeployableItem.java:274)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getInstance(WSDDDe
ployableItem.java:260)
at org.apache.axis.deployment.wsdd.WSDDDeployment.getService(WSDDDeploym
ent.java:427)
at org.apache.axis.configuration.FileProvider.getService(FileProvider.ja
va:231)
at org.apache.axis.AxisEngine.getService(AxisEngine.java:311)
at org.apache.axis.MessageContext.setTargetService(MessageContext.java:7
55)
at org.apache.axis.handlers.http.URLMapper.invoke(URLMapper.java:50)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrateg
y.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.server.AxisServer.invoke(AxisServer.java:239)
at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:69
9)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBas
e.java:327)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
a:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:856)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
ssConnection(Http11Protocol.java:744)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpo
int.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFol
lowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
ool.java:684)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.ClassNotFoundException: calculator.ws.CalculatorSoapBinding
Impl
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoa
der.java:1332)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoa
der.java:1181)
at org.apache.axis.utils.ClassUtils$2.run(ClassUtils.java:187)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.axis.utils.ClassUtils.loadClass(ClassUtils.java:160)
at org.apache.axis.utils.ClassUtils.forName(ClassUtils.java:142)
at org.apache.axis.utils.cache.ClassCache.lookup(ClassCache.java:85)
at org.apache.axis.providers.java.JavaProvider.getServiceClass(JavaProvi
der.java:428)
... 32 more
org.apache.axis.ConfigurationException: Could not find class for the service nam
ed: calculator.ws.CalculatorSoapBindingImpl
Hint: you may need to copy your class files/tree into the right location (which
depends on the servlet system you are using).; nested exception is:
java.lang.ClassNotFoundException: calculator.ws.CalculatorSoapBindingImp
l
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.generalException
faultSubcode:
faultString: Could not find class for the service named: calculator.ws.Calculat
orSoapBindingImpl
Hint: you may need to copy your class files/tree into the right location (which
depends on the servlet system you are using).; nested exception is:
java.lang.ClassNotFoundException: calculator.ws.CalculatorSoapBindingImp
l
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}hostname:snrese143052
Could not find class for the service named: calculator.ws.CalculatorSoapBindingI
mpl
Hint: you may need to copy your class files/tree into the right location (which
depends on the servlet system you are using).; nested exception is:
java.lang.ClassNotFoundException: calculator.ws.CalculatorSoapBindingImp
l
at org.apache.axis.providers.java.JavaProvider.getServiceClass(JavaProvi
der.java:432)
Thank,
winkidzz