openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mathias Bogaert (JIRA)" <>
Subject [jira] Created: (OPENJPA-566) OpenJPA not supporting count(*) syntax
Date Wed, 09 Apr 2008 08:55:24 GMT
OpenJPA not supporting count(*) syntax

                 Key: OPENJPA-566
             Project: OpenJPA
          Issue Type: Bug
          Components: query
    Affects Versions: 1.0.2
         Environment: Spring 2.5.3, JDK 1.5.
            Reporter: Mathias Bogaert
            Priority: Blocker

When executing a simple query using the (assumingly) valid count(*) syntax, accepted by Hibernate,
OpenJPA throws an exception.

Caused by: <openjpa-1.0.2-r420667:627158 nonfatal user error> org.apache.openjpa.persistence.ArgumentException:
An error occurred while parsing the query filter 'SELECT count(*) FROM Order instance'. Error
message: <openjpa-1.0.2-r420667:627158 nonfatal user error> org.apache.openjpa.kernel.jpql.ParseException:
Encountered "*" at character 14, but expected: ["(", "+", "-", ":", "?", "ABS", "AVG", "COUNT",
	at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder$ParsedJPQL.parse(
	at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder$ParsedJPQL.<init>(
	at org.apache.openjpa.kernel.jpql.JPQLParser.parse(
	at org.apache.openjpa.kernel.ExpressionStoreQuery.newCompilation(
	at org.apache.openjpa.datacache.QueryCacheStoreQuery.newCompilation(
	at org.apache.openjpa.kernel.QueryImpl.newCompilation(
	at org.apache.openjpa.kernel.QueryImpl.compilationFromCache(
	at org.apache.openjpa.kernel.QueryImpl.compileForCompilation(
	at org.apache.openjpa.kernel.QueryImpl.compileForExecutor(
	at org.apache.openjpa.kernel.QueryImpl.getOperation(
	at org.apache.openjpa.kernel.DelegatingQuery.getOperation(
	at org.apache.openjpa.persistence.QueryImpl.execute(
	at org.apache.openjpa.persistence.QueryImpl.getResultList(
	at org.springframework.orm.jpa.JpaTemplate.execute(

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

View raw message