Flex Blazeds Java NoSuchMethodException

时间:2010-08-29 03:41:35

标签: flex spring remoting jms blazeds

我们有一个Flex-BlazeDS-Spring-JMS应用程序。问题是有时我们得到Blazeds错误:NoSuchMethodException。它无法找到Java服务。这个奇怪的问题并没有发生在所有项目中......一次通过并返回结果,第二次失败,第三次失败等等。此外,并非所有方法都失败,只有2个方法调用失败。

弹性方法:

patientModel.patientRequest.startIndex=1;
patientModel.patientRequest.numberOfItems=10;
patientModel.patientRequest.medicareId=null;
patientModel.patientRequest.dateOfBirth = DateField.stringToDate("04/21/1982","MM/DD/YYYY");
//patientModel.patientRequest.dateOfBirth = new Date();
patientModel.patientRequest.lastName="null;
patientModel.patientRequest.firstName="leo";

return service.getPatientDataMeasurements(patientModel.patientRequest);

Java方法:

public PatientDataMeasurementCollectionList getPatientDataMeasurements(
   PatientDataRequest request);

XML响应:

<ns1:CMSRemoteResponse xmlns:ns1="http://cms.hhs.gov/common/remoting/schema"><CMSDASOutboundHeader><ResponseCMSHeader><HeaderVersion>1.0</HeaderVersion><ServiceName>TestService</ServiceName><ServiceVersion>1.0</ServiceVersion><ServiceType>getPatientDataMeasurements</ServiceType><CompletionCd>7</CompletionCd><LocationCd>3</LocationCd><ComponentCd>2</ComponentCd><Errors><Error><ErrorCode>XXX</ErrorCode><ErrorType>NoSuchMethodException</ErrorType><ErrorMessage>$Proxy17.getPatientDataMeasurements(gov.hhs.cms.ehrds.datacollection.model.PatientDataRequest)</ErrorMessage></Error></Errors></ResponseCMSHeader><ExecutedCMSHeader><HeaderVersion>1.0</HeaderVersion><ServiceName>TestService</ServiceName><ServiceVersion>1.0</ServiceVersion><ServiceType>getPatientDataMeasurements</ServiceType></ExecutedCMSHeader><NewCMSHeader><HeaderVersion>1.0</HeaderVersion><ServiceName>TestService</ServiceName><ServiceVersion>1.0</ServiceVersion><ServiceType>getPatientDataMeasurements</ServiceType></NewCMSHeader></CMSDASOutboundHeader><InboundReqeust><UserInfo><UserId>test123</UserId><RoleNames/></UserInfo><ns1:PatientDataRequest xmlns:ns1="http://cms.hhs.gov/ehrds/datacollection/model"><StartIndex>1</StartIndex><NumberOfItems>10</NumberOfItems><MedicareId>AB123456789</MedicareId><DateOfBirth>2010-08-29T02:55:08.562Z</DateOfBirth><FirstName>leo</FirstName><LastName>cap</LastName></ns1:PatientDataRequest></InboundReqeust><CMSDASResponseBody/></ns1:CMSRemoteResponse>

例外:

