无法使用jdk8和netbeans 8打开Web服务测试器页面

far*_*raa 3 java web-services glassfish netbeans-8 jakarta-ee

我编写了一个简单的 Web 服务程序,但无法在 glassfish 4.0 Web 服务器上测试它。当我测试 Web 服务时,我看到此消息:请确保服务已成功部署,并且服务器正在运行。

我可以在 glassfish Web 服务器上部署的 Web 服务列表中看到它。我将此文件添加到 \jdk1.8.0\jre\lib 来解决问题。

jaxp.properties

javax.xml.accessExternalSchema = All 但这不起作用

我还在测试器页面的 url 中看到此错误:

lineNumber: 52; columnNumber: 88; schema_reference: Failed to read schema document 'xjc.xsd', because 'bundle' access is not allowed due to restriction set by the accessExternalSchema property. 
Run Code Online (Sandbox Code Playgroud)

提前致谢

小智 5

这对我有用:

  1. 在 NetBeans IDE 8 中,部署 Web 应用程序以启动 GlassFish(右键单击您的 Web 项目并选择“部署”)
  2. 在浏览器上打开 GlassFish 控制台(http://localhost:4848/common/index.jsf如果您使用默认配置在本地工作)
  3. 创建一个新的 JVM 选项,其值:-Djavax.xml.accessExternalSchema=all(我建议您阅读https://javaee.github.io/glassfish/doc/4.0/administration-guide.pdf第 119 页)。不要忘记保存它。
  4. 重新启动 GlassFish(通过单击左上角附近的消息)

这一定足够了...所以,尝试再次测试您的网络服务。

我不知道 GlassFish 在哪里保存该更改......

对不起我的英语不好 :)