5 Replies Latest reply on May 27, 2014 5:41 AM by Martin Kouba

    NPE in org.jboss.as.weld.injection.WeldEEInjection.createWeldEEInjection

    Claudio Miranda Expert

      Hi, I am using EAP 6.1.1 (the subscription will be active only on Mar/30) and it throws the following error

       

      16:31:42,961 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-5) MSC000001: Failed to start service jboss.deployment.subunit."grpfor-ear.ear"."grpfor.war".component."java.lang.Object".WeldInstantiator: org.jboss.msc.service.StartException in service jboss.deployment.subunit."grpfor-ear.ear"."grpfor.war".component."java.lang.Object".WeldInstantiator: Failed to start service
              at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1767) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_51]
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_51]
              at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_51]
      Caused by: java.lang.NullPointerException
              at org.jboss.as.weld.injection.WeldEEInjection.createWeldEEInjection(WeldEEInjection.java:144)
              at org.jboss.as.weld.injection.WeldManagedReferenceFactory.start(WeldManagedReferenceFactory.java:154)
              at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
              at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
              ... 3 more
      
      

       

      Debug shows me the screen at http://i.imgur.com/0YHa4eP.png

      The code is

      
                  //look for field injection points
                  Set<AnnotatedField<?>> _annFields = type.getFields();
                  for (AnnotatedField<?> field : _annFields) {
      
      
      
      
      

       

      I added the _annFields, just to put the type.getFields into a local attribute.

      The type.getFields() returns null.

       

      Do you see some condition this can result in null ?

       

      The screenshot shows bean = null and componentClass = java.lang.Object

       

      Thanks

       

      Claudio