[Axis] Pb déploiement Web Service - Exception NoClassDefFoundError
bonjour,
je débute avec les web services et j'ai commencé avec le tutoriel de www.developpez.net (http://karamimed.developpez.com/j2ee/tutoriels/axis/).
La première méthode de déploiement (renommer .java en .jws) fonctionne. (normal..)
La seconde méthode me met cette erreur lorsque je lance mon deploy.bat :
Code:
1 2 3
|
java -cp org.apache.axis.client.AdminClient deploy.wsdd
Exception in thread "main" java.lang.NoClassDefFoundError: deploy/wsdd |
Voici mon deploy.bat:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
|
set OLD_CLASSPATH=%CLASSPATH%
set CLASSPATH=%CLASSPATH%;%CATALINA_HOME%\lib\activation-1.1.jar
set CLASSPATH=%CLASSPATH%;%CATALINA_HOME%\lib\mail.jar
set CLASSPATH=%CLASSPATH%;%CATALINA_HOME%\lib\xerces.jar
set CLASSPATH=%CLASSPATH%;%CATALINA_HOME%\lib\servlet-api.jar
set CLASSPATH=%CLASSPATH%;%CATALINA_HOME%\lib\naming-factory.jar
set CLASSPATH=%CLASSPATH%;%AXIS_HOME%
set CLASSPATH=%CLASSPATH%;%AXIS_HOME%\lib\axis.jar
set CLASSPATH=%CLASSPATH%;%AXIS_HOME%\lib\jaxrpc.jar
set CLASSPATH=%CLASSPATH%;%AXIS_HOME%\lib\wsdl4j-1.5.1.jar
set CLASSPATH=%CLASSPATH%;%AXIS_HOME%\lib\commons-discovery-0.2.jar
set CLASSPATH=%CLASSPATH%;%AXIS_HOME%\lib\commons-logging-1.0.4.jar
set CLASSPATH=%CLASSPATH%;%AXIS_HOME%\lib\saaj-api-1.3.jar
set CLASSPATH=%CLASSPATH%;%AXIS_HOME%\lib\log4j-1.2.8.jar
set CLASSPATH="%CLASSPATH%"
java -cp org.apache.axis.client.AdminClient deploy.wsdd
set CLASSPATH=%OLD_CLASSPATH%
pause |
J'ai bien mis toutes les libraires dans les chemins indiqués par ce deploy.bat.
De plus si je vais visualiser l'état des librairies sur axis/happyaxis.jsp j'obtiens ceci:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
|
# Found SAAJ API ( javax.xml.soap.SOAPMessage ) at an unknown location
# Found JAX-RPC API ( javax.xml.rpc.Service ) at C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\axis\WEB-INF\lib\jaxrpc.jar
# Found Apache-Axis ( org.apache.axis.transport.http.AxisServlet ) at C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\axis\WEB-INF\lib\axis.jar
# Found Jakarta-Commons Discovery ( org.apache.commons.discovery.Resource ) at C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\axis\WEB-INF\lib\commons-discovery-0.2.jar
# Found Jakarta-Commons Logging ( org.apache.commons.logging.Log ) at C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\axis\WEB-INF\lib\commons-logging-1.0.4.jar
# Found Log4j ( org.apache.log4j.Layout ) at C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\axis\WEB-INF\lib\log4j-1.2.8.jar
# Found IBM's WSDL4Java ( com.ibm.wsdl.factory.WSDLFactoryImpl ) at C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\axis\WEB-INF\lib\wsdl4j-1.5.1.jar
# Found JAXP implementation ( javax.xml.parsers.SAXParserFactory ) at an unknown location
# Found Activation API ( javax.activation.DataHandler ) at an unknown location |
Je me demandais si le message "found activation .... at an unknown location" voulait dire qu'il le trouvait ou pas (parce que a part ca je ne vois pas d'ou pourrait venir le problème) ?
Pour précision j'ai mis tous ces fichiers dans le répertoire "classes" :
deploy.bat
deploy.wsdd
sommer.class
sommer.wsdl
Voili voilou si qqn peut m'éclairer....
Deployer un web service dans axis
Salut,
J'ai j'ai ajouté le chemin d'axis.jar dans le path windows et j'ai mis la commande
java org.apache.axis.client.AdminClient deploy.wsdd
J'ai l'exception suivante:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
|
org.apache.axis.client.AdminClient deploy.wsdd
log4j:WARN No appenders could be found for logger (org.apache.axis.i18n.ProjectR
esourceBundle).
log4j:WARN Please initialize the log4j system properly.
Processing file deploy.wsdd
Exception: AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: java.net.SocketException: Connection reset
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace:java.net.SocketException: Connec
tion reset
at java.net.SocketInputStream.read(SocketInputStream.java:168)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
at java.io.BufferedInputStream.read(BufferedInputStream.java:235)
at org.apache.axis.transport.http.HTTPSender.readHeadersFromSocket(HTTPS
ender.java:583)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:143)
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.client.AxisClient.invoke(AxisClient.java:165)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:1792)
at org.apache.axis.client.AdminClient.process(AdminClient.java:439)
at org.apache.axis.client.AdminClient.process(AdminClient.java:404)
at org.apache.axis.client.AdminClient.process(AdminClient.java:410)
at org.apache.axis.client.AdminClient.process(AdminClient.java:320)
at org.apache.axis.client.AdminClient.main(AdminClient.java:463)
{http://xml.apache.org/axis/}hostname:unicorni-464ba7 |
Merci pour votre aide