UDN-企业互联网技术人气社区

板块导航

浏览  : 1451
回复  : 10

webservice访问

[复制链接]
中间人的头像 楼主
发表于 2017-5-2 15:35:40 | 显示全部楼层 |阅读模式
发布webservice成功之后,访问http://127.0.0.1/uapws/service报500错误是怎么回事呢?

HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: Servlet.init() for servlet WebServiceServlet threw exception        org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)        org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)        org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)        org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)        org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)        org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)        org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)        java.lang.Thread.run(Thread.java:745)root cause
java.lang.ClassCastException: nc.uap.ws.engine.Engine cannot be cast to nc.uap.ws.Bus        nc.uap.ws.transport.servlet.InternalWebServiceServlet.loadBus(InternalWebServiceServlet.java:25)        nc.uap.ws.transport.http.servlet.AbstractWSServlet.init(AbstractWSServlet.java:38)        nc.uap.ws.transport.servlet.WebServiceServlet.init(WebServiceServlet.java:20)        org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)        org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)        org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)        org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)        org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)        org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)        org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)        java.lang.Thread.run(Thread.java:745)note The full stack trace of the root cause is available in the Apache Tomcat/5.5.9 logs.

Apache Tomcat/5.5.9
控制台报错:
2017-05-02 14:28:15,526 ERROR (ApplicationContext.java:665) - StandardWrapper.Throwable
java.lang.ClassCastException: nc.uap.ws.engine.Engine cannot be cast to nc.uap.ws.Bus
    at nc.uap.ws.transport.servlet.InternalWebServiceServlet.loadBus(InternalWebServiceServlet.java:25)
    at nc.uap.ws.transport.http.servlet.AbstractWSServlet.init(AbstractWSServlet.java:38)
    at nc.uap.ws.transport.servlet.WebServiceServlet.init(WebServiceServlet.java:20)
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1091)
    at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:750)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:130)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
    at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
    at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
    at java.lang.Thread.run(Thread.java:619)
2017-05-02 14:28:15,527 ERROR (StandardWrapperValve.java:145) - Allocate exception for servlet WebServiceServlet
java.lang.ClassCastException: nc.uap.ws.engine.Engine cannot be cast to nc.uap.ws.Bus
    at nc.uap.ws.transport.servlet.InternalWebServiceServlet.loadBus(InternalWebServiceServlet.java:25)
    at nc.uap.ws.transport.http.servlet.AbstractWSServlet.init(AbstractWSServlet.java:38)
    at nc.uap.ws.transport.servlet.WebServiceServlet.init(WebServiceServlet.java:20)
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1091)
    at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:750)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:130)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
    at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
    at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
    at java.lang.Thread.run(Thread.java:619)


中间人的头像 楼主
发表于 2017-5-2 16:53:13 | 显示全部楼层
问题解决了,因为在nchome里面起服务之后,在浏览器中访问webservice也是报的500错误,所以环境有问题,因为我把别人给我的有源码的module跟我的module替换了一下,所以环境有问题了,解决方法刚开始我把uapws模块给替换了  还是不行,之后我把整个module都换成我原来的module之后可以了。
使用道具 举报

回复

发表于 2018-12-19 09:38:23 | 显示全部楼层
module 替换啊。。我的是客户的u8c**,总不能把这个换成我的NC module吧
使用道具 举报

回复

发表于 2018-12-25 17:28:47 | 显示全部楼层
你好,**里,webservice主要两个地方注意一下,uap跟uapws,这两个模块内的meta-info里的lib下有个jar包,wsframework.jar ,主要是受他影响
使用道具 举报

回复

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关于我们
联系我们
  • 电话:010-86393388
  • 邮件:udn@yonyou.com
  • 地址:北京市海淀区北清路68号
移动客户端下载
关注我们
  • 微信公众号:yonyouudn
  • 扫描右侧二维码关注我们
  • 专注企业互联网的技术社区
版权所有:用友网络科技股份有限公司82041 京ICP备05007539号-11 京公网网备安1101080209224 Powered by Discuz!
快速回复 返回列表 返回顶部