[ https://issues.apache.org/jira/browse/OWB-556?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13016722#comment-13016722 ]
Gurkan Erdogdu commented on OWB-556: ------------------------------------ Please attach sample application or test that shows the problem. > bean with interceptor + @PreDestroy causes a NullPointerException > ----------------------------------------------------------------- > > Key: OWB-556 > URL: https://issues.apache.org/jira/browse/OWB-556 > Project: OpenWebBeans > Issue Type: Bug > Components: Context and Scopes > Affects Versions: 1.1.0 > Reporter: Gerhard Petracek > Assignee: Gurkan Erdogdu > > AbstractInjectionTargetBean#preDestroyDefault > InvocationContextImpl impl = new InvocationContextImpl( > getWebBeansContext(), null, instance, null, null, > getWebBeansContext().getInterceptorUtil().getInterceptorMethods(getInterceptorStack(), > InterceptorType.PRE_DESTROY), InterceptorType.PRE_DESTROY); > ... the 2nd parameter is the bean > the constructor of InvocationContextImpl calls > configureTarget(bean); > which uses > bean.getScope() > -> > org.apache.webbeans.component.ManagedBean destroy > Exception thrown while destroying bean instance : [Name:null,WebBeans > Type:MANAGED,API Types:[...] > java.lang.NullPointerException > at > org.apache.webbeans.intercept.InvocationContextImpl.configureTarget(InvocationContextImpl.java:131) > at > org.apache.webbeans.intercept.InvocationContextImpl.<init>(InvocationContextImpl.java:97) > at > org.apache.webbeans.component.AbstractInjectionTargetBean.preDestroyDefault(AbstractInjectionTargetBean.java:288) > at > org.apache.webbeans.component.AbstractInjectionTargetBean.preDestroy(AbstractInjectionTargetBean.java:273) > at > org.apache.webbeans.component.AbstractInjectionTargetBean.destroyComponentInstance(AbstractInjectionTargetBean.java:194) > at > org.apache.webbeans.component.AbstractInjectionTargetBean.destroyInstance(AbstractInjectionTargetBean.java:173) > at > org.apache.webbeans.component.AbstractOwbBean.destroyCreatedInstance(AbstractOwbBean.java:277) > at > org.apache.webbeans.portable.creation.InjectionTargetProducer.preDestroy(InjectionTargetProducer.java:134) > at > org.apache.webbeans.component.InjectionTargetWrapper.preDestroy(InjectionTargetWrapper.java:104) > at > org.apache.webbeans.component.AbstractOwbBean.destroy(AbstractOwbBean.java:241) > at > org.apache.webbeans.context.AbstractContext.destroyInstance(AbstractContext.java:257) > at > org.apache.webbeans.context.AbstractContext.destroy(AbstractContext.java:279) > at > org.apache.webbeans.web.context.ServletRequestContext.destroy(ServletRequestContext.java:62) > at > org.apache.webbeans.web.context.WebContextsService.destroyRequestContext(WebContextsService.java:348) > at > org.apache.webbeans.web.context.WebContextsService.endContext(WebContextsService.java:192) > at > org.apache.webbeans.servlet.WebBeansConfigurationListener.requestDestroyed(WebBeansConfigurationListener.java:135) -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira