Uploaded image for project: 'Cayenne'
  1. Cayenne
  2. CAY-1072

EJBQLQuery non-serializable exception when run via ROP

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.0
    • 3.0M5
    • None
    • None
    • ROP

    Description

      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)

      Attachments

        Activity

          People

            andrus Andrus Adamchik
            ldeck Lachlan Deck
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: