Andrus Adamchik updated CAY-1072:
---------------------------------
Summary: EJBQLQuery non-serializable exception when run via ROP (was: org.apache.cayenne.query.SQLResultSetMapping must implement java.io.Serializable)
Editing title to avoid confusion in release-notes, as the actual fix was the opposite of the one requested
> EJBQLQuery non-serializable exception when run via ROP
> ------------------------------------------------------
>
> 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
> Fix For: 3.0
>
>
> 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 - 07:39:26 EDT