Well, it turns out tomcat 5 is fixed giving me the true stack trace which as
suspected is coming out of struts.

I have found out it appears struts is not loading my resource file in time
for the properties to be read from it or something like that.  Does anyone
have any ideas?  My struts-config.xml file has this in it....
  <servlet>
     <servlet-name>action</servlet-name>
  <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
  <init-param>
     <param-name>config</param-name>
  <param-value>/WEB-INF/struts-config.xml</param-value>
  </init-param>
  <init-param>
     <param-name>application</param-name>
  <param-value>ApplicationResources</param-value>
  </init-param>
  <load-on-startup>1</load-on-startup>
  </servlet>

More details follow of the precise problem...
thanks,
dean




The relevant part of the stack trace is
    javax.servlet.jsp.JspException: Cannot find message resources under key
org.apache.struts.action.MESSAGE

org.apache.struts.taglib.TagUtils.retrieveMessageResources(TagUtils.java:123
3)
            org.apache.struts.taglib.TagUtils.message(TagUtils.java:1082)

org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:226)
            org.apache.jsp.index_jsp._jspx_meth_bean_message_0(index_jsp.java:186)

Looking at line 186 of index_jsp.java tells me it is looking up app.symbol
which is defined correctly.

The code of TagUtils looks like so....
1232        if (resources == null) {
1233            JspException e =
1234                    new
JspException(messages.getMessage("message.bundle", bundle));
1235            saveException(pageContext, e);
1236            throw e;
1237        }

So somehow my resources is null.  resources is only set if checkPageScope is
true though which I find kind of weird.
thanks for any help on this,
dean

----- Original Message ----- 
From: "Dean Hiller" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Saturday, October 09, 2004 10:42 PM
Subject: Re: org.apache.struts.action.MESSAGE not found??


> more info....This doesn't seem too good and I should probably post to the
> tomcat list on this
>
> Looking at PageContextImpl, it has hidden another exception I believe.
> 521 } else {
> 522            // Otherwise throw the exception wrapped inside a
> ServletException.
> 523     // Set the exception as the root cause in the ServletException
> 524     // to get a stack trace for the real problem
> 525     if (t instanceof IOException) throw (IOException)t;
> 526     if (t instanceof ServletException) throw (ServletException)t;
> 527            if (t instanceof RuntimeException) throw
(RuntimeException)t;
> 528            if (t instanceof JspException) {
> 529                Throwable rootCause = ((JspException)t).getRootCause();
> 530                if (rootCause != null) {
> 531                    throw new ServletException(t.getMessage(),
> rootCause);
> 532               } else {
> 533                    throw new ServletException(t);
> 534                }
> 535            }
> 536     throw new ServletException(t);
> 537 }
>
> Notice stack trace below says line 533.  This line is passed an exception
I
> do want to know about, but the root cause is supposedly that
> ServletException, which is a mistake.  The root cause is "t" or if t is
> chained further, something that caused 't'.  Don't suppose anyone knows
this
> one?
> thanks,
> dean
>
>
>
>
> ----- Original Message ----- 
> From: "Dean Hiller" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Saturday, October 09, 2004 10:07 PM
> Subject: org.apache.struts.action.MESSAGE not found??
>
>
> I saw one long posting on this in the archives with no clear answer.
> Someone had the exact same problem.  For some reason PageContextImpl is
> looking for a key I never defined and don't have in any of my jsp's.
> Relevant stack trace is below...
>
> I believe this is the only relevant part of the stack trace...
> javax.servlet.ServletException: Cannot find message resources under key
> org.apache.struts.action.MESSAGE
> at
>
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
> l.java:533)
> at org.apache.jsp.index_jsp._jspService(index_jsp.java:95)
> at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>
> Line 95 of the index_jsp is having trouble.  Here are the lines in the
> generated index_jsp file from tomcat....
>
> 91    } catch (Throwable t) {
> 92      out = _jspx_out;
> 93      if (out != null && out.getBufferSize() != 0)
> 94        out.clearBuffer();
> 95      if (pageContext != null) pageContext.handlePageException(t);
> 96    } finally {
> 97      if (_jspxFactory != null)
> _jspxFactory.releasePageContext(pageContext);
> 98    }
>
> Notice the root cause of the real exception caught by line 91 is hidden by
> the exception coming from line 95.  (ie. I need to fix 95 and them I am
off
> on my own fixing my next problem.  I really need to fix this one as I need
> the errors my apps cause to be reported correctly.  Anybody have any ideas
> on this?
> thanks,
> dean
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to