我想在提到的tomcat應用程序服務器上部署WAR。但是,以下是我嘗試使用tomcat管理器/ ant腳本進行部署時遇到的錯誤。Apache Tomcat/6.0.24上的部署錯誤
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 [/]
的WAR中包含的Spring bean,HTML頁面,JS,圖片,CSS等,我們正在通過直接應對解壓後的項目到工作正常的Tomcat服務器上的webapps目錄正在部署該項目。然而,我們想部署使用開發的war腳本來將war文件部署到遠程tomcat。
的發展是在Windows平臺上完成,但Tomcat服務器駐留在Linux(在Oracle Enterprise Linux)
片段,做部署如下:
<!-- 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>
任何幫助將apprrciated。如果需要更多信息,請告訴我。
感謝,
庫什
有Ant腳本錯誤,你可以張貼的目標進行實際dpeloyment該片段。 – shinynewbike
@shinynewbike我已經更新了我的帖子與片段。 – Khush
nope這似乎是JVM錯誤,因爲在你以前的問題 – shinynewbike