4

我正在为我的应用程序使用 Open KM 应用程序框架。奇怪的是,有时我的代码中会出现 NoSuchMethodException 的可用方法。一旦我开始得到这个异常,它就会一直重复,直到我重新启动服务器(Jboss7)。一旦重新启动,这将工作文件直到某个时候,然后再次发生此异常并继续发生。

有人可以帮忙吗?

我的异常跟踪

19:34:10,725 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/CAMSWeb].[spring]] (http--192.168.1.62-8080-2) Servlet.service() for servlet spring threw exception: java.lang.NoSuchMethodException: com.openkm.ws.client.document.OKMDocument.create(java.lang.String, com.openkm.ws.client.document.Document, [B)
    at java.lang.Class.getMethod(Class.java:1622) [:1.7.0_09]
    at org.apache.cxf.jaxws.JAXWSMethodDispatcher.getImplementationMethod(JAXWSMethodDispatcher.java:109)
    at org.apache.cxf.jaxws.JAXWSMethodDispatcher.bind(JAXWSMethodDispatcher.java:55)
    at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.bindOperation(JaxWsServiceFactoryBean.java:280)
    at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.initializeWSDLOperation(JaxWsServiceFactoryBean.java:254)
    at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeWSDLOperations(ReflectionServiceFactoryBean.java:645)
    at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.initializeWSDLOperations(JaxWsServiceFactoryBean.java:289)
    at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromWSDL(ReflectionServiceFactoryBean.java:392)
    at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:499)
    at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:241)
    at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:202)
    at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:101)
    at org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:90)
    at org.apache.cxf.frontend.ClientProxyFactoryBean.create(ClientProxyFactoryBean.java:152)
    at org.apache.cxf.jaxws.JaxWsProxyFactoryBean.create(JaxWsProxyFactoryBean.java:142)
    at org.apache.cxf.jaxws.ServiceImpl.createPort(ServiceImpl.java:464)
    at org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:331)
    at org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:318)
    at javax.xml.ws.Service.getPort(Service.java:99) [jboss-jaxws-api_2.2_spec-2.0.0.Final.jar:2.0.0.Final]
    at com.openkm.ws.client.document.OKMDocument_Service.getOKMDocumentPort(OKMDocument_Service.java:72) [okm-ws-client-6.0.jar:]

我还放了一些其他的痕迹,以了解调用类和预期方法是什么。这些是结果

19:34:10,719 INFO  [stdout] (http--192.168.1.62-8080-2) Trying to fetch method ========      create from class : interface com.openkm.ws.client.document.OKMDocument
19:34:10,719 INFO  [stdout] (http--192.168.1.62-8080-2) Length of the method name  ======== 6
19:34:10,719 INFO  [stdout] (http--192.168.1.62-8080-2) The parameters for the expected method are
19:34:10,719 INFO  [stdout] (http--192.168.1.62-8080-2) >>>>>>>>>.... java.lang.String
19:34:10,719 INFO  [stdout] (http--192.168.1.62-8080-2) >>>>>>>>>....   com.openkm.ws.client.document.Document
19:34:10,719 INFO  [stdout] (http--192.168.1.62-8080-2) >>>>>>>>>.... [B

这是调用方法端点类的 getMethods 的结果

19:34:10,721 INFO  [stdout] (http--192.168.1.62-8080-2)  Method Name :: create
19:34:10,721 INFO  [stdout] (http--192.168.1.62-8080-2) Parameters.... java.lang.String
19:34:10,721 INFO  [stdout] (http--192.168.1.62-8080-2) Parameters....  com.openkm.ws.client.document.Document
19:34:10,721 INFO  [stdout] (http--192.168.1.62-8080-2) Parameters.... [B

我们可以看到调用签名是

create(String, com.openkm.ws.client.document.Document, byteArray)

并且目标类也有一个具有相同签名的方法,但有时我会得到这个 NoSucnMethodException 并且正如所说的那样,一旦它出现,它就会永远出现,直到我重新启动服务器。

任何帮助...

4

1 回答 1

0

com.openkm.ws.client.document.Document是一个接口。我怀疑运行时部署中缺少实现。

于 2013-01-22T06:03:08.313 回答