-
1. Re: Problem with Seam 3 application and RestEasy - FacesContext is not active
lightguard Aug 14, 2012 7:09 PM (in response to wgaulke)1 of 1 people found this helpfulCould you paste your code for PojoBean please, also the full stack trace.
-
2. Re: Problem with Seam 3 application and RestEasy - FacesContext is not active
wgaulke Aug 15, 2012 2:36 AM (in response to lightguard)Hello Jason,
your comment opened my eyes, my Pojo code was:
{code}
@Named
@ViewScoped
public class TagList implements Serializable {
@Inject
private Logger log;
@PersistenceContext
private EntityManager em;
... methods ...
}
{code}
I shared it with a view, now the working code is:
{code}
@Named
@RequestScoped
public class TagList implements Serializable {
@Inject
private Logger log;
@PersistenceContext
private EntityManager em;
... methods ...
}
{code}
I must have been blind or something - obviously Pojos with view Scope cannot be injected in RESTeasy as the scope cannot be assembled during a REST request. I guess I have to refactor some parts
-
3. Re: Problem with Seam 3 application and RestEasy - FacesContext is not active
wgaulke Aug 15, 2012 3:45 PM (in response to wgaulke)Actually I am not quite done with the topic.
During further implementation I noticed, that I got the "FacesContext is not active".
I debugged a bit and found out, that the seam-solder exception handling swallows all exceptions but is not able to invoce exception handlers as the faces context is not active -> this again rises the "FacesContext is not active" exception.
Has someone any hints for that? How can a spit out the whole stack trace?