[jira] Commented: (CAY-1072) org.apache.cayenne.query.SQLResultSetMapping must implement java.io.Serializable

From: Andrus Adamchik (JIRA) ("Andrus)
Date: Tue Jun 10 2008 - 06:46:52 EDT

  • Next message: Michael Gentry: "Re: Apache Board Report (June)"

        [ https://issues.apache.org/cayenne/browse/CAY-1072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12947#action_12947 ]

    Andrus Adamchik commented on CAY-1072:
    --------------------------------------

    On the other hand, we need some way to handle dates or other parameters that can't be converted into literals... I guess one way is to generate "synthetic" parameters and collect values in a map passed as an argument,

    > org.apache.cayenne.query.SQLResultSetMapping must implement java.io.Serializable
    > --------------------------------------------------------------------------------
    >
    > Key: CAY-1072
    > URL: https://issues.apache.org/cayenne/browse/CAY-1072
    > Project: Cayenne
    > Issue Type: Bug
    > Components: Cayenne JPA
    > Affects Versions: 3.0
    > Environment: ROP
    > Reporter: Lachlan Deck
    > Assignee: Andrus Adamchik
    >
    > so I've got this...
    > public int allRecordsCount(Expression e) {
    > ObjEntity entity = getContext().getEntityResolver().lookupObjEntity(getObjectClass());
    > Expression qualifier = null;
    > <...>
    > String ejbqlWhereString = qualifier == null ? "" : " WHERE " + qualifier.toEJBQL("a");
    > String ejbqlQueryString = "SELECT count(a) FROM " + entity.getName() + " a" + ejbqlWhereString;
    > EJBQLQuery ejbqlQuery = new EJBQLQuery(ejbqlQueryString);
    > Number count = (Number) DataObjectUtils.objectForQuery(getContext(), ejbqlQuery);
    > return count.intValue();
    > }
    > But I'm getting this exception. Any ideas?
    > org.apache.cayenne.CayenneRuntimeException: [v.3.0-SNAPSHOT May 14 2008 22:35:23] Remote error. URL - http://delish.ish.com.au:8181/angel-server-cayenne; CAUSE - Serialized class org.apache.cayenne.query.SQLResultSetMapping must implement java.io.Serializable
    > [java] at org.apache.cayenne.remote.hessian.HessianConnection.doSendMessage(HessianConnection.java:147)
    > [java] at org.apache.cayenne.remote.BaseConnection.sendMessage(BaseConnection.java:73)
    > [java] at org.apache.cayenne.remote.ClientChannel.send(ClientChannel.java:281)
    > [java] at org.apache.cayenne.remote.ClientChannel.onQuery(ClientChannel.java:113)
    > [java] at org.apache.cayenne.util.ObjectContextQueryAction.runQuery(ObjectContextQueryAction.java:317)
    > [java] at org.apache.cayenne.util.ObjectContextQueryAction.execute(ObjectContextQueryAction.java:96)
    > [java] at org.apache.cayenne.CayenneContext.onQuery(CayenneContext.java:340)
    > [java] at org.apache.cayenne.CayenneContext.performQuery(CayenneContext.java:328)
    > [java] at ish.oncourse.cayenne.CayenneContext.performQuery(CayenneContext.java:292)
    > [java] at org.apache.cayenne.DataObjectUtils.objectForQuery(DataObjectUtils.java:274)
    > [java] at ish.oncourse.controller.ListController.allRecordsCount(ListController.java:482)

    -- 
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.
    



    This archive was generated by hypermail 2.0.0 : Tue Jun 10 2008 - 06:47:25 EDT