Thanks Ant, Will do, and I'll get back to you when we've got more info.
Gk. -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of ant elder Sent: 03 August 2011 10:32 To: [email protected] Subject: Re: Exceptions occur over time. Hi Gregor, I've created a JIRA for this - https://issues.apache.org/jira/browse/TUSCANY-3909 and I've attached two jars of modules modified to log some additional debug information. There is a tag of the SVN for the changes so you can see whats changed by doing: svn diff https://svn.apache.org/repos/asf/tuscany/sca-java-1.x/tags/1.6/modules https://svn.apache.org/repos/asf/tuscany/sca-java-1.x/tags/1.6-TUSCANY-3909 and that shows: Index: implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/invocation/SpringInvoker.java =================================================================== --- implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/invocation/SpringInvoker.java (.../1.6/modu les) (revision 1153405) +++ implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/invocation/SpringInvoker.java (.../1.6-TUSC ANY-3909) (revision 1153405) @@ -20,6 +20,7 @@ import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; +import java.util.logging.Logger; import org.apache.tuscany.sca.implementation.spring.SpringBeanElement; import org.apache.tuscany.sca.implementation.spring.SpringImplementation; @@ -35,6 +36,7 @@ * @version $Rev: 511195 $ $Date: 2007-02-24 02:29:46 +0000 (Sat, 24 Feb 2007) $ */ public class SpringInvoker implements Invoker { + private static final Logger logger = Logger.getLogger(SpringInvoker.class.getName()); private Method theMethod = null; private Object bean; @@ -99,6 +101,9 @@ return ret; } catch (InvocationTargetException e) { throw new SpringInvocationException("Spring invoker invoke method '"+ theMethod.getName()+"' error.",e.getCause()); + } catch (RuntimeException e) { + logger.severe("TUSCANY-3909: RuntimeException, payload: " + payload + " payload type: " + (payload==null? null : payl oad.getClass()) + " method: " + theMethod); + throw new SpringInvocationException("Spring invoker invoke method '"+ theMethod.getName()+"' error.",e); } catch (Exception e) { throw new SpringInvocationException("Spring invoker invoke method '"+ theMethod.getName()+"' error.",e); } Index: host-jms-asf/src/main/java/org/apache/tuscany/sca/host/jms/asf/ServiceInvoker.java =================================================================== --- host-jms-asf/src/main/java/org/apache/tuscany/sca/host/jms/asf/ServiceInvoker.java (.../1.6/modules) (revision 1153405) +++ host-jms-asf/src/main/java/org/apache/tuscany/sca/host/jms/asf/ServiceInvoker.java (.../1.6-TUSCANY-3909) (revision 1153405) @@ -26,6 +26,8 @@ import javax.jms.JMSException; import javax.jms.Message; import javax.jms.MessageListener; +import javax.jms.ObjectMessage; +import javax.jms.TextMessage; import javax.naming.NamingException; import org.apache.tuscany.sca.assembly.Binding; @@ -69,6 +71,20 @@ try { invokeService(requestJMSMsg); } catch (Throwable e) { + try { + Object payload = null; + String type = null; + if (requestJMSMsg instanceof TextMessage) { + payload = ((TextMessage)requestJMSMsg).getText(); + type = "text"; + } else if (requestJMSMsg instanceof ObjectMessage) { + payload = ((ObjectMessage)requestJMSMsg).getObject(); + type = "objcet"; + } + logger.severe("TUSCANY-3909: Throwable, requestJMSMsg type: " + type + " payload: " + payload); + } catch (JMSException e1) { + logger.log(Level.SEVERE, "TUSCANY-3909: JMSException getting debug info", e1); + } logger.log(Level.SEVERE, "Exception send fault response '" + service.getName(), e); } } Property changes on: . ___________________________________________________________________ Added: svn:mergeinfo Merged /tuscany/branches/sca-java-1.3/modules:r671193 Can you try running with these and let us know what they show. Thanks, ...ant On Fri, Jul 29, 2011 at 2:50 PM, Gregor Kiddie <[email protected]> wrote: > We can replicate the error in QA, so throw us the altered jar and we'll get > something back to work with. > > Gk. > > -----Original Message----- > From: [email protected] [mailto:[email protected]] On Behalf Of ant elder > Sent: 29 July 2011 14:46 > To: [email protected] > Subject: Re: Exceptions occur over time. > > How easy will it be for you to run with mod and catch the error again? > Do we need to think really hard about all the different possibilities > and design a comprehensive trap now up front or can we do something > quick and simple first and based on the results of that if we need > more or different info can we write another trap patch for you to try? > > From a quick look it seems like if > org.apache.tuscany.sca.host.jms.asf.ServiceInvoker.onMessage was > changed to dumped out the context of the JMS request message on an > exception and > org.apache.tuscany.sca.implementation.spring.invocation.SpringInvoker.doInvoke > did the same with the request it gets then that would give us a > better picture of what the request objects looked like and why its > getting an argument type mismatch. > > ...ant > > On Fri, Jul 29, 2011 at 10:49 AM, ant elder <[email protected]> wrote: >> Ok, can you give me some more detail about what you're doing. Do you >> have the complete stacktrace from that exception? It looks like thats >> using <implementation.spring> and you've said it uses the JMS binding >> so can you you show the composite for that with the binding >> configuration. Are you running a Tuscany standalone runtime or in a >> webapp or something else? >> >> ...ant >> >> On Fri, Jul 29, 2011 at 10:37 AM, Gregor Kiddie >> <[email protected]> wrote: >>> I'd be overjoyed with that! >>> >>> Gk. >>> >>> -----Original Message----- >>> From: ant elder [mailto:[email protected]] >>> Sent: 29 July 2011 10:23 >>> To: [email protected] >>> Subject: Re: Exceptions occur over time. >>> >>> This sounds like it could be quite hard to track down. Would it be >>> possible to give you a patched version of the code which you then run >>> with and try to recreate? If so we could patch the code so that when >>> that particular exception happens we try to dump out more detailed >>> diagnostics to see if that could help pin down whats happening. >>> >>> ...ant >>> >>> On Tue, Jul 26, 2011 at 1:43 PM, Gregor Kiddie >>> <[email protected]> wrote: >>>> Tuscany 1.6 (Getting that up front as I always forget!) >>>> >>>> >>>> >>>> We're getting this error occurring over time in our application. It's a >>>> distributed Domain spread over 5 machines using JMS as the transport. When >>>> the modules start, all communication is fine. After a period of time >>>> (random, but never shorter than a couple of hours), some of the connections >>>> start getting this error. Nothing changes code wise between the application >>>> working, and not working. >>>> >>>> >>>> >>>> >>>> >>>> remote service exception, see nested exception >>>> >>>> java.lang.RuntimeException: Message = argument type mismatch >>>> >>>> >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native >>>> Method) >>>> >>>> >> at >>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) >>>> >>>> >> at >>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) >>>> >>>> >> at java.lang.reflect.Method.invoke(Method.java:597) >>>> >>>> >> at >>>> org.apache.tuscany.sca.implementation.spring.invocation.SpringInvoker.doInvoke(SpringInvoker.java:97) >>>> >>>> >> at >>>> org.apache.tuscany.sca.implementation.spring.invocation.SpringInvoker.invoke(SpringInvoker.java:113) >>>> >>>> >> at >>>> org.apache.tuscany.sca.core.databinding.wire.PassByValueInterceptor.invoke(PassByValueInterceptor.java:60) >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> Any suggestions as to why this is happening, as we can't see any good >>>> reason >>>> for this happening! >>>> >>>> >>>> >>>> Gk. >>> >> >
