gpt4 book ai didi

java - 调用网络服务

转载 作者:行者123 更新时间:2023-11-30 07:29:02 25 4
gpt4 key购买 nike

我编写了一个似乎运行良好的 Web 服务 - 我可以使用 Netbeans 界面调用它。我还编写了另一个应用程序,可以在 Netbeans 编译器 (6.7.1) 中运行时调用它。但是,当我将它部署在 Tomcat 下的托管服务器上时 - 一旦访问 Web 服务,就会抛出以下错误页面:

>Description: An unhandled exception occurred during the execution of the web application. >Please review the following stack trace for more information regarding the error.
>
>Exception Details: java.lang.NoClassDefFoundError
> javax/xml/rpc/ServiceException
>
>Possible Source of Error:
> Class Name: java.lang.Class
> File Name: Class.java
> Method Name: getDeclaredConstructors0
> Line Number: -2
>
>Source not available. Information regarding the location of the exception can be identified using the exception stack trace below.
>
>Stack Trace:
>
>java.lang.Class.getDeclaredConstructors0(Class.java:-2)
>java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
>java.lang.Class.getConstructor0(Class.java:2699)
>java.lang.Class.newInstance0(Class.java:326)
>java.lang.Class.newInstance(Class.java:308)
>java.beans.Beans.instantiate(Beans.java:204)
>java.beans.Beans.instantiate(Beans.java:48)
>com.sun.faces.config.ManagedBeanFactory.newInstance(ManagedBeanFactory.java:203)
>com.sun.faces.application.ApplicationAssociate.createAndMaybeStoreManagedBeans(ApplicationAssociate.java:274)
>com.sun.faces.el.VariableResolverImpl.resolveVariable(VariableResolverImpl.java:78)
>com.sun.rave.web.ui.appbase.faces.VariableResolverImpl.resolveVariable(VariableResolverImpl.java:96)
>com.sun.rave.web.ui.appbase.FacesBean.getBean(FacesBean.java:231)

最佳答案

Exception Details: java.lang.NoClassDefFoundError javax/xml/rpc/ServiceException

这意味着您缺少提供 javax.xml.rpc.ServiceException 的 jar。将其添加到您的项目并重新部署,它应该会消失。

关于java - 调用网络服务,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8802758/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com