Sorry about the description being vague. I'll see if I can break out that part of the system into a test case later this week. When that exception was thrown it also put the system into a unusable state where I had to kill the java process running JBoss where the webapp was deployed (trying to shutdown JBoss had no effect). Both component implementations are java, using the default binding, COMPOSITE scoped, and EagerInit. ________________________________________ From: Simon Nash [[email protected]] Sent: Tuesday, September 22, 2009 8:57 AM To: [email protected] Subject: Re: UndeclaredThrowableException when using reference
Phillips, Chad wrote: > In my composite app I have ComponentA which has a reference to ComponentB. > I'm seeing an intermittent issue where ComponentA tries to invoke a method > from ComponentB and an UndeclaredThrowableException is thrown. This isn't > using an official release (its 1.5.1 SNAPSHOT r810694) so this may have > already been fixed. Here is the stack trace: > > java.lang.reflect.UndeclaredThrowableException > at $Proxy234.getTaskRecord(Unknown Source) > at test.ComponentA.performTask(ComponentA.java:213) > at test.ComponentA$TaskRunner.run(ComponentA.java:698) > at > java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675) > at java.lang.Thread.run(Thread.java:595) > Caused by: org.apache.tuscany.sca.core.scope.TargetInitializationException: > java.lang.NullPointerException > at > org.apache.tuscany.sca.core.scope.CompositeScopeContainer.getWrapper(CompositeScopeContainer.java:65) > at > org.apache.tuscany.sca.implementation.java.invocation.JavaImplementationInvoker.invoke(JavaImplementationInvoker.java:103) > at > org.apache.tuscany.sca.binding.sca.impl.SCABindingInvoker.invoke(SCABindingInvoker.java:61) > at > org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:346) > at > org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:193) > ... 6 more > Caused by: java.lang.NullPointerException > at > org.apache.tuscany.sca.core.scope.CompositeScopeContainer.getWrapper(CompositeScopeContainer.java:54) > ... 10 more > > Can you post a test case for this? It looks like the original NPE is caused by the call to AbstractScopeContainer.createInstanceWrapper() returning null, which would happen if the implementationProvider is not an instance of ScopedImplementationProvider. Without more details of the test case, it's hard to see what could be causing this. Simon
