[
https://issues.apache.org/jira/browse/OWB-359?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12859216#action_12859216
]
Mark Struberg commented on OWB-359:
-----------------------------------
Gurkan, this is the same NPE I get also in my app.
The can easily get fixed by re-applying my changes done in OWB-351.
Of course we might change this to
.) instead of 1, we keep n incomplete instances from the creation processes
.) we MUST cleanup the incomplete instances once the outermost
Contextual#create() is finished.
The CreationalContext in the NormalScopedBeanInterceptorHandler is of no use
after Contextual#create() is finished and MUST NOT get used afterwards anyway.
> ownerCreationalContext sometimes causes NPE in
> InterceptorDataImpl.createNewInstance()
> --------------------------------------------------------------------------------------
>
> Key: OWB-359
> URL: https://issues.apache.org/jira/browse/OWB-359
> Project: OpenWebBeans
> Issue Type: Bug
> Components: Interceptor and Decorators
> Affects Versions: M4
> Reporter: Eric Covener
> Assignee: Gurkan Erdogdu
> Priority: Blocker
> Attachments: ownercc_npetest.diff
>
> Original Estimate: 4h
> Remaining Estimate: 4h
>
> I'm sporadically seeing InterceptorDataImpl.createNewInstance() called with a
> null ownerCreationalContext which results in an NPE. I haven't been able to
> figure out how we get there, but I have an update to a UT that can hit the
> same backtrace every once in a while.
> $ mvn
> -Dtest=org.apache.webbeans.newtests.interceptors.inheritance.InheritedInterceptorTest
> test
> testLoopNormalScopeNoNewInstance(org.apache.webbeans.newtests.interceptors.inheritance.InheritedInterceptorTest)
> Time elapsed: 0.551 sec <<< ERROR!
> java.lang.NullPointerException
> at
> org.apache.webbeans.intercept.InterceptorDataImpl.createNewInstance(InterceptorDataImpl.java:308)
> at
> org.apache.webbeans.intercept.InvocationContextImpl.proceedAroundInvokes(InvocationContextImpl.java:203)
> at
> org.apache.webbeans.intercept.InvocationContextImpl.proceed(InvocationContextImpl.java:155)
> at
> org.apache.webbeans.intercept.NormalScopedBeanInterceptorHandler.callAroundInvokes(NormalScopedBeanInterceptorHandler.java:82)
> at
> org.apache.webbeans.intercept.InterceptorHandler.invoke(InterceptorHandler.java:246)
> at
> org.apache.webbeans.intercept.NormalScopedBeanInterceptorHandler.invoke(NormalScopedBeanInterceptorHandler.java:70)
> at
> org.apache.webbeans.newtests.interceptors.inheritance.Deck_$$_javassist_18.shuffle(Deck_$$_javassist_18.java)
> at
> org.apache.webbeans.newtests.interceptors.inheritance.InheritedInterceptorTest.do_testNormalScopeNoNewInstance(InheritedInterceptorTest.java:121)
> at
> org.apache.webbeans.newtests.interceptors.inheritance.InheritedInterceptorTest.testLoopNormalScopeNoNewInstance(InheritedInterceptorTest.java:110)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
> at java.lang.reflect.Method.invoke(Method.java:600)
> at
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
> I know this area has had some very recent change, perhaps this makes sense to
> someone?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.