I am trying to deploy a WAR on the mentioned tomcat application server. However following is the error that I get when I try to use the tomcat manager / ant script for deployment.
java.lang.IllegalStateException: ContainerBase.addChild: start: LifecycleException: Error initializaing : java.lang.IllegalArgumentException: The archive [jar:file:/var/lib/tomcat6/webapps/afgretail.war!/] is malformed and will be ignored: an entry contains an illegal path [/]
The WAR contains spring beans, HTML pages, js, images, css etc. We are currently deploying the project by coping the unzipped project directly into the webapps folder on the tomcat server which works fine. However we would like to deploy using the ant script developed to deploy war file to a remote tomcat.
The development was done on windows platform but the tomcat server resides on Linux (Oracle Enterprise Linux)
Snippet that does deployment as follows:
<!-- Configure the folder and context path for this application -->
<property name="webapp" value="walton" />
<property name="path" value="/walton" />
<!-- Configure properties to access the Manager application -->
<property name="url" value="http://localhost:8080/manager/html" />
<!-- <property name="url" value="http://osm4.afgonline.com.au:8080/manager/html" />-->
<property name="username" value="tomcat" />
<property name="password" value="s3cret" />
<property name="dist.dir" value="dist" />
<property name="webapp.path" value="${dist.dir}/${webapp}" />
<property name="project.path" value="C:/java/workspace/afghl_walton"/>
<path id="deployer.classpath">
<!--fileset dir="${basedir}/lib"-->
<fileset dir="C:\Program Files\Apache Software Foundation\Tomcat 6.0\lib\">
<include name="*.jar" />
</fileset>
</path>
<!-- Configure the custom Ant tasks for the Manager application -->
<taskdef resource="org/apache/catalina/ant/catalina.tasks"
classpathref="deployer.classpath" />
<target name="deploy" description="Deploy web application">
<deploy url="${url}" username="${username}" password="${password}"
path="${path}" war="${project.path}/${webapp.path}.war" update="true" />
</target>
Any help will be apprrciated. If there is more information required please let me know.
Thanks,
Khush