5 Replies Latest reply on Nov 14, 2011 1:02 PM by Bernard Labno

    NullPointerException with Seam SecurityInterceptor

    Stijn Cremers Novice

      It looks like there is a bug in the SecurityInterceptor.


      I have a class annotated with a security binding.


      @SecurityBindingType
      @Retention(RetentionPolicy.RUNTIME)
      @Target({ElementType.TYPE, ElementType.METHOD})
      public @interface Admin {
      
      }



      That class extends from an abstract class that implements some methods when a invoke a method on the subclass that is implemented in the abstract class, a NullPointerException is thrown.




      java.lang.NullPointerException
           org.jboss.seam.security.SecurityInterceptor.aroundInvoke(SecurityInterceptor.java:30)
           sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
           sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           java.lang.reflect.Method.invoke(Method.java:597)
           org.jboss.interceptor.proxy.InterceptorInvocation$InterceptorMethodInvocation.invoke(InterceptorInvocation.java:72)
           org.jboss.interceptor.proxy.SimpleInterceptionChain.invokeNextInterceptor(SimpleInterceptionChain.java:82)
           org.jboss.interceptor.proxy.InterceptorMethodHandler.executeInterception(InterceptorMethodHandler.java:133)
           org.jboss.interceptor.proxy.InterceptorMethodHandler.invoke(InterceptorMethodHandler.java:112)
           org.jboss.weld.bean.proxy.CombinedInterceptorAndDecoratorStackMethodHandler.invoke(CombinedInterceptorAndDecoratorStackMethodHandler.java:65)
           be.cremers.mythings.money.domain.action.271862417$Proxy$_$$_WeldSubclass.cancel(271862417$Proxy$_$$_WeldSubclass.java)
           be.cremers.mythings.money.domain.action.WageActionBean$Proxy$_$$_WeldClientProxy.cancel(WageActionBean$Proxy$_$$_WeldClientProxy.java)
           sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
           sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           java.lang.reflect.Method.invoke(Method.java:597)
           org.apache.el.parser.AstValue.invoke(AstValue.java:196)
           org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
           org.jboss.weld.util.el.ForwardingMethodExpression.invoke(ForwardingMethodExpression.java:43)
           org.jboss.weld.el.WeldMethodExpression.invoke(WeldMethodExpression.java:56)
           com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105)
           javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)
           com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
           javax.faces.component.UICommand.broadcast(UICommand.java:315)
           javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:787)
           javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:928)
           com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestValuesPhase.java:78)
           com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
           com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
           javax.faces.webapp.FacesServlet.service(FacesServlet.java:312)
           org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:67)
           org.jboss.solder.servlet.exception.CatchExceptionFilter.doFilter(CatchExceptionFilter.java:65)
           org.jboss.solder.servlet.event.ServletEventBridgeFilter.doFilter(ServletEventBridgeFilter.java:72)