Jersey & CDI & Weld == No active contexts for scope type javax.enterprise.context.RequestScoped

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Jersey & CDI & Weld == No active contexts for scope type javax.enterprise.context.RequestScoped

Thomas Meyer
Hi,

I did install all necessary libraries into Tomcat's lib/ directory, so
they are available for all deployed webapps.

Versions are:
Tomcat 8.0.32
Jersey 2.22.2 (servlet and ext-cdi1x)
Weld 2.3.3.Final

and I did deploy two webapps into the webapps directory, both are using
JAX-RS.
Tomcat is running with unpackWars=false.

When only one webapp is deployed everything seems to work correctly.
But when I install both apps into the webapp directoy I get a similar
stacktrace likeĀ https://java.net/jira/browse/JERSEY-2930

I.e. "org.jboss.weld.context.ContextNotActiveException: WELD-001303: No
active contexts for scope type javax.enterprise.context.RequestScoped"

So is this bug or feature? what do you think about it

with kind regards
thomas

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Jersey & CDI & Weld == No active contexts for scope type javax.enterprise.context.RequestScoped

Thomas Meyer

Am 23.03.2016 9:28 nachm. schrieb Thomas Meyer <[hidden email]>:
>
> Hi,
>
> I did install all necessary libraries into Tomcat's lib/ directory, so
> they are available for all deployed webapps.
>
> Versions are:
> Tomcat 8.0.32
> Jersey 2.22.2 (servlet and ext-cdi1x)
> Weld 2.3.3.Final

Okay the trick seem to be to use ext-cdi1x-servlet and not ext-cdi1x and put those artifacts and their dependencies into Tomcat's lib directory. With this setup it's possible to deploy two wepapps with CDI support.

>
> and I did deploy two webapps into the webapps directory, both are using
> JAX-RS.
> Tomcat is running with unpackWars=false.
>
> When only one webapp is deployed everything seems to work correctly.
> But when I install both apps into the webapp directoy I get a similar
> stacktrace like https://java.net/jira/browse/JERSEY-2930
>
> I.e. "org.jboss.weld.context.ContextNotActiveException: WELD-001303: No
> active contexts for scope type javax.enterprise.context.RequestScoped"
>
> So is this bug or feature? what do you think about it
>
> with kind regards
> thomas
>

Loading...