Hi,
We are having the following problem (mapping provided below):
Access to the property "joinDate" of the Memebership object using jstl
<fmt:formatDate value="${custEmail.emailCustomer.customerMembership.joinDate}" type="both"/>
Causes this exception:
2006-09-04 10:15:56 ApplicationDispatcher[/csr] Servlet.service() for servlet jsp threw exception
org.objectstyle.cayenne.FaultFailureException: [v.1.2 July 16 2006] Error resolving fault for ObjectId: <ObjectId:Membership, customer_id=116080> and state (hollow). Possible cause - matching row is missing from the database.
at org.objectstyle.cayenne.access.DataContext.prepareForAccess(DataContext.java:1851)
at org.objectstyle.cayenne.CayenneDataObject.readProperty(CayenneDataObject.java:238)
at persistence.auto._Membership.getJoinDate(_Membership.java:59)
at sun.reflect.GeneratedMethodAccessor255.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.taglibs.standard.lang.jstl.ArraySuffix.evaluate(ArraySuffix.java:278)
at org.apache.taglibs.standard.lang.jstl.ComplexValue.evaluate(ComplexValue.java:107)
at org.apache.taglibs.standard.lang.jstl.ELEvaluator.evaluate(ELEvaluator.java:204)
at org.apache.taglibs.standard.lang.jstl.ELEvaluator.evaluate(ELEvaluator.java:163)
at org.apache.taglibs.standard.lang.jstl.Evaluator.evaluate(Evaluator.java:101)
at org.apache.taglibs.standard.lang.jstl.Evaluator.evaluate(Evaluator.java:129)
at org.apache.taglibs.standard.lang.support.ExpressionEvaluatorManager.evaluate(ExpressionEvaluatorManager.java:75)
at org.apache.taglibs.standard.tag.el.fmt.FormatDateTag.evaluateExpressions(FormatDateTag.java:134)
at org.apache.taglibs.standard.tag.el.fmt.FormatDateTag.doStartTag(FormatDateTag.java:67)
at org.apache.jsp.email.list_jsp._jspx_meth_fmt_formatDate_1(list_jsp.java:1289)
at org.apache.jsp.email.list_jsp._jspx_meth_logic_notEmpty_2(list_jsp.java:1266)
at org.apache.jsp.email.list_jsp._jspService(list_jsp.java:250)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:704)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:590)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:510)
at org.apache.struts.tiles.TilesUtilStrutsModulesImpl.doInclude(TilesUtilStrutsModulesImpl.java:122)
at org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:160)
at org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:702)
at org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:817)
at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:466)
at org.apache.jsp.layouts.email.layout_jsp._jspx_meth_tiles_insert_1(layout_jsp.java:327)
at org.apache.jsp.layouts.email.layout_jsp._jspService(layout_jsp.java:196)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:704)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:474)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:409)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:312)
at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1057)
at org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:267)
at org.apache.struts.tiles.TilesRequestProcessor.processTilesDefinition(TilesRequestProcessor.java:248)
at org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:301)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1420)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:502)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at org.displaytag.filter.ResponseOverrideFilter.doFilter(ResponseOverrideFilter.java:125)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:535)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:300)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:374)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:743)
at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:675)
at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:866)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
at java.lang.Thread.run(Thread.java:595)
This is similar to the problem described here: http://www.objectstyle.org/cayenne/lists/cayenne-user/2006/06/0147.html
but ours is different since both customer_id fields are PKs.
Mapping
<db-entity name="tbl_membership" catalog="main">
<db-attribute name="customer_id" type="INTEGER" isPrimaryKey="true" isMandatory="true" length="10"/>
<db-attribute name="order_id" type="INTEGER" isPrimaryKey="true" isMandatory="true" length="10"/>
<db-attribute name="join_date" type="TIMESTAMP" length="19"/>
<db-attribute name="last_renewal_date" type="TIMESTAMP" length="19"/>
<db-attribute name="membership_type" type="CHAR" length="50"/>
<db-attribute name="cancellation_date" type="TIMESTAMP" length="19"/>
<db-attribute name="cancellation_reason" type="CHAR" length="255"/>
<db-attribute name="expiration_date" type="TIMESTAMP" length="19"/>
<db-attribute name="cancellation_number" type="CHAR" length="50"/>
</db-entity>
<db-entity name="tbl_customer" catalog="main">
<db-attribute name="CUSTOMER_ID" type="INTEGER" isPrimaryKey="true" isMandatory="true" isGenerated="true" length="10"/>
<db-attribute name="BRAND_ID" type="INTEGER" length="10"/>
<db-attribute name="FIRST_NAME" type="VARCHAR" length="50"/>
<db-attribute name="MIDDLE_NAME" type="VARCHAR" length="50"/>
<db-attribute name="LAST_NAME" type="VARCHAR" length="50"/>
<db-attribute name="LOGIN_NAME" type="VARCHAR" length="50"/>
<db-attribute name="LOGIN_PASSWORD" type="VARCHAR" length="50"/>
<db-attribute name="SESSIONS_COUNT" type="INTEGER" length="10"/>
</db-entity>
<db-relationship name="customerMembership" source="tbl_customer" target="tbl_membership" toDependentPK="true" toMany="false">
<db-attribute-pair source="CUSTOMER_ID" target="customer_id"/>
</db-relationship>
<db-relationship name="membershipCustomer" source="tbl_membership" target="tbl_customer" toMany="false">
<db-attribute-pair source="customer_id" target="CUSTOMER_ID"/>
</db-relationship>
Thank you.
Dima.
This archive was generated by hypermail 2.0.0 : Fri Sep 15 2006 - 10:15:16 EDT