You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Rick Reumann <st...@reumann.net> on 2005/08/25 00:13:54 UTC

[Shale] error I'm getting when navigating.

I'm not sure if this error is because of the spring jars that I included 
(copied over from the use cases example), but when trying the following 
navigation rule:


  <navigation-rule>
       <navigation-case>
          <from-outcome>success</from-outcome>
          <to-view-id>/employeeForm.jsp</to-view-id>
       </navigation-case>
    </navigation-rule>


I get the following error and I have no idea why. (Couple notes... the 
backing bean method first called is returning "success" and 
"employeeForm.jsp" is spelled correctly and does exist).


2005-08-24 18:05:27 StandardWrapperValve[Faces Servlet]: 
Servlet.service() for servlet Faces Servlet threw exception
javax.faces.FacesException: java.lang.IllegalStateException: No 
WebApplicationContext found: no ContextLoaderListener registered?
	at 
com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:83)
	at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
	at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:109)
	.... <snip>

Caused by: javax.faces.el.EvaluationException: 
java.lang.IllegalStateException: No WebApplicationContext found: no 
ContextLoaderListener registered?
	at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:206)
	at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:154)
	at 
org.apache.shale.faces.ShaleViewHandler.setupViewController(ShaleViewHandler.java:224)
	at 
org.apache.shale.faces.ShaleViewHandler.createView(ShaleViewHandler.java:122)
	at 
org.apache.shale.clay.faces.ClayViewHandler.createView(ClayViewHandler.java:111)
	at 
com.sun.faces.application.NavigationHandlerImpl.handleNavigation(NavigationHandlerImpl.java:135)
	at 
org.apache.shale.dialog.faces.DialogNavigationHandler.handleNavigation(DialogNavigationHandler.java:184)
	at
         ... <snip>

Caused by: java.lang.IllegalStateException: No WebApplicationContext 
found: no ContextLoaderListener registered?
	at 
org.springframework.web.jsf.FacesContextUtils.getRequiredWebApplicationContext(FacesContextUtils.java:78)
	at 
org.springframework.web.jsf.DelegatingVariableResolver.getWebApplicationContext(DelegatingVariableResolver.java:134)
	at 
org.springframework.web.jsf.DelegatingVariableResolver.resolveVariable(DelegatingVariableResolver.java:112)
	at 
org.apache.shale.spring.WebApplicationContextVariableResolver.resolveVariable(WebApplicationContextVariableResolver.java:86)
	at 
org.apache.shale.faces.ShaleVariableResolver.resolveVariable(ShaleVariableResolver.java:99)
	at com.sun.faces.el.impl.NamedValue.evaluate(NamedValue.java:125)
	at 
com.sun.faces.el.impl.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:243)
	at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:173)
	... 43 more

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: [Shale] error I'm getting when navigating.

Posted by Craig McClanahan <cr...@gmail.com>.
On 8/25/05, Rick Reumann <st...@reumann.net> wrote:
> Craig McClanahan wrote the following on 8/25/2005 1:00 PM:
> 
> > ContextLoaderListener is a Spring thing ... if you're going to take
> > advantage of the ability to use the managed beans facility to create
> > spring beans transparently, then you need the servlet context listener
> > registered in web.xml (see the use cases version), plus all the Spring
> > jars.  If you're not using that facility, you shouldn't need those
> > things (if you do, that's a bug -- the spring layer is supposed to be
> > optional).
> 
> Thanks Craig. That was the problem. (Although I'm having another issue
> now, but I'll address that on MyFaces since I don't believe it's shale
> related. (Saw your post there as well).
> 
> Side note, it might be nice if, for the separate Shale components, on
> the shale home page, you list which jars are required. I guess it's
> pretty obvious which ones you need (or in my case 'shouldn't' include,
> but when starting out you aren't absolutely sure so you often 'over jar'
> - in this case it burned me. I figured I didn't need the Spring ones (or
> the clay one(s?)) but wasn't positive. (Actually I tried at first
> removing the Spring jars but still ran into error but now I'm realizing
> it was a different error and just assumed it was because I had removed
> the Spring jars so I put them back... but that error isn't related to
> teh Spring jars. Oh the joys of debugging configuartion issues:)
> 

I'll link to it off the wiki, but that info also really belongs in the
release notes ... hmm, better get cracking on those ...

Craig
 

> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: [Shale] error I'm getting when navigating.

