[jboss-jira] [JBoss JIRA] Updated: (JBAOP-563) get(FieldReadInvocation invocation) signature not supported

Galder Zamarreno (JIRA) jira-events at lists.jboss.org
Wed Apr 23 11:26:45 EDT 2008


     [ http://jira.jboss.com/jira/browse/JBAOP-563?page=all ]

Galder Zamarreno updated JBAOP-563:
-----------------------------------

    Workaround Description: 
Change the signature to something like this:

public Object get(Invocation invocation)

And within it, do something along the lines after refactoring 
get(FieldReadInvocation invocation) into 
_get(FieldReadInvocation invocation):

public Object get(Invocation invocation) 
{
  if(invocation instanceof FieldReadInvocation) 
  {
    return _get(((FieldReadInvocation)invocation));
  } 
  
   return  null;
}
               Description: 
Creating an Advice containing a method with this signature:

public Object get(FieldReadInvocation invocation)

Throws an Exception like this:

java.lang.ClassCastException: com.foo.bar.portal.presentation.DefaultActionBeanContext$portalService_Set
        at org.jboss.aop.advice.com.foo.bar.core.aop.aspects.InjectSessionBeanAspect1.invoke(InjectSessionBeanAspect1.java)
        at com.foo.bar.portal.presentation.DefaultActionBeanContext$portalService_Set.invokeNext(DefaultActionBeanContext$portalService_Set.java)
        at com.foo.bar.portal.presentation.DefaultActionBeanContext.portalService_w_$aop(DefaultActionBeanContext.java)
        at com.foo.bar.portal.presentation.DefaultActionBeanContext.<init>(DefaultActionBeanContext.java:40)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
        at java.lang.Class.newInstance0(Class.java:350)
        at java.lang.Class.newInstance(Class.java:303)

  was:
Creating an Advice containing a method with this signature:

public Object get(FieldReadInvocation invocation)	

Throws an Exception like this:

java.lang.ClassCastException: com.foo.bar.portal.presentation.DefaultActionBeanContext$portalService_Set
        at org.jboss.aop.advice.com.foo.bar.core.aop.aspects.InjectSessionBeanAspect1.invoke(InjectSessionBeanAspect1.java)
        at com.foo.bar.portal.presentation.DefaultActionBeanContext$portalService_Set.invokeNext(DefaultActionBeanContext$portalService_Set.java)
        at com.foo.bar.portal.presentation.DefaultActionBeanContext.portalService_w_$aop(DefaultActionBeanContext.java)
        at com.foo.bar.portal.presentation.DefaultActionBeanContext.<init>(DefaultActionBeanContext.java:40)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
        at java.lang.Class.newInstance0(Class.java:350)
        at java.lang.Class.newInstance(Class.java:303)

                Workaround: [Workaround Exists]

> get(FieldReadInvocation invocation) signature not supported
> -----------------------------------------------------------
>
>                 Key: JBAOP-563
>                 URL: http://jira.jboss.com/jira/browse/JBAOP-563
>             Project: JBoss AOP
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>    Affects Versions: 1.5.5.GA
>            Reporter: Galder Zamarreno
>
> Creating an Advice containing a method with this signature:
> public Object get(FieldReadInvocation invocation)
> Throws an Exception like this:
> java.lang.ClassCastException: com.foo.bar.portal.presentation.DefaultActionBeanContext$portalService_Set
>         at org.jboss.aop.advice.com.foo.bar.core.aop.aspects.InjectSessionBeanAspect1.invoke(InjectSessionBeanAspect1.java)
>         at com.foo.bar.portal.presentation.DefaultActionBeanContext$portalService_Set.invokeNext(DefaultActionBeanContext$portalService_Set.java)
>         at com.foo.bar.portal.presentation.DefaultActionBeanContext.portalService_w_$aop(DefaultActionBeanContext.java)
>         at com.foo.bar.portal.presentation.DefaultActionBeanContext.<init>(DefaultActionBeanContext.java:40)
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>         at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
>         at java.lang.Class.newInstance0(Class.java:350)
>         at java.lang.Class.newInstance(Class.java:303)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list