无法找到DTD,ConnectException

时间:2018-08-11 06:33:21

标签: java-ee glassfish glassfish-4.1 entityresolver

我们的企业应用程序以前在客户场所失败,原因是:

Severe:   Exception while deploying the app [v24testear] : Unable to locate the DTD to validate your deployment descriptor file [META-INF/sun-ejb-jar.xml] in archive [V24Handler-ejb_jar]. Please make sure the DOCTYPE is correct (no typo in public ID or system ID) and you have proper access to the Internet.
java.net.ConnectException: Connection timed out: connect

之所以发生这种情况,是因为他们的网络设置偏执,并且作为一种解决方法,我们不得不从sun-ejb-jar.xml中删除以下声明:

<!DOCTYPE sun-ejb-jar PUBLIC "-//Sun Microsystems, Inc.//
DTD GlassFish Application Server 3.0 EJB 3.1//EN" 
"http://www.sun.com/software/appserver/dtds/sun-ejb-jar_3_1-0.dtd">

我的问题如下。 Glassfish实际上在glassfish/lib/dtds/sun-ejb-jar_3_1-0.dtd拥有该dtd的本地副本。常识告诉我们,Glassfish应该提供自己的实体解析器,该实体解析器会将标准架构重新映射到本地文件。但是,我没有尝试打开该本地文件。另一方面,java进程正在访问sun-web-app_2_5-0.dtd。这种机制是否存在,但被打破了?否则,dtds/目录的作用是什么?

0 个答案:

没有答案