views:

98

answers:

2

Hi All

We have a Flex-BlazeDS-Spring-JMS application. The issue is sometimes we get a Blazeds error: NoSuchMethodException. It is not able to find the Java service. The weird issue with this it does not happen all the item...1 time it goes through and returns the result, the 2nd time it fails, 3rd time fails and so on. Also not all methods fail, only 2 method calls fail.

Flex Method:

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 Method:

public PatientDataMeasurementCollectionList getPatientDataMeasurements(
   PatientDataRequest request);

XML Response:

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

Exception:

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

We are not sure if this a Flex - BlazeDS error or Spring Remoting issue. Appreciate it a lot if anyone can help on this issue.

Thanks

Harish

A: 

I don't know much about the technologies involved (besides Java), but is it possible that some of the invocations are using different class loaders? Objects of the same type, but whose classes are loaded by different class loaders, are considered to be incompatible and that might lead to a no such method error.

mlaw
A: 

Thanks for your answer. But we have resolvd the issue...I had given 1 queue for 2 services and it was serving the right service one time and went to the wrong service the next time and was not able to find the method...anyway it is solved :)

Harish