JBOSS、ANT远程部署的异常解决!

Buildfile: D:/Program Files/MyEclipse 5.1.1 GA/workspace/ant/build.xml
prepare:
compile:
dep:
deploy.webapp:
      [get] Getting: http://localhost:8080/jmx-console/HtmlAdaptor?action=invokeOpByName&name=jboss.system:service%3DMainDeployer&methodName=redeploy&argType=java.net.URL&arg0=file:D:/Program Files/MyEclipse 5.1.1 GA/workspace/ant/ant.war
      [get] To: D:/Program Files/MyEclipse 5.1.1 GA/workspace/ant/a.html
      [get] Error opening connection java.io.IOException: Server returned HTTP response code: 505 for URL: http://localhost:8080/jmx-console/HtmlAdaptor?action=invokeOpByName&name=jboss.system:service%3DMainDeployer&methodName=redeploy&argType=java.net.URL&arg0=file:D:/Program Files/MyEclipse 5.1.1 GA/workspace/ant/ant.war
      [get] Error opening connection java.io.IOException: Server returned HTTP response code: 505 for URL: http://localhost:8080/jmx-console/HtmlAdaptor?action=invokeOpByName&name=jboss.system:service%3DMainDeployer&methodName=redeploy&argType=java.net.URL&arg0=file:D:/Program Files/MyEclipse 5.1.1 GA/workspace/ant/ant.war
      [get] Error opening connection java.io.IOException: Server returned HTTP response code: 505 for URL: http://localhost:8080/jmx-console/HtmlAdaptor?action=invokeOpByName&name=jboss.system:service%3DMainDeployer&methodName=redeploy&argType=java.net.URL&arg0=file:D:/Program Files/MyEclipse 5.1.1 GA/workspace/ant/ant.war
      [get] Can't get http://localhost:8080/jmx-console/HtmlAdaptor?action=invokeOpByName&name=jboss.system:service%3DMainDeployer&methodName=redeploy&argType=java.net.URL&arg0=file:D:/Program Files/MyEclipse 5.1.1 GA/workspace/ant/ant.war to D:/Program Files/MyEclipse 5.1.1 GA/workspace/ant/a.html

BUILD FAILED
D:/Program Files/MyEclipse 5.1.1 GA/workspace/ant/build.xml:127: Can't get http://localhost:8080/jmx-console/HtmlAdaptor?action=invokeOpByName&name=jboss.system:service%3DMainDeployer&methodName=redeploy&argType=java.net.URL&arg0=file:D:/Program Files/MyEclipse 5.1.1 GA/workspace/ant/ant.war to D:/Program Files/MyEclipse 5.1.1 GA/workspace/ant/a.html

Total time: 984 milliseconds

=========================

解决方案:(1)检查所在路径是否有空格例如:D:/Program Files/MyEclipse 5.1.1 GA/workspace/其中有空格Build时不稳定是要出问题的;

(2)系统防火墙是否将8080端口给屏蔽掉;

(3)JDK的版本是否>=1.4

=====================

可正常运行的例子:

<project default="deploy.webapp" basedir=".">
<target name="deploy.webapp" depends="undeploy.webapp">
 <get dest="deployresult.html" src="http://localhost:8080/jmx-console/HtmlAdaptor?action=invokeOpByName&amp;name=jboss.system:service%3DMainDeployer&amp;methodName=redeploy&amp;argType=java.net.URL&amp;arg0=file:${basedir}/ant.war" /> 
  </target>
 <target name="undeploy.webapp">
  <get dest="deployresult.html" src="http://localhost:8080/jmx-console/HtmlAdaptor?action=invokeOpByName&amp;name=jboss.system:service%3DMainDeployer&amp;methodName=undeploy&amp;argType=java.net.URL&amp;arg0=file:${basedir}/ant.war" /> 
   </target>
</project>

祝您成功!===================还有不明白的给我发mail吧shandongcn#sina.com

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值