我把项目打了个WAR包,在JBoss 4 下发布可以正常工作,但在JBoss 6 下发布抛出如下错误:
08:57:17,305 WARN [org.jboss.util.xml.JBossEntityResolver] Trying to resolve systemId as a non-file URL: http://java.sun.com/j2ee/dtds/web-jsptaglib_1_1.dtd 08:57:59,695 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] Error installing to Parse: name=vfs:///C:/tools/jboss-6.1.0.Final/server/default/deploy/GHS_Utility_GUI.war state=PreParse mode=Manual requiredState=Parse: org.jboss.deployers.spi.DeploymentException: Error creating ma naged object for vfs:///C:/tools/jboss-6.1.0.Final/server/default/deploy/GHS_Utility_GUI.war
..................
DEPLOYMENTS IN ERROR: Deployment "vfs:///C:/tools/jboss-6.1.0.Final/server/default/deploy/GHS_Utility_GUI.war" is in error due to the following reason(s): java.net.ConnectException: Connection timed out: connect
看了一下log,发现错误的根源是找不到那个URL:
http://java.sun.com/j2ee/dtds/web-jsptaglib_1_1.dtd
解决方案:
(1)因为这个URL是在bsf-2.3.0.jar里,
(2)所以在war里打开 \WEB-INF\bsf-2.3.0.jar\META-INF\taglib.tld
(3)编辑taglib.tld, 把
http://java.sun.com/j2ee/dtds/web-jsptaglib_1_1.dtd替换成:
http://java.sun.com/j2ee/dtds/jsptaglibrary_1_2.dtd
原文:http://stackoverflow.com/questions/4888866/deployment-problem-in-jboss-6