Hi All,

I'm using DS version 0.3-incunating together with deltaspike-cdictrl-weld
and Weld-SE version 1.1.12.Final. I've started the DS by using the

contextControl.startContexts();

with purpose to start all Contexts. When I try to stop the RequestScoped by
using the

ctxCtrl.stopContext(RequestScoped.class);

There is an exception  as the following: -

java.lang.NullPointerException
at
org.jboss.weld.context.bound.BoundRequestContextImpl.dissociate(BoundRequestContextImpl.java:40)
at
org.jboss.weld.context.bound.BoundRequestContextImpl.dissociate(BoundRequestContextImpl.java:13)
at
org.apache.deltaspike.cdise.weld.ContextController.stopRequestScope(ContextController.java:156)
at
org.apache.deltaspike.cdise.weld.WeldContextControl.stopRequestScope(WeldContextControl.java:213)
at
org.apache.deltaspike.cdise.weld.WeldContextControl.stopContext(WeldContextControl.java:106)

    Please note, If I catch that NullPointerException and try to start/stop
again, it works without any exception as the following example: -

        try {
            ctxCtrl.stopContext(RequestScoped.class);
        } catch (NullPointerException e) {
            e.printStackTrace();
        }

        ctxCtrl.startContext(RequestScoped.class);

        ctxCtrl.stopContext(RequestScoped.class);
        ctxCtrl.startContext(RequestScoped.class);

I'm not sure If I'm doing something wrong or miss understanding. Could you
please help to advise further?

-- 
   Best Regards,

   Charlee Chitsuk

Reply via email to