3 Replies Latest reply on Jun 2, 2014 2:58 AM by Maciej Swiderski

    NullPointerException for runtime manager

    John Ament Master

      All,

       

      I'm getting the following nullpointer exception, following a simple example on github: https://github.com/mswiderski/jbpm-examples/tree/master/jbpm6/jbpm-sample-cdi

       

      java.lang.NullPointerException

        at java.util.concurrent.ConcurrentHashMap.hash(ConcurrentHashMap.java:333)

        at java.util.concurrent.ConcurrentHashMap.containsKey(ConcurrentHashMap.java:1016)

        at org.kie.internal.runtime.manager.RuntimeManagerRegistry.isRegistered(RuntimeManagerRegistry.java:43)

        at org.jbpm.runtime.manager.impl.AbstractRuntimeManager.<init>(AbstractRuntimeManager.java:68)

        at org.jbpm.runtime.manager.impl.SingletonRuntimeManager.<init>(SingletonRuntimeManager.java:66)

        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)

        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

        at java.lang.reflect.Constructor.newInstance(Constructor.java:526)

        at org.jboss.weld.introspector.jlr.WeldConstructorImpl.newInstance(WeldConstructorImpl.java:206)

        at org.jboss.weld.injection.ConstructorInjectionPoint.newInstance(ConstructorInjectionPoint.java:117)

        at org.jboss.weld.bean.ManagedBean.createInstance(ManagedBean.java:336)

        at org.jboss.weld.bean.ManagedBean$ManagedBeanInjectionTarget.produce(ManagedBean.java:200)

        at org.jboss.weld.bean.ManagedBean.create(ManagedBean.java:292)

        at org.jboss.weld.context.unbound.DependentContextImpl.get(DependentContextImpl.java:68)

        at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:608)

        at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:674)

        at org.jboss.weld.injection.FieldInjectionPoint.inject(FieldInjectionPoint.java:136)

        at org.jboss.weld.util.Beans.injectBoundFields(Beans.java:763)

        at org.jboss.weld.util.Beans.injectFieldsAndInitializers(Beans.java:772)

        at org.jboss.weld.bean.ManagedBean$ManagedBeanInjectionTarget$1$1.proceed(ManagedBean.java:161)

        at org.jboss.weld.injection.InjectionContextImpl.run(InjectionContextImpl.java:48)

        at org.jboss.weld.bean.ManagedBean$ManagedBeanInjectionTarget$1.work(ManagedBean.java:157)

        at org.jboss.weld.bean.ManagedBean$FixInjectionPoint.run(ManagedBean.java:131)

        at org.jboss.weld.bean.ManagedBean$ManagedBeanInjectionTarget.inject(ManagedBean.java:153)

        at org.jboss.weld.bean.ManagedBean.create(ManagedBean.java:293)

        at org.jboss.weld.context.AbstractContext.get(AbstractContext.java:103)

        at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:90)

        at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:79)

       

       

      Searches on this stacktrace seem to indicate that the key in the map is null.  How do I ensure that a key is present?