error message for missing query id var needs improvement -------------------------------------------------------- Key: OPENJPA-75 URL: http://issues.apache.org/jira/browse/OPENJPA-75 Project: OpenJPA Issue Type: Bug Components: query Reporter: David Wisneski the query is select sum(loginCount), sum(logoutCount) from AccountEntity as a where a.accountProfile.userID like 'uid:%' loginCount and logoutCount are declared in a MappedSuperClass. the correct query is select sum(a.loginCount), sum(a.logoutCount) from AccountEntity as a where a.accountProfile.userID like 'uid:%' Rather than a syntax error, a ArgumentException was thrown. (see below) Also the user would like to see a better error message in the case of a field name using wrong upper/lower case. In other words, if the query was where a.userid = ... and what he intended was where a.userId = ... then the message should say " userid undefined. DId you mean userId? " Also if a state field is inherited but declared private and hence not visible, then error message should read "a.userId invalid because it is not visible" rather than "a.userId not defined". <4|false|0.9.0-incubating-SNAPSHOT> org.apache.openjpa.persistence.ArgumentException: null [11/3/06 12:47:04:734 CST] 0000003c SystemOut O <4|false|0.9.0-incubating-SNAPSHOT> org.apache.openjpa.persistence.ArgumentException: null [11/3/06 12:47:04:734 CST] 0000003c SystemOut O at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:755) [11/3/06 12:47:04:734 CST] 0000003c SystemOut O at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:716) [11/3/06 12:47:04:734 CST] 0000003c SystemOut O at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:712) [11/3/06 12:47:04:734 CST] 0000003c SystemOut O at org.apache.openjpa.kernel.DelegatingQuery.execute(DelegatingQuery.java:512) [11/3/06 12:47:04:734 CST] 0000003c SystemOut O at org.apache.openjpa.persistence.QueryImpl.execute(QueryImpl.java:216) [11/3/06 12:47:04:734 CST] 0000003c SystemOut O at org.apache.openjpa.persistence.QueryImpl.getSingleResult(QueryImpl.java:271) [11/3/06 12:47:04:734 CST] 0000003c SystemOut O at org.apache.geronimo.samples.daytrader.ejb3.TradeJPA.resetTrade(TradeJPA.java:1864) while running a JPA query. The code for it looks like the following: q = em.createQuery("select sum(loginCount), sum(logoutCount) from AccountEntity as a where a.accountProfile.userID like 'uid:%'"); Object[] rs = (Object[]) q.getSingleResult(); -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira