struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From S├ębastien GALLET <sebast...@gallet.info>
Subject Cannot find bean error in any scope
Date Tue, 08 Mar 2005 09:30:21 GMT
Hi.
I try to developp tools which allows me to store messages and validation 
ressources to the server (jboss) and make them accessible via JNDI. The 
goal is to use them with differents back-ends (webapp with struts, 
webservices, beans, etc, ...).

To do this, I developp a plug-in to retrieve validator resources :
  <plug-in className="info.gallet.struts.marmot.ValidatorPlugIn">
    <set-property property="factoryName" value="java:/marmot/TitanFactory"/>
  </plug-in>

And a new message resource components :
  <message-resources 
factory="info.gallet.struts.marmot.PropertyMessageResourcesFactory"
                       key="person"
                       parameter="info.gallet.titandb.person.Person"
                      
 className="info.gallet.struts.marmot.MessageResourcesConfig">
    <set-property property="cacheSize" value="2"/>
    <set-property property="factoryName" value="java:/marmot/TitanFactory"/>
  </message-resources>

Now I can access messages with the classical bean:message
                <bean:message bundle="person" key="name1"/>

And the fieldchecks (same as struts one but with debug hooks)  works fine
 2005-03-08 09:26:22,263 DEBUG 
[info.gallet.marmot.validator.FieldChecks] Validation of field name2
2005-03-08 09:26:22,264 DEBUG [info.gallet.marmot.validator.FieldChecks] 
Validation of field name2 failed.

But I can't retrieve the error messages. Here is the logs

javax.servlet.ServletException: Cannot find bean error in any scope
	org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825)
	org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758)
	org.apache.jsp.valid1_jsp._jspService(valid1_jsp.java:177)
	org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
	org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1056)
	org.apache.struts.action.RequestProcessor.internalModuleRelativeForward(RequestProcessor.java:994)
	org.apache.struts.action.RequestProcessor.processValidate(RequestProcessor.java:959)
	org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:206)
	org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
	org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
	org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:75)

*root cause*

javax.servlet.jsp.JspException: Cannot find bean error in any scope
	org.apache.struts.taglib.TagUtils.lookup(TagUtils.java:992)
	org.apache.struts.taglib.bean.WriteTag.doStartTag(WriteTag.java:227)
	org.apache.jsp.valid1_jsp._jspx_meth_bean_write_0(valid1_jsp.java:242)
	org.apache.jsp.valid1_jsp._jspService(valid1_jsp.java:135)
	org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
	org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1056)
	org.apache.struts.action.RequestProcessor.internalModuleRelativeForward(RequestProcessor.java:994)
	org.apache.struts.action.RequestProcessor.processValidate(RequestProcessor.java:959)
	org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:206)
	org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
	org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:810)


What's wrong in my code ???

Sebastien
which tries to speak English




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


Mime
View raw message