BlazeDS Error Detectedorg.springframework.remoting.RemoteInvocationFailureException: Invocation of method [public abstract gov.hhs.cms.ehrds.datacollection.model.PatientDataMeasurementCollectionList gov.hhs.cms.ebs.ehrds.datacollection.service.PatientDataMeasurementService.getPatientDataMeasurements(gov.hhs.cms.ehrds.datacollection.model.PatientDataRequest)] failed in JMS invoker remote service at queue [queue://DS1CN3009/EHR.DATACOLLECTION.PATIENT.REQUEST.1]; nested exception is gov.hhs.cms.common.exception.CodedException: $Proxy17.getPatientDataMeasurements(gov.hhs.cms.ehrds.datacollection.model.PatientDataRequest)
[8/28/10 22:55:08:828 EDT] 00000037 ExceptionTran E com.newwave.ExceptionLogger translate BlazeDS Error Detected
                                 org.springframework.remoting.RemoteInvocationFailureException: Invocation of method [public abstract gov.hhs.cms.ehrds.datacollection.model.PatientDataMeasurementCollectionList gov.hhs.cms.ebs.ehrds.datacollection.service.PatientDataMeasurementService.getPatientDataMeasurements(gov.hhs.cms.ehrds.datacollection.model.PatientDataRequest)] failed in JMS invoker remote service at queue [queue://DS1CN3009/EHR.DATACOLLECTION.PATIENT.REQUEST.1]; nested exception is gov.hhs.cms.common.exception.CodedException: $Proxy17.getPatientDataMeasurements(gov.hhs.cms.ehrds.datacollection.model.PatientDataRequest)
 at org.springframework.jms.remoting.JmsInvokerClientInterceptor.invoke(JmsInvokerClientInterceptor.java:211)
 at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
 at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
 at $Proxy21.getPatientDataMeasurements(Unknown Source)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:618)
 at flex.messaging.services.remoting.adapters.JavaAdapter.invoke(JavaAdapter.java:421)
 at flex.messaging.services.RemotingService.serviceMessage(RemotingService.java:183)
 at flex.messaging.MessageBroker.routeMessageToService(MessageBroker.java:1503)
 at flex.messaging.endpoints.AbstractEndpoint.serviceMessage(AbstractEndpoint.java:884)
 at flex.messaging.endpoints.AbstractEndpoint$$FastClassByCGLIB$$1a3ef066.invoke(<generated>)
 at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
 at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:692)
 at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
 at org.springframework.flex.core.MessageInterceptionAdvice.invoke(MessageInterceptionAdvice.java:66)
 at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
 at org.springframework.aop.framework.adapter.ThrowsAdviceInterceptor.invoke(ThrowsAdviceInterceptor.java:124)
 at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
 at org.springframework.aop.framework.Cglib2AopProxy$FixedChainStaticTargetInterceptor.intercept(Cglib2AopProxy.java:576)
 at flex.messaging.endpoints.AMFEndpoint$$EnhancerByCGLIB$$f3ce9468.serviceMessage(<generated>)
 at flex.messaging.endpoints.amf.MessageBrokerFilter.invoke(MessageBrokerFilter.java:121)
 at flex.messaging.endpoints.amf.LegacyFilter.invoke(LegacyFilter.java:158)
 at flex.messaging.endpoints.amf.SessionFilter.invoke(SessionFilter.java:44)
 at flex.messaging.endpoints.amf.BatchProcessFilter.invoke(BatchProcessFilter.java:67)
 at flex.messaging.endpoints.amf.SerializationFilter.invoke(SerializationFilter.java:146)
 at flex.messaging.endpoints.BaseHTTPEndpoint.service(BaseHTTPEndpoint.java:278)
 at flex.messaging.endpoints.AMFEndpoint$$EnhancerByCGLIB$$f3ce9468.service(<generated>)
 at org.springframework.flex.servlet.MessageBrokerHandlerAdapter.handle(MessageBrokerHandlerAdapter.java:101)
 at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875)
 at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:807)
 at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)
 at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:511)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
 at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1146)
 at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:592)
 at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:525)
 at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:90)
 at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:751)
 at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1478)
 at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:126)
 at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:458)
 at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:387)
 at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:267)
 at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
 at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
 at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
 at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
 at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
 at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
 at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:196)
 at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:751)
 at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:881)
 at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1497)
