You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by Jonathan Gallimore <jo...@gmail.com> on 2011/10/11 00:02:15 UTC

JSF 2.0 error

I'm getting an error with a JSF 2.0 application I'm deploying to TomEE.
Everything deploys fine, but I can't access the app - I get the following
error in the browser:

WebBeans context with scope type annotation @RequestScoped does not exist
within current thread

viewId=/movies/List
location=/Users/jon/tmp/apache-tomee-plus-1.0.0-beta-2-SNAPSHOT/webapps/moviefun/movies/List
phaseId=RESTORE_VIEW(1)

Caused by:
javax.enterprise.context.ContextNotActiveException - WebBeans context with
scope type annotation @RequestScoped does not exist within current thread
at
org.apache.webbeans.container.BeanManagerImpl.getContext(BeanManagerImpl.java:341)

Has anyone got any clues? I'm not using CDI (knowingly, at least) - but this
seems to be coming from OpenWebBeans. I'm happy to debug this further in
TomEE if its a bug - I'd need some pointers though - I'm not sure where to
start with this one.

Thanks

Jon

Re: JSF 2.0 error

Posted by Romain Manni-Bucau <rm...@gmail.com>.
maybe it is related to the startApplication in OpenEJBLifecycle when object
is the servletcontextevent...

it seems G. had it too: https://issues.apache.org/jira/browse/GERONIMO-5896

- Romain

2011/10/11 Jonathan Gallimore <jo...@gmail.com>

> I'm not knowingly using @RequestScoped at all...
>
> My JSF managed bean is defined like so:
>
> import javax.faces.bean.ManagedBean;
>
> import javax.faces.bean.SessionScoped;
>
> @ManagedBean(name = "movieController")
>
> @SessionScoped
>
> public class MovieController implements Serializable {
>
> This is actually the example for the Arquillian adapter which is a copy of
> the Moviefun example. Its committed at
>
> https://svn.apache.org/repos/asf/openejb/trunk/arquillian-tomee/arquillian-tomee-moviefun-exampleif
> you want to see if you can spot any mistakes I've made :)
> Cheers
>
> Jon
>
>
> On Mon, Oct 10, 2011 at 11:09 PM, Romain Manni-Bucau
> <rm...@gmail.com>wrote:
>
> > probably a stupid question but are you sure to use jsf RequestScoped
> > annotation and not cdi one?
> >
> > - Romain
> >
> > 2011/10/11 Jonathan Gallimore <jo...@gmail.com>
> >
> > > I'm getting an error with a JSF 2.0 application I'm deploying to TomEE.
> > > Everything deploys fine, but I can't access the app - I get the
> following
> > > error in the browser:
> > >
> > > WebBeans context with scope type annotation @RequestScoped does not
> exist
> > > within current thread
> > >
> > > viewId=/movies/List
> > >
> > >
> >
> location=/Users/jon/tmp/apache-tomee-plus-1.0.0-beta-2-SNAPSHOT/webapps/moviefun/movies/List
> > > phaseId=RESTORE_VIEW(1)
> > >
> > > Caused by:
> > > javax.enterprise.context.ContextNotActiveException - WebBeans context
> > with
> > > scope type annotation @RequestScoped does not exist within current
> thread
> > > at
> > >
> > >
> >
> org.apache.webbeans.container.BeanManagerImpl.getContext(BeanManagerImpl.java:341)
> > >
> > > Has anyone got any clues? I'm not using CDI (knowingly, at least) - but
> > > this
> > > seems to be coming from OpenWebBeans. I'm happy to debug this further
> in
> > > TomEE if its a bug - I'd need some pointers though - I'm not sure where
> > to
> > > start with this one.
> > >
> > > Thanks
> > >
> > > Jon
> > >
> >
>

Re: JSF 2.0 error

Posted by Jonathan Gallimore <jo...@gmail.com>.
I'm not knowingly using @RequestScoped at all...

My JSF managed bean is defined like so:

import javax.faces.bean.ManagedBean;

import javax.faces.bean.SessionScoped;

@ManagedBean(name = "movieController")

@SessionScoped

public class MovieController implements Serializable {

This is actually the example for the Arquillian adapter which is a copy of
the Moviefun example. Its committed at
https://svn.apache.org/repos/asf/openejb/trunk/arquillian-tomee/arquillian-tomee-moviefun-exampleif
you want to see if you can spot any mistakes I've made :)
Cheers

Jon


On Mon, Oct 10, 2011 at 11:09 PM, Romain Manni-Bucau
<rm...@gmail.com>wrote:

> probably a stupid question but are you sure to use jsf RequestScoped
> annotation and not cdi one?
>
> - Romain
>
> 2011/10/11 Jonathan Gallimore <jo...@gmail.com>
>
> > I'm getting an error with a JSF 2.0 application I'm deploying to TomEE.
> > Everything deploys fine, but I can't access the app - I get the following
> > error in the browser:
> >
> > WebBeans context with scope type annotation @RequestScoped does not exist
> > within current thread
> >
> > viewId=/movies/List
> >
> >
> location=/Users/jon/tmp/apache-tomee-plus-1.0.0-beta-2-SNAPSHOT/webapps/moviefun/movies/List
> > phaseId=RESTORE_VIEW(1)
> >
> > Caused by:
> > javax.enterprise.context.ContextNotActiveException - WebBeans context
> with
> > scope type annotation @RequestScoped does not exist within current thread
> > at
> >
> >
> org.apache.webbeans.container.BeanManagerImpl.getContext(BeanManagerImpl.java:341)
> >
> > Has anyone got any clues? I'm not using CDI (knowingly, at least) - but
> > this
> > seems to be coming from OpenWebBeans. I'm happy to debug this further in
> > TomEE if its a bug - I'd need some pointers though - I'm not sure where
> to
> > start with this one.
> >
> > Thanks
> >
> > Jon
> >
>

Re: JSF 2.0 error

Posted by Romain Manni-Bucau <rm...@gmail.com>.
probably a stupid question but are you sure to use jsf RequestScoped
annotation and not cdi one?

- Romain

2011/10/11 Jonathan Gallimore <jo...@gmail.com>

> I'm getting an error with a JSF 2.0 application I'm deploying to TomEE.
> Everything deploys fine, but I can't access the app - I get the following
> error in the browser:
>
> WebBeans context with scope type annotation @RequestScoped does not exist
> within current thread
>
> viewId=/movies/List
>
> location=/Users/jon/tmp/apache-tomee-plus-1.0.0-beta-2-SNAPSHOT/webapps/moviefun/movies/List
> phaseId=RESTORE_VIEW(1)
>
> Caused by:
> javax.enterprise.context.ContextNotActiveException - WebBeans context with
> scope type annotation @RequestScoped does not exist within current thread
> at
>
> org.apache.webbeans.container.BeanManagerImpl.getContext(BeanManagerImpl.java:341)
>
> Has anyone got any clues? I'm not using CDI (knowingly, at least) - but
> this
> seems to be coming from OpenWebBeans. I'm happy to debug this further in
> TomEE if its a bug - I'd need some pointers though - I'm not sure where to
> start with this one.
>
> Thanks
>
> Jon
>