Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-3678

BlueprintBeanLocator throw NPE when looking up Bean instance with Type class

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.4.1
    • 2.4.2
    • None
    • None

    Description

      When create the cxf bus instance with blueprint configure, you may hit this kind of NPE error.

      org.osgi.service.blueprint.container.ComponentDefinitionException: Unable to intialize bean cxf
      	at org.apache.aries.blueprint.container.BeanRecipe.runBeanProcInit(BeanRecipe.java:638)
      	at org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:724)
      	at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:64)
      	at org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:219)
      	at org.apache.aries.blueprint.container.BlueprintRepository.createAll(BlueprintRepository.java:147)
      	at org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl.java:640)
      	at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:331)
      	at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:227)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
      	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
      	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)
      	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:206)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      	at java.lang.Thread.run(Thread.java:680)
      Caused by: java.lang.NullPointerException
      	at java.lang.Class.isAssignableFrom(Native Method)
      	at org.apache.cxf.bus.blueprint.BlueprintBeanLocator.getBeansOfType(BlueprintBeanLocator.java:89)
      	at org.apache.cxf.bus.CXFBusImpl.getExtension(CXFBusImpl.java:99)
      	at org.apache.cxf.bus.extension.ExtensionManagerBus.initialize(ExtensionManagerBus.java:151)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at java.lang.reflect.Method.invoke(Method.java:597)
      	at org.apache.aries.blueprint.utils.ReflectionUtils.invoke(ReflectionUtils.java:226)
      	at org.apache.aries.blueprint.container.BeanRecipe.invoke(BeanRecipe.java:824)
      	at org.apache.aries.blueprint.container.BeanRecipe.runBeanProcInit(BeanRecipe.java:636)
      	... 15 more
      
      

      Attachments

        Issue Links

          Activity

            People

              njiang Willem Jiang
              njiang Willem Jiang
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: