Uploaded image for project: 'Weld'
  1. Weld
  2. WELD-1400

CDI deployment failure:Duplicate interceptor class definition

    XMLWordPrintable

Details

    Description

      Basically, a method is trying to exclude itself from one of the two interceptors defined at class level i.e.

      @Stateless
      @Interceptors(

      {Interceptor1.class, Interceptor2.class}

      )
      public class MyStatelessSessionBean {

      @ExcludeClassInterceptors
      @Interceptors(

      {Interceptor1.class}

      )
      public void doSomething3() {}

      }

      This fails in deployment with

      [2013-04-08T13:53:46.011-0400] [glassfish 4.0] [SEVERE] [] [javax.enterprise.system.core] [tid: _ThreadID=76 _ThreadName=admin-listener(6)] [timeMillis: 1365443626011] [levelValue: 1000] [[
      Exception while loading the app : CDI deployment failure:Duplicate interceptor class definition when binding com.tests.interceptors.Interceptor1 on AROUND_INVOKE
      org.jboss.weld.interceptor.proxy.InterceptorException: Duplicate interceptor class definition when binding com.tests.interceptors.Interceptor1 on AROUND_INVOKE
      at org.jboss.weld.interceptor.builder.InterceptionModelImpl.validateDuplicateInterceptors(InterceptionModelImpl.java:142)
      at org.jboss.weld.interceptor.builder.InterceptionModelImpl.appendInterceptors(InterceptionModelImpl.java:126)
      at org.jboss.weld.interceptor.builder.InterceptionModelBuilder$MethodInterceptorDescriptor.with(InterceptionModelBuilder.java:114)
      at org.jboss.weld.injection.producer.InterceptionModelInitializer.initMethodDeclaredEjbInterceptors(InterceptionModelInitializer.java:288)
      at org.jboss.weld.injection.producer.InterceptionModelInitializer.initEjbInterceptors(InterceptionModelInitializer.java:236)
      at org.jboss.weld.injection.producer.InterceptionModelInitializer.init(InterceptionModelInitializer.java:113)
      at org.jboss.weld.injection.producer.BeanInjectionTarget.initializeInterceptionModel(BeanInjectionTarget.java:91)
      at org.jboss.weld.injection.producer.ejb.SessionBeanInjectionTarget.initializeAfterBeanDiscovery(SessionBeanInjectionTarget.java:81)
      at org.jboss.weld.injection.producer.InjectionTargetInitializationContext.initialize(InjectionTargetInitializationContext.java:42)
      at org.jboss.weld.injection.producer.InjectionTargetService.initialize(InjectionTargetService.java:57)
      at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:513)
      at org.glassfish.weld.WeldDeployer.event(WeldDeployer.java:212)
      at org.glassfish.kernel.event.EventsImpl.send(EventsImpl.java:131)
      at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:328)
      at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:493)
      at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219)

      Attachments

        Activity

          People

            rhn-engineering-jharting Jozef Hartinger
            jjsnyder Joseph Snyder (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: