Dear Sahoo, Sivakumar
About GLASSFISH-18370(
http://java.net/jira/browse/GLASSFISH-18370),
I have finished the investigation and made a revise which is on
https://github.com/tangyong/GLASSFISH-18370.
I modifed the stockquote-cdi-osgi-sample and can trigger the
UndeclaredThrowableException, you can get the sample from the above
github url.
Just as aaronjwhiteside said: we really need to get the cause of
InvocationTargetException, otherwise, once InvocationTargetException
happened, UndeclaredThrowableException will be thrown by a method
invocation on a proxy instance[1].
[1]: About "UndeclaredThrowableException"
http://docs.oracle.com/javase/6/docs/api/java/lang/reflect/UndeclaredThrowableException.html
In addition, besides
org.glassfish.osgicdi.impl.OSGiServiceFactory$DynamicInvocationHandler.invoke
method,
org.glassfish.osgicdi.impl.OSGiServiceFactory$StaticInvocationHandler.invoke
method should be also revised when not using "dynamic = true".
>sahoo
If you have more time, please review my revise. I will continue to
investigate the next topic.
Thanks aaronjwhiteside too !
--Best Regard!
--Tang