Caused by: gov.hhs.cms.common.exception.CodedException: $Proxy17.getPatientDataMeasurements(gov.hhs.cms.ehrds.datacollection.model.PatientDataRequest)
 at gov.hhs.cms.common.remoting.jms.JibxClientRemoteMessageConverter.fromMessage(JibxClientRemoteMessageConverter.java:160)
 at org.springframework.jms.remoting.JmsInvokerClientInterceptor.extractInvocationResult(JmsInvokerClientInterceptor.java:396)
 at org.springframework.jms.remoting.JmsInvokerClientInterceptor.executeRequest(JmsInvokerClientInterceptor.java:249)
 at org.springframework.jms.remoting.JmsInvokerClientInterceptor.invoke(JmsInvokerClientInterceptor.java:198)
 at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
 at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
 at $Proxy21.getPatientDataMeasurements(Unknown Source)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:618)
 at flex.messaging.services.remoting.adapters.JavaAdapter.invoke(JavaAdapter.java:421)
 at flex.messaging.services.RemotingService.serviceMessage(RemotingService.java:183)
 at flex.messaging.MessageBroker.routeMessageToService(MessageBroker.java:1503)
 at flex.messaging.endpoints.AbstractEndpoint.serviceMessage(AbstractEndpoint.java:884)
 at flex.messaging.endpoints.AbstractEndpoint$$FastClassByCGLIB$$1a3ef066.invoke(<generated>)
 at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
 at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:692)
 at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
 at org.springframework.flex.core.MessageInterceptionAdvice.invoke(MessageInterceptionAdvice.java:66)
 at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
 at org.springframework.aop.framework.adapter.ThrowsAdviceInterceptor.invoke(ThrowsAdviceInterceptor.java:124)
 at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
 at org.springframework.aop.framework.Cglib2AopProxy$FixedChainStaticTargetInterceptor.intercept(Cglib2AopProxy.java:576)
 at flex.messaging.endpoints.AMFEndpoint$$EnhancerByCGLIB$$f3ce9468.serviceMessage(<generated>)
 at flex.messaging.endpoints.amf.MessageBrokerFilter.invoke(MessageBrokerFilter.java:121)
 at flex.messaging.endpoints.amf.LegacyFilter.invoke(LegacyFilter.java:158)
 at flex.messaging.endpoints.amf.SessionFilter.invoke(SessionFilter.java:44)
 at flex.messaging.endpoints.amf.BatchProcessFilter.invoke(BatchProcessFilter.java:67)
 at flex.messaging.endpoints.amf.SerializationFilter.invoke(SerializationFilter.java:146)
 at flex.messaging.endpoints.BaseHTTPEndpoint.service(BaseHTTPEndpoint.java:278)
 at flex.messaging.endpoints.AMFEndpoint$$EnhancerByCGLIB$$f3ce9468.service(<generated>)
 at org.springframework.flex.servlet.MessageBrokerHandlerAdapter.handle(MessageBrokerHandlerAdapter.java:101)
 at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875)
 at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:807)
 at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)
 at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:511)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
 at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1146)
 at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:592)
 at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:525)
 at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:90)
 at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:751)
 at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1478)
 at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:126)
 at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:458)
 at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:387)
 at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:267)
 at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
 at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
 at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
 at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
 at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
 at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
 at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:196)
 at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:751)
 at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:881)
 at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1497)
 at org.springframework.remoting.support.RemoteInvocationUtils.fillInClientStackTraceIfPossible(RemoteInvocationUtils.java:47)
 at org.springframework.remoting.support.RemoteInvocationResult.recreate(RemoteInvocationResult.java:115)
 at org.springframework.jms.remoting.JmsInvokerClientInterceptor.recreateRemoteInvocationResult(JmsInvokerClientInterceptor.java:429)
 at org.springframework.jms.remoting.JmsInvokerClientInterceptor.invoke(JmsInvokerClientInterceptor.java:204)
 ... 55 more

我们不确定这是Flex-BlazeDS错误还是Spring Remoting问题。如果有人可以帮助解决这个问题,那就非常感激。

由于

哈里什

2 个答案:

答案 0 :(得分:0)

我不太了解所涉及的技术(除了Java),但有些调用是否可能使用不同的类加载器?相同类型的对象,但其类由不同的类加载器加载,被认为是不兼容的,可能导致没有这样的方法错误。

答案 1 :(得分:0)

感谢您的回答。但是我们已经解决了这个问题...我已经为2个服务提供了1个队列,并且它正在服务一次正确的服务并且下次没有找到该方法的错误服务...无论如何它已经解决了:)