0 Replies Latest reply on Apr 14, 2006 9:43 PM by andy.2003

    Bug in seam interceptors - method with variable parameters

    andy.2003

      Hello,

      I got an method like this:

      public static void addInfoMessage(String pMsgId, Object... pParams) {
       FacesContext.getCurrentInstance().addMessage(null, getMessage(pMsgId, FacesMessage.SEVERITY_INFO, pParams));
       }


      when I call the method without addidional parameters from the main method it's executed normally:

      public static void main(String[] args) {
       addInfoMessage("foo.bar");
       }


      but when I call this method from a Seam component I get the following exception:

      Caused by: java.lang.NoSuchMethodError: de.foo.utils.Utils.addWarnMessage(Ljava/lang/String;)V
       at de.foo.webfront.RegisterCustomerBean.create(RegisterCustomerBean.java:119)
       at de.foo.webfront.RegisterCustomerBean$$EnhancerByCGLIB$$1ebf5fb7.CGLIB$create$0(<generated>)
       at de.foo.webfront.RegisterCustomerBean$$EnhancerByCGLIB$$1ebf5fb7$$FastClassByCGLIB$$277e69fe.invoke(<generated>)
       at net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:167)
       at org.jboss.seam.interceptors.JavaBeanInterceptor$1.proceed(JavaBeanInterceptor.java:80)
       at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
       at org.jboss.seam.interceptors.ValidationInterceptor.validateTargetComponent(ValidationInterceptor.java:65)
       ... 103 more


      Is it a bug or did I miss something?

      - Andreas