colliedunk (4) [Avatar] Offline
#1
Hey folks,
I've this ant build file that I use to deploy a axis web service but I get the following error
     [java] Exception in thread "main" java.lang.IncompatibleClassChangeError
     [java]     at arg.apache.axis.message.MessageElement.addTextNode(MessageElement.java:1387)
     [java]     at org.apache.axis.message.SOAPHandler.endElement(SOAPHandler.java:118)
followed by lots more errors and...
BUILD FAILED

when I try to run the axis admin deploy tool through this task:
	<target name="axisDeploy" description = "Deploys java package to axis server. depends = deploy">
		<echo message = "doing deploy task..." />
		<java classname="org.apache.axis.client.AdminClient" fork="yes" failonerror="true">
			<classpath refid="projectClasspath" />
			<arg value = "-p" />
			<arg value = "7070" />
			<arg file="${pathToService}/deploy.wsdd"/>
		</java>
		<echo message = "Done..." />
	</target>

I know there is an ant task for this but I find this easier. I know that axis.jar is in the classpath. But the problem is that even though I get this error the service is deployed on axis. I get no error when I run the admin client of the command line with the following command:
java -cp "C:Program FilesApacheaxis-1_2libaxis.jar;C:Program FilesApacheaxis-1_2libjaxrpc.jar;C:Program FilesApacheaxis-1_2libcommons-logging.jar;C:Program FilesApacheaxis-1_2libcommons-discovery.jar;%CATALINA_HOME%webappsaxisWEB-INFlibsaaj-api.jar;%CATALINA_HOME%commonlibactivation.jar;%CATALINA_HOME%commonlibmail.jar;." org.apache.axis.client.AdminClient -p 7070 ../src/flightCompany/rpcservice/deploy.wsdd

and the ant task worked for me before.
This really bugs me because it fails the build and I can't understand why??!!
Regards,
James.
ErikHatcher (211) [Avatar] Offline
#2
Re: ant and axis
I think your best bet is to inquire with the Axis project on this issue. I haven't used Axis in a while and not up on the latest Ant integration with it.
pcarroll (1) [Avatar] Offline
#3
Re: ant and axis
My ant task. Enjoy.


<!-- =================================================================== -->
<!-- Deploy the service to Axis -->
<!-- =================================================================== -->
<target name="axis-deploy">

<taskdef name="admin" >
classpathref="compile.classpath"
classname="org.apache.axis.tools.ant.axis.AdminClientTask"/>

<admin >
port="8080"
hostname="localhost"
servletpath="axis/services/AdminService"
xmlfile="${axis.webapps.web-inf}/vertical-search-deploy.wsdd"
username="admin"
password="password"
debug="true"
/>
</target>