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

EJBQL: ParseException with upper() / lower() functions

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 3.1M1
    • None
    • Core Library
    • None
    • Mac OS X 10.5.8, Java 1.6

    Description

      Statement: select p from Painting p where upper(p.name) like upper('foo')

      Exception:

      org.apache.cayenne.ejbql.EJBQLException: [v.3.1-SNAPSHOT ${project.build.date} ${project.build.time}] Error parsing EJB QL statement
      at org.apache.cayenne.ejbql.parser.EJBQL$EJBQLDefaultParser.parse(EJBQL.java:24)
      at org.apache.cayenne.ejbql.EJBQLExpressionTest.testUpper(EJBQLExpressionTest.java:36)
      Caused by: org.apache.cayenne.ejbql.parser.ParseException: Encountered " "UPPER" "upper "" at line 1, column 32.
      Was expecting one of:
      "(" ...
      "(" ...
      "(" ...
      "(" ...
      "(" ...
      "(" ...
      "(" ...
      "(" ...
      "(" ...
      "(" ...

      at org.apache.cayenne.ejbql.parser.EJBQL.generateParseException(EJBQL.java:9419)
      at org.apache.cayenne.ejbql.parser.EJBQL.jj_consume_token(EJBQL.java:9298)
      at org.apache.cayenne.ejbql.parser.EJBQL.conditional_primary(EJBQL.java:1933)
      at org.apache.cayenne.ejbql.parser.EJBQL.conditional_factor(EJBQL.java:1911)
      at org.apache.cayenne.ejbql.parser.EJBQL.conditional_term(EJBQL.java:1776)
      at org.apache.cayenne.ejbql.parser.EJBQL.conditional_expression(EJBQL.java:1738)
      at org.apache.cayenne.ejbql.parser.EJBQL.where_clause(EJBQL.java:1585)
      at org.apache.cayenne.ejbql.parser.EJBQL.select_statement(EJBQL.java:69)
      at org.apache.cayenne.ejbql.parser.EJBQL.parseQuery(EJBQL.java:41)
      at org.apache.cayenne.ejbql.parser.EJBQL$EJBQLDefaultParser.parse(EJBQL.java:21)
      ... 26 more

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            andreas@apache.org Andreas Hartmann
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment