-
Bug
-
Resolution: Won't Do
-
Critical
-
None
-
3.0.5.Final
-
None
The StackOverFlow error could be resolved by modifying
org.jboss.weld.contexts.AbstractContext.java .
comment out the "beanStore.put(id, beanInstance);" at line 99.
The StackOverFlow error would disappear.
82 BeanIdentifier id = getId(contextual); 83 ContextualInstance<T> beanInstance = beanStore.get(id); 84 if (beanInstance != null) { 85 return beanInstance.getInstance(); 86 } else if (creationalContext != null) { 87 LockedBean lock = null; 88 try { 89 if (multithreaded) { 90 lock = beanStore.lock(id); 91 beanInstance = beanStore.get(id); 92 if (beanInstance != null) { 93 return beanInstance.getInstance(); 94 } 95 } 96 T instance = contextual.create(creationalContext); 97 if (instance != null) { 98 beanInstance = new SerializableContextualInstanceImpl<Contextual<T>, T>(contextual, instance, creationalContext, serviceRegistry.get(ContextualStore.class)); 99 // beanStore.put(id, beanInstance); 100 } 101 return instance; 102 } finally { 103 if (lock != null) { 104 lock.unlock(); 105 } 106 } 107 } else { 108 return null; 109 } 110 } 110 }