glassfish
  1. glassfish
  2. GLASSFISH-503

EJBQL error reporting: stack trace and non EOD message

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 9.0pe
    • Fix Version/s: 9.0pe
    • Component/s: entity-persistence
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      503

      Description

      See this thread:
      http://forums.java.net/jive/thread.jspa?messageID=98445&tstart=0#98445

      Select c from Customer
      instead of
      Select c from Customer c

      has an ugly error reporting (too deep to be shown in the test web service client
      by the way), and only shown in the server log as:

      .............
      (I hide the exception which is not relevant also) that tells
      An exception occured while creating a query in EntityManager
      ....................
      then:

      Caused by: Exception [TOPLINK-8001] (Oracle TopLink Essentials - 2006.3 (Build
      060319)): oracle.toplink.essentials.exceptions.EJBQLException
      Exception Description: Syntax Recognition Problem parsing the query [SELECT c
      FROM Customer]. The parser returned the following [unexpected token: null].
      at
      oracle.toplink.essentials.exceptions.EJBQLException.recognitionException(EJBQLException.java:93)
      at
      oracle.toplink.essentials.internal.parsing.ejbql.EJBQLParserBase.reportError(EJBQLParserBase.java:195)
      at
      oracle.toplink.essentials.internal.parsing.ejbql.antlr273.EJBQLParser.rangeVariableDeclaration(EJBQLParser.java:1745)
      at
      oracle.toplink.essentials.internal.parsing.ejbql.antlr273.EJBQLParser.identificationVariableDeclaration(EJBQLParser.java:1624)

      So here are 2 "Ease of Development" bugs (EOD is the only theme for Java EE 5):

      1/ what is unexpected token: null ?
      2/ why do I need to see an antlr stack trace in the server log?

      With this level of user error reporting, how can we expect to have 3 millions
      users to use effectively JPA EJBQL?

        Activity

        Hide
        marina vatkina added a comment -

        Assigned

        Show
        marina vatkina added a comment - Assigned
        Hide
        mb124283 added a comment -

        Assigning it to Michael Bouschen

        Show
        mb124283 added a comment - Assigning it to Michael Bouschen
        Hide
        mb124283 added a comment -

        Started looking into this.

        Show
        mb124283 added a comment - Started looking into this.
        Hide
        mb124283 added a comment -

        This is fixed in the FCS branch and in the trunk.

        The ANTLR generated error message represents the end-of-input token as null
        which leads to this unreadable error message. I already fixed this problem for
        the EJB 2.1 EJBQL compiler and now integrated this fix into the
        entity-persistence query compiler. The fix analyzes the ANTLR exception thrown
        by the ANTLR generated code and converts this into our own exception. This
        avoids the ANTLR stacktrace and gives a better error message in case of an
        incomplete query text.

        Show
        mb124283 added a comment - This is fixed in the FCS branch and in the trunk. The ANTLR generated error message represents the end-of-input token as null which leads to this unreadable error message. I already fixed this problem for the EJB 2.1 EJBQL compiler and now integrated this fix into the entity-persistence query compiler. The fix analyzes the ANTLR exception thrown by the ANTLR generated code and converts this into our own exception. This avoids the ANTLR stacktrace and gives a better error message in case of an incomplete query text.
        Hide
        mb124283 added a comment -

        Updated target milestone.

        Show
        mb124283 added a comment - Updated target milestone.
        Hide
        Bhakti Mehta added a comment -
            • Issue 4913 has been marked as a duplicate of this issue. ***
        Show
        Bhakti Mehta added a comment - Issue 4913 has been marked as a duplicate of this issue. ***
        Hide
        marina vatkina added a comment -

        Ignore the last comment - issue 4913 is a duplicate of a JAXB issue with the
        same number (https://jaxb.dev.java.net/issues/show_bug.cgi?id=503)

        Show
        marina vatkina added a comment - Ignore the last comment - issue 4913 is a duplicate of a JAXB issue with the same number ( https://jaxb.dev.java.net/issues/show_bug.cgi?id=503 )

          People

          • Assignee:
            mb124283
            Reporter:
            ludo
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: