使用 jax-ws 初始化 Web 服务时出现异常
谁能告诉我问题是什么我正在尝试在我的客户端项目中创建一个新的 Web 服务客户端,该项目已经有一个 Web 服务客户端我似乎无法弄清楚出了什么问题异常
详细信息:null java.lang.NullPointerException 在 java.io.File.(File.java:222) 在 org.glassfish.webservices.monitoring.WebServiceTesterServlet.initializePort(WebServiceTesterServlet.java:505) 在 org.glassfish.webservices.monitoring.WebServiceTesterServlet.doGet (WebServiceTesterServlet.java:165)在org.glassfish.webservices.monitoring.WebServiceTesterServlet.invoke(WebServiceTesterServlet.java:100)在org.glassfish.webservices.JAXWSServlet.doGet(JAXWSServlet.java:195)在javax.servlet.http。 HttpServlet.service(HttpServlet.java:734) 在 javax.servlet.http.HttpServlet.service(HttpServlet.java:847) 在 org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1523) 在 org.apache .catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279)在org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:188)在org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java :641)在com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:97)在com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:85)在org.apache.catalina.core。 StandardHostValve.invoke(StandardHostValve.java:185) 位于 org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:325) 位于 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:226) 位于 com .sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:165) 位于 com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791) 位于 com.sun.grizzly.http.ProcessorTask .doProcess(ProcessorTask.java:693) 在 com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954) 在 com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170) 在 com. sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135) 在 com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102) 在 com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88) 在 com .sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76) 在 com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53) 在 com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57) )在 com.sun.grizzly.ContextTask.run(ContextTask.java:69) 在 com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330) 在 com.sun.grizzly.util.AbstractThreadPool$ Worker.run(AbstractThreadPool.java:309) 在 java.lang.Thread.run(Thread.java:619)
can any one please tell me what the problem is i am trying to create a new web service client in my client side project which already has a web service client i cant seem to figure out what is wrong
Exceptions details : null
java.lang.NullPointerException at java.io.File.(File.java:222) at org.glassfish.webservices.monitoring.WebServiceTesterServlet.initializePort(WebServiceTesterServlet.java:505) at org.glassfish.webservices.monitoring.WebServiceTesterServlet.doGet(WebServiceTesterServlet.java:165) at org.glassfish.webservices.monitoring.WebServiceTesterServlet.invoke(WebServiceTesterServlet.java:100) at org.glassfish.webservices.JAXWSServlet.doGet(JAXWSServlet.java:195) at javax.servlet.http.HttpServlet.service(HttpServlet.java:734) at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1523) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:188) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:641) at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:97) at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:85) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:185) at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:325) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:226) at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:165) at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791) at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693) at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954) at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170) at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88) at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76) at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53) at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57) at com.sun.grizzly.ContextTask.run(ContextTask.java:69) at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330) at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309) at java.lang.Thread.run(Thread.java:619)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这看起来像问题 GLASSFISH-14391。如果没有,请尝试使用您的 Glassfish 版本号和问题详细信息搜索 JIRA。
This looks like issue GLASSFISH-14391. If not, try searching JIRA with your Glassfish version number and problem details.
当我尝试不是从 localhost (
localhost:8080/WebService?Tester
) 而是从 IP 地址 (192.168例如.10.11:8080/WebService?Tester
)。浏览器产生了上述异常,而 GlassFish 3 控制台写了这样的内容:无法读取 WSDL 文档:
http://xxx,xxx,xxx,xxx:8080/WebService?WSDL
,因为我使用代理服务器访问互联网,所以我认为这可能是原因。
然后我进入 IDE 中的 GlassFish 3 服务器属性(在我的例子中是 NetBeans)并关闭选项“使用 IDE 代理设置”。到时候问题就解决了。
希望它能有所帮助。
I got the same problem, when I tried to test the web service not from localhost (
localhost:8080/WebService?Tester
) but from IP-address (192.168.10.11:8080/WebService?Tester
for example). Browser yielded the exception above while GlassFish 3 console wrote something like this:Failed to read the WSDL document:
http://xxx,xxx,xxx,xxx:8080/WebService?WSDL
, becauseI use a proxy-server for Internet access, so I thought it might be the reason.
Then I went to the GlassFish 3 server properties in IDE (NetBeans, in my case) and switched off the option "Use IDE proxy settings". The problem was solved by then.
Hope it can help.