-
Bug
-
Resolution: Done
-
Major
-
3.0.3.Final
-
None
-
None
-
-
Workaround Exists
-
I tried to use an interceptor on a method called by a class constructor. This results in a NullPointerException on the Proxy-Object of the respective object.
Exception in thread "main" java.lang.NullPointerException at demo.DemoClass$Proxy$_$$_WeldSubclass.init(Unknown Source) at demo.DemoClass.<init>(DemoClass.java:15) at demo.DemoClass$Proxy$_$$_WeldSubclass.<init>(Unknown Source) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at org.jboss.weld.injection.ConstructorInjectionPoint.newInstance(ConstructorInjectionPoint.java:119) at org.jboss.weld.injection.ProxyClassConstructorInjectionPointWrapper.newInstance(ProxyClassConstructorInjectionPointWrapper.java:83) at org.jboss.weld.injection.ConstructorInjectionPoint.invokeAroundConstructCallbacks(ConstructorInjectionPoint.java:92) at org.jboss.weld.injection.ConstructorInjectionPoint.newInstance(ConstructorInjectionPoint.java:78) at org.jboss.weld.injection.producer.AbstractInstantiator.newInstance(AbstractInstantiator.java:28) at org.jboss.weld.injection.producer.InterceptorApplyingInstantiator.newInstance(InterceptorApplyingInstantiator.java:62) at org.jboss.weld.injection.producer.BasicInjectionTarget.produce(BasicInjectionTarget.java:112) at org.jboss.weld.injection.producer.BeanInjectionTarget.produce(BeanInjectionTarget.java:186) at org.jboss.weld.bean.ManagedBean.create(ManagedBean.java:158) at org.jboss.weld.contexts.unbound.DependentContextImpl.get(DependentContextImpl.java:70) at org.jboss.weld.bean.ContextualInstanceStrategy$DefaultContextualInstanceStrategy.get(ContextualInstanceStrategy.java:100) at org.jboss.weld.bean.ContextualInstance.get(ContextualInstance.java:50) at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:689) at org.jboss.weld.bean.builtin.InstanceImpl.getBeanInstance(InstanceImpl.java:252) at org.jboss.weld.bean.builtin.InstanceImpl.get(InstanceImpl.java:114) at demo.DemoClass.main(DemoClass.java:34)