橙稚
2017-09-18 01:08
采纳率: 63.5%
浏览 1.7k
已采纳

webservice 问题,求大神帮忙

我是用JDK的wsimport方式创建的webservice,写的demo没有问题,但是一操作数据库,就报错500,但是服务端也就是简单的操作,代码肯定没有问题,还是需要配置什么东西?我是在springMVC里写的客户端与服务端,数据库mybatis,
这是服务端,只是将传的值截取并存入name字段这是客户端,错误

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

3条回答 默认 最新

  • Nice菜鸟 2017-09-18 02:08
    已采纳

    是eclipse 问题,工具具备的jar 有些丢失,下载个绿色版,代码是没问题的。加入 servlet-api.jar 就刷新一下,就好了.

    点赞 评论
  • 橙稚 2017-09-18 02:36

    webservice调试依然报错

    点赞 评论
  • 橙稚 2017-09-18 05:39
     九月 18, 2017 1:38:23 下午 com.sun.xml.internal.ws.server.sei.TieHandler createResponse
    严重: null
    java.lang.NullPointerException
        at com.bjhnd.Service.DatacenterMiddle.DatacenterMiddle.save(DatacenterMiddle.java:23)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:71)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:275)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at com.sun.xml.internal.ws.api.server.MethodUtil.invoke(MethodUtil.java:68)
        at com.sun.xml.internal.ws.api.server.InstanceResolver$1.invoke(InstanceResolver.java:235)
        at com.sun.xml.internal.ws.server.InvokerTube$2.invoke(InvokerTube.java:134)
        at com.sun.xml.internal.ws.server.sei.SEIInvokerTube.processRequest(SEIInvokerTube.java:73)
        at com.sun.xml.internal.ws.api.pipe.Fiber.__doRun(Fiber.java:1121)
        at com.sun.xml.internal.ws.api.pipe.Fiber._doRun(Fiber.java:1035)
        at com.sun.xml.internal.ws.api.pipe.Fiber.doRun(Fiber.java:1004)
        at com.sun.xml.internal.ws.api.pipe.Fiber.runSync(Fiber.java:862)
        at com.sun.xml.internal.ws.server.WSEndpointImpl$2.process(WSEndpointImpl.java:404)
        at com.sun.xml.internal.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:706)
        at com.sun.xml.internal.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:260)
        at com.sun.xml.internal.ws.transport.http.server.WSHttpHandler.handleExchange(WSHttpHandler.java:98)
        at com.sun.xml.internal.ws.transport.http.server.WSHttpHandler.handle(WSHttpHandler.java:82)
        at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:79)
        at sun.net.httpserver.AuthFilter.doFilter(AuthFilter.java:83)
        at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:82)
        at sun.net.httpserver.ServerImpl$Exchange$LinkHandler.handle(ServerImpl.java:675)
        at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:79)
        at sun.net.httpserver.ServerImpl$Exchange.run(ServerImpl.java:647)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
    
    九月 18, 2017 1:38:23 下午 com.sun.xml.internal.ws.transport.http.HttpAdapter$HttpToolkit handle
    严重: Unknown JAXBContext implementation: class com.sun.xml.bind.v2.runtime.JAXBContextImpl
    com.sun.xml.internal.ws.spi.db.DatabindingException: Unknown JAXBContext implementation: class com.sun.xml.bind.v2.runtime.JAXBContextImpl
        at com.sun.xml.internal.ws.spi.db.BindingContextFactory.getJAXBFactory(BindingContextFactory.java:192)
        at com.sun.xml.internal.ws.spi.db.BindingContextFactory.create(BindingContextFactory.java:134)
        at com.sun.xml.internal.ws.message.jaxb.JAXBMessage.create(JAXBMessage.java:152)
        at com.sun.xml.internal.ws.fault.SOAPFaultBuilder.createSOAP11Fault(SOAPFaultBuilder.java:424)
        at com.sun.xml.internal.ws.fault.SOAPFaultBuilder.createSOAPFaultMessage(SOAPFaultBuilder.java:201)
        at com.sun.xml.internal.ws.fault.SOAPFaultBuilder.createSOAPFaultMessage(SOAPFaultBuilder.java:189)
        at com.sun.xml.internal.ws.server.WSEndpointImpl$2.process(WSEndpointImpl.java:411)
        at com.sun.xml.internal.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:706)
        at com.sun.xml.internal.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:260)
        at com.sun.xml.internal.ws.transport.http.server.WSHttpHandler.handleExchange(WSHttpHandler.java:98)
        at com.sun.xml.internal.ws.transport.http.server.WSHttpHandler.handle(WSHttpHandler.java:82)
        at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:79)
        at sun.net.httpserver.AuthFilter.doFilter(AuthFilter.java:83)
        at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:82)
        at sun.net.httpserver.ServerImpl$Exchange$LinkHandler.handle(ServerImpl.java:675)
        at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:79)
        at sun.net.httpserver.ServerImpl$Exchange.run(ServerImpl.java:647)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
    
    点赞 评论

相关推荐 更多相似问题