struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Mitchell" <jmitc...@telocity.com>
Subject RE: Error "Cannot find message resources under key ui" when attempting to subclass FormBeanConfig in struts-config.xml
Date Thu, 21 Nov 2002 18:54:19 GMT
I think you might be misunderstanding what the error means by key (unless I'm
off base here)

Can you post the code that you are using to find the key 'ui'

You might also try this.  Add this to your default resource file:
ui=test


See if that clears up your error.

--
James Mitchell
Software Engineer/Struts Evangelist
http://www.open-tools.org

"If you were plowing a field, which would you rather use? Two strong oxen or
1024 chickens?"
- Seymour Cray (1925-1996), father of supercomputing


> -----Original Message-----
> From: Ahearn, Denis [mailto:DENISA@firepond.com]
> Sent: Thursday, November 21, 2002 1:49 PM
> To: 'Struts Users Mailing List'
> Subject: RE: Error "Cannot find message resources under key ui" when
> attempting to subclass FormBeanConfig in struts-config.xml
>
>
> Yes, my struts-config.xml has the following definition in it:
>
> <message-resources key="ui"
>                    null="false"
>                    parameter="/WEB-INF/conf/UserInterfaceResources"
>
> factory="com.mycompany.util.SpecifiedPropMsgResourcesFactory"/>
>
> The application where I am trying to subclass the FormBeanConfig is a robust
> working Struts app, which has many <bean:message> tags that successfully
> draw resources from the "ui" message resources.  As soon as I trying
> subclassing the FormBeanConfig of any <form-bean> element, the exception
> starts happening.
>
> Here is my code for the MyFormBeanConfig class:
>
> ----------------------------------
>
> package mypackage;
>
> import org.apache.struts.config.FormBeanConfig;
>
> public class MyFormBeanConfig extends FormBeanConfig
> {
>     protected String callbackClassName;
>
>     public MyFormBeanConfig()
>     {
>         super();
>         callbackClassName = null;
>     }
>
>     public String getCallbackClassName()
>     {
>         return this.callbackClassName;
>     }
>
>     public void setCallbackClassName(String callbackClassName)
>     {
>         this.callbackClassName = callbackClassName;
>     }
> }
>
> I am wondering if the "Cannot find message resources under key ui" error
> message I am getting is not indicative of the true problem.  I really don't
> think anything is wrong with how I have set up my message resources, but I
> could be wrong.
>
> Thanks again,
> Denis
>
>
> -----Original Message-----
> From: James Mitchell [mailto:jmitchtx@telocity.com]
> Sent: Thursday, November 21, 2002 12:41 PM
> To: Struts Users Mailing List
> Subject: RE: Error "Cannot find message resources under key ui" when
> attempting to subclass FormBeanConfig in struts-config.xml
>
>
> Apparently, you are trying to use a 'message resources under key ui' and it
> is not found :/
>
> Have you validated that it is there?
>
> Can you post your Dyna extension?
>
>
>
> --
> James Mitchell
> Software Engineer/Struts Evangelist
> http://www.open-tools.org
>
> "If you were plowing a field, which would you rather use? Two strong oxen or
> 1024 chickens?"
> - Seymour Cray (1925-1996), father of supercomputing
>
>
> > -----Original Message-----
> > From: Ahearn, Denis [mailto:DENISA@firepond.com]
> > Sent: Thursday, November 21, 2002 12:51 PM
> > To: 'struts-user@jakarta.apache.org'
> > Subject: Error "Cannot find message resources under key ui" when
> > attempting to subclass FormBeanConfig in struts-config.xml
> >
> >
> > Has anyone successfully subclassed the FormBeanConfig associated with
> > a <form-bean> element?
> >
> > For example:
> >     <form-bean name="myForm"
> > type="org.apache.struts.action.DynaActionForm"
> > className="mypackage.MyFormBeanConfig">
> > 	.
> > 	.
> > 	.
> >     </form-bean>
> >
> > When I try this, I get the following exception:
> >
> > 	javax.servlet.ServletException: Cannot find message resources under
> > key ui
> > 		at
> > org.apache.jasper.runtime.PageContextImpl.handlePageException(PageCont
> > extImp
> > l.java:494)
> > 		at org.apache.jsp.logon_jsp._jspService(logon_jsp.java:280)
> > 		at
> > org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:136)
> > 		at
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> > 		at
> >
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
> > 04)
> > 		at
> > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289)
> > 		at
> > org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
> > 		at
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> > 		at
> >
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
> > FilterChain.java:247)
> > 		at
> >
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
> > ain.java:193)
> > 		at
> >
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
> > va:260)
> > 		at
> >
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
> > eNext(StandardPipeline.java:643)
> > 		at
> >
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
> > 		at
> > org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> > 		at
> >
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
> > va:191)
> > 		at
> >
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
> > eNext(StandardPipeline.java:643)
> > 		at
> >
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase
> > .java:471)
> > 		at
> >
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
> > eNext(StandardPipeline.java:641)
> > 		at
> >
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
> > 		at
> > org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> > 		at
> > org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2396)
> > 		at
> >
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
> > )
> > 		at
> >
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
> > eNext(StandardPipeline.java:643)
> > 		at
> >
> org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
> > java:170)
> > 		at
> >
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
> > eNext(StandardPipeline.java:641)
> > 		at
> >
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172
> > )
> > 		at
> >
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
> > eNext(StandardPipeline.java:641)
> > 		at
> >
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
> > 		at
> > org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> > 		at
> >
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
> > :174)
> > 		at
> >
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
> > eNext(StandardPipeline.java:643)
> > 		at
> >
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
> > 		at
> > org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> > 		at
> > org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
> > 		at
> > org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:405)
> > 		at
> >
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
> > ction(Http11Protocol.java:380)
> > 		at
> > org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508)
> > 		at
> >
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
> > a:533)
> > 		at java.lang.Thread.run(Thread.java:479)
> >
> > I am using the Struts 1.1-b2, and Tomcat 4.1.  If I remove the
> > className="mypackage.MyFormBeanConfig" from my <form-bean> element,
> > then my application works fine.
> >
> > Does anyone have any hints on what is causing this exception?
> >
> > Thanks,
> > Denis
> >
>
>
> --
> To unsubscribe, e-mail:
> <mailto:struts-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:struts-user-help@jakarta.apache.org>
>
> --
> To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>
>
>


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


Mime
View raw message