[weld-issues] [JBoss JIRA] Commented: (WELD-870) Add injection point information to exception message when injection into observer fails

Pete Muir (JIRA) jira-events at lists.jboss.org
Mon Mar 21 07:07:45 EDT 2011


    [ https://issues.jboss.org/browse/WELD-870?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12589267#comment-12589267 ] 

Pete Muir commented on WELD-870:
--------------------------------

They should be.

> Add injection point information to exception message when injection into observer fails
> ---------------------------------------------------------------------------------------
>
>                 Key: WELD-870
>                 URL: https://issues.jboss.org/browse/WELD-870
>             Project: Weld
>          Issue Type: Enhancement
>          Components: Events
>    Affects Versions: 1.1.0.Final
>            Reporter: Dan Allen
>
> Injections that fail when an observer method is invoked are massively hard to track down. Here's the information you get:
> org.jboss.weld.exceptions.IllegalArgumentException: WELD-001324 Argument bean must not be null
>    at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:714)
>    at org.jboss.seam.exception.control.HandlerMethodImpl.notify(HandlerMethodImpl.java:187)
>    at org.jboss.seam.exception.control.ExceptionHandlerDispatch.executeHandlers(ExceptionHandlerDispatch.java:128)
>    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>    at java.lang.reflect.Method.invoke(Method.java:616)
>    at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:305)
>    at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:54)
>    at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:163)
>    at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:299)
>    at org.jboss.weld.introspector.jlr.WeldMethodImpl.invokeOnInstance(WeldMethodImpl.java:188)
>    at org.jboss.weld.introspector.ForwardingWeldMethod.invokeOnInstance(ForwardingWeldMethod.java:59)
>    at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:198)
>    at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:270)
>    at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:253)
>    at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:222)
>    at org.jboss.weld.manager.BeanManagerImpl.notifyObservers(BeanManagerImpl.java:632)
>    at org.jboss.weld.manager.BeanManagerImpl.fireEvent(BeanManagerImpl.java:619)
>    at org.jboss.weld.manager.BeanManagerImpl.fireEvent(BeanManagerImpl.java:613)
> I expect to see the type and qualifiers at the failing injection point. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the weld-issues mailing list