Posted by Rick Reumann <st...@reumann.net>.
Craig McClanahan wrote the following on 8/25/2005 1:00 PM:

> ContextLoaderListener is a Spring thing ... if you're going to take
> advantage of the ability to use the managed beans facility to create
> spring beans transparently, then you need the servlet context listener
> registered in web.xml (see the use cases version), plus all the Spring
> jars.  If you're not using that facility, you shouldn't need those
> things (if you do, that's a bug -- the spring layer is supposed to be
> optional).

Thanks Craig. That was the problem. (Although I'm having another issue 
now, but I'll address that on MyFaces since I don't believe it's shale 
related. (Saw your post there as well).

Side note, it might be nice if, for the separate Shale components, on 
the shale home page, you list which jars are required. I guess it's 
pretty obvious which ones you need (or in my case 'shouldn't' include, 
but when starting out you aren't absolutely sure so you often 'over jar' 
- in this case it burned me. I figured I didn't need the Spring ones (or 
the clay one(s?)) but wasn't positive. (Actually I tried at first 
removing the Spring jars but still ran into error but now I'm realizing 
it was a different error and just assumed it was because I had removed 
the Spring jars so I put them back... but that error isn't related to 
teh Spring jars. Oh the joys of debugging configuartion issues:)

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: [Shale] error I'm getting when navigating.

Posted by Craig McClanahan <cr...@gmail.com>.
On 8/25/05, Rick Reumann <st...@reumann.net> wrote:
> I'm also wondering ... how do I know exactly what Shale jars I need. The
> docs don't seem to say, so I'm just pulling all of them from the
> struts-shale-usecases... but I'm not sure I need all of them to just
> start out using the view handler. I'm wondering if maybe the problem
> below is because maybe the faces-config needs to be set up differently
> using Shale?

ContextLoaderListener is a Spring thing ... if you're going to take
advantage of the ability to use the managed beans facility to create
spring beans transparently, then you need the servlet context listener
registered in web.xml (see the use cases version), plus all the Spring
jars.  If you're not using that facility, you shouldn't need those
things (if you do, that's a bug -- the spring layer is supposed to be
optional).

Craig

> 
> Rick Reumann wrote the following on 8/24/2005 6:13 PM:
> > I'm not sure if this error is because of the spring jars that I included
> > (copied over from the use cases example), but when trying the following
> > navigation rule:
> >
> >
> >  <navigation-rule>
> >       <navigation-case>
> >          <from-outcome>success</from-outcome>
> >          <to-view-id>/employeeForm.jsp</to-view-id>
> >       </navigation-case>
> >    </navigation-rule>
> >
> >
> > I get the following error and I have no idea why. (Couple notes... the
> > backing bean method first called is returning "success" and
> > "employeeForm.jsp" is spelled correctly and does exist).
> >
> >
> > 2005-08-24 18:05:27 StandardWrapperValve[Faces Servlet]:
> > Servlet.service() for servlet Faces Servlet threw exception
> > javax.faces.FacesException: java.lang.IllegalStateException: No
> > WebApplicationContext found: no ContextLoaderListener registered?
> >     at
> > com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:83)
> >
> >     at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
> >     at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
> >     at javax.faces.webapp.FacesServlet.service(FacesServlet.java:109)
> >     .... <snip>
> >
> > Caused by: javax.faces.el.EvaluationException:
> > java.lang.IllegalStateException: No WebApplicationContext found: no
> > ContextLoaderListener registered?
> >     at
> > com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:206)
> >     at
> > com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:154)
> >     at
> > org.apache.shale.faces.ShaleViewHandler.setupViewController(ShaleViewHandler.java:224)
> >
> >     at
> > org.apache.shale.faces.ShaleViewHandler.createView(ShaleViewHandler.java:122)
> >
> >     at
> > org.apache.shale.clay.faces.ClayViewHandler.createView(ClayViewHandler.java:111)
> >
> >     at
> > com.sun.faces.application.NavigationHandlerImpl.handleNavigation(NavigationHandlerImpl.java:135)
> >
> >     at
> > org.apache.shale.dialog.faces.DialogNavigationHandler.handleNavigation(DialogNavigationHandler.java:184)
> >
> >     at
> >         ... <snip>
> >
> > Caused by: java.lang.IllegalStateException: No WebApplicationContext
> > found: no ContextLoaderListener registered?
> >     at
> > org.springframework.web.jsf.FacesContextUtils.getRequiredWebApplicationContext(FacesContextUtils.java:78)
> >
> >     at
> > org.springframework.web.jsf.DelegatingVariableResolver.getWebApplicationContext(DelegatingVariableResolver.java:134)
> >
> >     at
> > org.springframework.web.jsf.DelegatingVariableResolver.resolveVariable(DelegatingVariableResolver.java:112)
> >
> >     at
> > org.apache.shale.spring.WebApplicationContextVariableResolver.resolveVariable(WebApplicationContextVariableResolver.java:86)
> >
> >     at
> > org.apache.shale.faces.ShaleVariableResolver.resolveVariable(ShaleVariableResolver.java:99)
> >
> >     at com.sun.faces.el.impl.NamedValue.evaluate(NamedValue.java:125)
> >     at
> > com.sun.faces.el.impl.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:243)
> >
> >     at
> > com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:173)
> >     ... 43 more
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> 
> 
> --
> Rick
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: [Shale] error I'm getting when navigating.

