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

NullPointerException if interceptor binding is missing @Target

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Done
    • Affects Version/s: 1.1.0.Final
    • Fix Version/s: 1.1.1.Final
    • Component/s: None
    • Labels:
      None

      Description

      If an interceptor binding is missing an @Target annotation then weld throws a NPE on startup:

      Caused by: com.google.common.collect.ComputationException: java.lang.NullPointerException
      at com.google.common.collect.ComputingConcurrentHashMap.compute(ComputingConcurrentHashMap.java:218)
      at com.google.common.collect.ComputingConcurrentHashMap.apply(ComputingConcurrentHashMap.java:100)
      at com.google.common.collect.MapMaker$ComputingMapAdapter.get(MapMaker.java:515)
      at org.jboss.weld.metadata.cache.MetaAnnotationStore.getInterceptorBindingModel(MetaAnnotationStore.java:224)
      at org.jboss.weld.manager.BeanManagerImpl.isInterceptorBinding(BeanManagerImpl.java:1140)
      at org.jboss.weld.bean.AbstractClassBean.flattenInterceptorBindings(AbstractClassBean.java:126)
      at org.jboss.weld.bean.AbstractClassBean.initInterceptionModelForType(AbstractClassBean.java:218)
      at org.jboss.weld.bean.AbstractClassBean.initialize(AbstractClassBean.java:207)
      at org.jboss.weld.bean.ManagedBean.initialize(ManagedBean.java:372)
      at org.jboss.weld.bootstrap.AbstractBeanDeployer.deploy(AbstractBeanDeployer.java:113)
      at org.jboss.weld.bootstrap.BeanDeployment.deployBeans(BeanDeployment.java:216)
      at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:370)
      at org.jboss.arquillian.container.weld.ee.embedded_1_1.mock.TestContainer.startContainer(TestContainer.java:258)
      at org.jboss.arquillian.container.weld.ee.embedded_1_1.WeldEEMockContainer.deploy(WeldEEMockContainer.java:71)
      at org.jboss.arquillian.impl.handler.ContainerDeployer.callback(ContainerDeployer.java:62)
      at org.jboss.arquillian.impl.handler.ContainerDeployer.callback(ContainerDeployer.java:50)
      at org.jboss.arquillian.impl.event.MapEventManager.fire(MapEventManager.java:63)
      ... 45 more
      Caused by: java.lang.NullPointerException
      at org.jboss.weld.metadata.cache.InterceptorBindingModel.isValidTargetType(InterceptorBindingModel.java:115)
      at org.jboss.weld.metadata.cache.InterceptorBindingModel.check(InterceptorBindingModel.java:106)
      at org.jboss.weld.metadata.cache.AnnotationModel.init(AnnotationModel.java:66)
      at org.jboss.weld.metadata.cache.InterceptorBindingModel.init(InterceptorBindingModel.java:65)
      at org.jboss.weld.metadata.cache.AnnotationModel.<init>(AnnotationModel.java:56)
      at org.jboss.weld.metadata.cache.InterceptorBindingModel.<init>(InterceptorBindingModel.java:59)
      at org.jboss.weld.metadata.cache.MetaAnnotationStore$InterceptorBindingFunction.apply(MetaAnnotationStore.java:115)
      at org.jboss.weld.metadata.cache.MetaAnnotationStore$InterceptorBindingFunction.apply(MetaAnnotationStore.java:105)
      at com.google.common.collect.ComputingConcurrentHashMap.compute(ComputingConcurrentHashMap.java:206)
      ... 61 more

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                alesj AleŇ° Justin
                Reporter:
                swd847 Stuart Douglas
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: