I am moving a Struts-based application from WebLogic 5.1 to 6.1 and I am
encountering some strange errors. Has anyone else seen this behavior before,
or know what might be causing it?  I have a Collection of beans I am trying
to iterate through using the Struts iterate tag (works fine with WL5.1) but
now I am getting an error that there is no getter method. I have verified
with the debugger that at runtime the Collection exists and it is populated
with the expected objects. I am not really sure what is going on... The only
thing I can think of is that this method does not exactly conform to the
JavaBean spec- it does not set/get the same type of object. When doing a
set, you pass it a TimeStamp but for the get it returns a formatted String
(see below). However, the naming conventions are followed correctly. Is this
a problem?


############ WL Exception #############
note: the bean called "theFermentation" is a FermSummaryBean (see below)

javax.servlet.jsp.JspException: No getter method for property requestDate of
bean theFermentation
        at org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:517)
        at
org.apache.struts.taglib.bean.WriteTag.doStartTag(WriteTag.java:179)
        at jsp_servlet._mainmenu._jspService(_mainmenu.java:385)
        at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
        at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:263)
        at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:302)
        at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:200)
        at
weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImp
l.java:190)
        at
org.apache.struts.action.ActionServlet.processActionForward(ActionServlet.ja
va:1758)
        at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1595)
        at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:263)
        at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:200)
        at
weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImp
l.java:190)
        at
org.apache.struts.action.ActionServlet.processActionForward(ActionServlet.ja
va:1758)
        at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1595)
        at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:263)
        at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:200)
        at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
ntext.java:2390)
        at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
:1959)
        at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
        at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)


############# Snipet from the JSP ################

        <jsp:useBean id="RecentRequests" scope="request"
class="java.util.ArrayList"/>
        .
        .
        .
        <logic:iterate id="theFermentation" name="RecentRequests"> 
        <tr class="smallText"> 
          <td><bean:write name="theFermentation"
property="requestName"/></td>
          <td><bean:write name="theFermentation"
property="requestType"/></td>
          <td><bean:write name="theFermentation" property="requestBy"/></td>
          <td><bean:write name="theFermentation"
property="requestDate"/></td>
          <td><bean:write name="theFermentation" property="status"/></td>
          <td><a href="viewFermRequest.do?fermid=<bean:write
name="theFermentation" property="requestId"/>"> 
            View...</a> <logic:equal name="theFermentation"
property="editable" value="true"> 
            <a href="fermAdmin.do?fermid=<bean:write name="theFermentation"
property="requestId"/>"> 
            Edit...</a> </logic:equal> </td>
        </tr>
        </logic:iterate> 


######### Contents of Bean class #############

package com.bipi.plims.entity;

import java.sql.Timestamp;
import java.text.SimpleDateFormat;

/**
 * Value object that contains basic summary information about a fermentation
request.
 * @author Robert Hayden
 * @version 1.0 
 */
public class FermSummaryBean implements java.io.Serializable {
    public String getRequestName() { return requestName; }

    public void setRequestName( String requestName ) {
        this.requestName = requestName;
    }

    public String getRequestDate() {
        SimpleDateFormat df = new SimpleDateFormat( "MMM d yyyy" );
        return df.format( requestDate );
    }

    public void setRequestDate( Timestamp requestDate ) {
        this.requestDate = requestDate;
    }

    public String getRequestBy() { return requestBy; }

    public void setRequestBy( String requestBy ) { this.requestBy =
requestBy; }

    public Long getRequestId() { return requestId; }

    public void setRequestId( Long requestId ) { this.requestId = requestId;
}

    public String getStatus() { return status; }

    public void setStatus( String status ) { this.status = status; }

    public String getRequestType() { return requestType; }

    public void setRequestType( String requestType ) {
        this.requestType = requestType;
    }

    public boolean isEditable() { return editable; }

    public void setEditable( boolean editable ) { this.editable = editable;
}

    private String requestName;
    private Timestamp requestDate;
    private String requestBy;
    private Long requestId;
    private String status;
    private String requestType;
    private boolean editable = false;
}



Reply via email to