Posted by Rick Reumann <st...@reumann.net>.
I'm also wondering ... how do I know exactly what Shale jars I need. The 
docs don't seem to say, so I'm just pulling all of them from the 
struts-shale-usecases... but I'm not sure I need all of them to just 
start out using the view handler. I'm wondering if maybe the problem 
below is because maybe the faces-config needs to be set up differently 
using Shale?

Rick Reumann wrote the following on 8/24/2005 6:13 PM:
> I'm not sure if this error is because of the spring jars that I included 
> (copied over from the use cases example), but when trying the following 
> navigation rule:
> 
> 
>  <navigation-rule>
>       <navigation-case>
>          <from-outcome>success</from-outcome>
>          <to-view-id>/employeeForm.jsp</to-view-id>
>       </navigation-case>
>    </navigation-rule>
> 
> 
> I get the following error and I have no idea why. (Couple notes... the 
> backing bean method first called is returning "success" and 
> "employeeForm.jsp" is spelled correctly and does exist).
> 
> 
> 2005-08-24 18:05:27 StandardWrapperValve[Faces Servlet]: 
> Servlet.service() for servlet Faces Servlet threw exception
> javax.faces.FacesException: java.lang.IllegalStateException: No 
> WebApplicationContext found: no ContextLoaderListener registered?
>     at 
> com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:83) 
> 
>     at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
>     at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
>     at javax.faces.webapp.FacesServlet.service(FacesServlet.java:109)
>     .... <snip>
> 
> Caused by: javax.faces.el.EvaluationException: 
> java.lang.IllegalStateException: No WebApplicationContext found: no 
> ContextLoaderListener registered?
>     at 
> com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:206)
>     at 
> com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:154)
>     at 
> org.apache.shale.faces.ShaleViewHandler.setupViewController(ShaleViewHandler.java:224) 
> 
>     at 
> org.apache.shale.faces.ShaleViewHandler.createView(ShaleViewHandler.java:122) 
> 
>     at 
> org.apache.shale.clay.faces.ClayViewHandler.createView(ClayViewHandler.java:111) 
> 
>     at 
> com.sun.faces.application.NavigationHandlerImpl.handleNavigation(NavigationHandlerImpl.java:135) 
> 
>     at 
> org.apache.shale.dialog.faces.DialogNavigationHandler.handleNavigation(DialogNavigationHandler.java:184) 
> 
>     at
>         ... <snip>
> 
> Caused by: java.lang.IllegalStateException: No WebApplicationContext 
> found: no ContextLoaderListener registered?
>     at 
> org.springframework.web.jsf.FacesContextUtils.getRequiredWebApplicationContext(FacesContextUtils.java:78) 
> 
>     at 
> org.springframework.web.jsf.DelegatingVariableResolver.getWebApplicationContext(DelegatingVariableResolver.java:134) 
> 
>     at 
> org.springframework.web.jsf.DelegatingVariableResolver.resolveVariable(DelegatingVariableResolver.java:112) 
> 
>     at 
> org.apache.shale.spring.WebApplicationContextVariableResolver.resolveVariable(WebApplicationContextVariableResolver.java:86) 
> 
>     at 
> org.apache.shale.faces.ShaleVariableResolver.resolveVariable(ShaleVariableResolver.java:99) 
> 
>     at com.sun.faces.el.impl.NamedValue.evaluate(NamedValue.java:125)
>     at 
> com.sun.faces.el.impl.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:243) 
> 
>     at 
> com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:173)
>     ... 43 more
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 


-- 
Rick

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org