I'm working with a list of value objects and using the iterator tag.  This
works perfectly until I have to access another value object within the
parent value object:

       <bean:define id="listToBrowse" name="shipmentTrackingForm"
property="bookingList" type="java.util.Collection" scope="session"/>
        <logic:iterate id="shipmentDetail" name="listToBrowse"
type="com.matson.shipment.ejb.ShipmentDetailValue">
            <bean:define id="detail" name="shipmentDetail"
type="com.matson.shipment.ejb.ShipmentDetailValue" toScope="page"/>
        <!-- This is the line that's causing me problems -->
            <bean:define id="header" name="detail" property="shipmentHeader"
type="com.matson.shipment.ejb.ShipmentHeaderValue" scope="page"
toScope="page"/>

The last line above where I try to define a bean causes the following error:

java.lang.NullPointerException
        at weblogic.utils.UnsyncHashtable.put(UnsyncHashtable.java:272)
        at
weblogic.servlet.jsp.PageContextImpl.setAttribute(PageContextImpl.java:125)
        at
weblogic.servlet.jsp.PageContextImpl.setAttribute(PageContextImpl.java:150)
        at
org.apache.struts.taglib.bean.DefineTag.doStartTag(DefineTag.java:210)
        at
jsp_servlet._st.__BookingsOnly._jspService(__BookingsOnly.java:263)
        at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
        at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:265)
        at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:200)
        at
weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImp
l.java:241)
        at
org.apache.struts.action.ActionServlet.processActionForward(ActionServlet.ja
va:1759)
        at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1596)
        at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
        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
:265)
        at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:200)
        at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
ntext.java:2495)
        at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
:2204)
        at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
        at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)

The value object ShipmentHeaderValue is not truely a bean.  It's generated
with EJBGen and does NOT have a no-arg constructor.  Neither does the
ShipmentDetailValue, but it works fine with the iteration tag.  Why would
the detail value object work and the header not work.  I'm hoping to still
use this graph.  I would hate to have to make it a flat object.  Please
advise.  

Thanks,

Cindy

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

Reply via email to