Java 无法使用 jdk8 和 netbeans 8 打开 Web 服务测试器页面
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/24147548/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
unable to open web service tester page with jdk8 and netbeans 8
提问by faraa
I wrote a simple web service program but I can not test it on glassfish 4.0 web server . When I Test Web service I see this message : Make sure the service has been deployed successfully, and the server is running.
我写了一个简单的 web 服务程序,但我无法在 glassfish 4.0 web 服务器上测试它。当我测试 Web 服务时,我看到以下消息:确保服务已成功部署,并且服务器正在运行。
I can see it in list of deployed web services on glassfish web server . and I add this file to \jdk1.8.0\jre\lib to fix the problem.
我可以在 glassfish Web 服务器上部署的 Web 服务列表中看到它。我将此文件添加到 \jdk1.8.0\jre\lib 以解决问题。
jaxp.properties
jaxp.properties
javax.xml.accessExternalSchema = All
But it doesn't work
javax.xml.accessExternalSchema = All
但它不起作用
Also I see this error in url of tester page :
我也在测试页面的 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.
Thanks in advance
提前致谢
采纳答案by faraa
This is answer : https://netbeans.org/kb/docs/websvc/jax-ws.html#extschemaYou should configure IDE and Glassfish server directly . With special thanks to Pablo
这是答案:https: //netbeans.org/kb/docs/websvc/jax-ws.html#extschema您应该直接配置 IDE 和 Glassfish 服务器。特别感谢Pablo
回答by Omar Vargas
This worked for me:
这对我有用:
- From NetBeans IDE 8, deploy your web application in order to start GlassFish (right-click on your web project and choose Deploy)
- Open the GlassFish console on your browser (
http://localhost:4848/common/index.jsf
if you are working locally with default configuration) - Create a new JVM option with value: -Djavax.xml.accessExternalSchema=all (I recomend you to read https://javaee.github.io/glassfish/doc/4.0/administration-guide.pdfat page 119). Don't forget to save it.
- Restart GlassFish (by clicking on the message near upper left corner)
- 在 NetBeans IDE 8 中,部署您的 Web 应用程序以启动 GlassFish(右键单击您的 Web 项目并选择“部署”)
- 在浏览器上打开 GlassFish 控制台(
http://localhost:4848/common/index.jsf
如果您使用默认配置在本地工作) - 使用值创建一个新的 JVM 选项:-Djavax.xml.accessExternalSchema=all(我建议您阅读https://javaee.github.io/glassfish/doc/4.0/administration-guide.pdf第 119 页)。不要忘记保存它。
- 重新启动 GlassFish(通过单击左上角附近的消息)
That must be enough... so, try to test your web service again.
这一定足够了……所以,再次尝试测试您的 Web 服务。
I don't know where GlassFish is saving that change...
我不知道 GlassFish 在哪里保存更改...
Sorry for my english :)
对不起我的英语不好 :)