简体   繁体   English

引用的文件包含错误 (http://testng.org/testng-1.0.dtd)

[英]Referenced file contains errors (http://testng.org/testng-1.0.dtd)

I have installed TestNG plugin in eclipse still I see the below error Referenced file contains errors ( http://testng.org/testng-1.0.dtd ).我已经在 Eclipse 中安装了 TestNG 插件,但仍然看到以下错误Referenced file contains errors ( http://testng.org/testng-1.0.dtd )。 For more information, right click on the message in the Problems View and select "Show Details..."有关更多信息,请右键单击问题视图中的消息并选择“显示详细信息...”

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
<suite name="PVAI-Document">
    <test name="document-module">
        <packages>
            <package name="com.genpact.pvai.document.*" />
        </packages>
    </test>
</suite>

I solved it by adding the secure flag in the URL as follows: "http s ://testng.org/testng-1.0.dtd"我通过在 URL 中添加安全标志来解决它,如下所示:“http s ://testng.org/testng-1.0.dtd”

Regards.问候。

The answer from @Nahuel is correct, it's fixed by changing the URL to https. @Nahuel 的答案是正确的,它通过将 URL 更改为 https 来修复。 But I think it worth mention that this is a problem of Eclipse not following redirect (302) responses (at least in this case)但我认为值得一提的是,这是 Eclipse 没有遵循重定向(302)响应的问题(至少在这种情况下)

As you can see below if I use postman to query the URL the server responds with a 302 redirect to the https version正如您在下面看到的,如果我使用邮递员来查询服务器响应的 URL 以 302 重定向到 https 版本

邮递员请求 dtd

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 TestNG XML配置文件DTD“test”标签错误 - TestNG XML configuration file DTD "test" tag error log4j.xml引用的文件log4j.dtd包含错误 - log4j.xml referenced file log4j.dtd contains errors TestNG xml文件执行 - TestNG xml File Execution 找不到或加载主类org.testng.TestNG - could not find or load main class org.testng.TestNG TestNG 默认禁用从不安全的 Urls 加载 DTD - TestNG by default disables loading DTD from unsecure Urls 引用的文件包含错误 (http://java.sun.com/xml/ns/javaee/web-app.xsd) - Referenced file contains errors (http://java.sun.com/xml/ns/javaee/web-app.xsd) 通过Maven / Testng通过动态自定义TestNG文件运行测试 - Run Tests through a Dynamic Custom TestNG File through Maven/Testng 如何在没有 testng.xml 文件的情况下执行 Testng 和 Maven - How to execute Testng and Maven without testng.xml file 引用的文件包含错误(jar:file:/…/plugins/org.jboss.tools.jst.web_3.5.0.Final-v20130717-0309-B75.jar!/catalog/web-facesconfig_2_2.xsd) - Referenced file contains errors (jar:file:/…/plugins/org.jboss.tools.jst.web_3.5.0.Final-v20130717-0309-B75.jar!/catalog/web-facesconfig_2_2.xsd) 引用的文件包含错误(jar:file:/ J:/eclipse/plugins/org.eclipse.jst.standard.schemas_1.2.1.v201302050732.jar!/dtdsAndSchemas/javaee_6.xsd) - Referenced file contains errors (jar:file:/J:/eclipse/plugins/org.eclipse.jst.standard.schemas_1.2.1.v201302050732.jar!/dtdsAndSchemas/javaee_6.xsd)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM