You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by "Aaron Mulder (JIRA)" <de...@geronimo.apache.org> on 2005/10/14 19:11:44 UTC

[jira] Created: (GERONIMO-1072) Better error for bad EJB QL

Better error for bad EJB QL
---------------------------

         Key: GERONIMO-1072
         URL: http://issues.apache.org/jira/browse/GERONIMO-1072
     Project: Geronimo
        Type: Bug
  Components: OpenEJB  
    Versions: 1.0-M5    
    Reporter: Aaron Mulder
     Fix For: 1.0


I have 2 tables with CMR -- say Parent(ID) and Child(ID, PARENT_ID).  In this case, I set up the Child EJB so that it did not have a CMP field for PARENT_ID, but it did have a CMR using that as the foreign key.

I wrote an EJB QL statement something like "SELECT Object(c) FROM Child c WHERE c.parentId=?1" and got this error (and nothing on the console):

    Error: Operation failed: Unable to initialize EJBContainer GBean:
    ejbName [Test] caused by EJB [Entity logical name=[Test]; physical
    name=[Test]]

This was not terribly helpful in diagnosing the problem, which was that my EJB QL actually should have been "SELECT Object(c) FROM Child c WHERE c.parent.id=?1".  It did not even mention EJB QL.  Ideally, it would say something like "Invalid EJB QL for Query [findByParent] for EJB [Test]".

-- 
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


[jira] Closed: (GERONIMO-1072) Better error for bad EJB QL

Posted by "Gianny Damour (JIRA)" <de...@geronimo.apache.org>.
     [ http://issues.apache.org/jira/browse/GERONIMO-1072?page=all ]
     
Gianny Damour closed GERONIMO-1072:
-----------------------------------

    Resolution: Fixed

Exceptions were not propagated to deployer. If properly propagated, the following contextual information is typically available:

    Error: Operation failed: Unable to initialize EJBContainer GBean:
    ejbName [HoldingEJB]
        EJB [Entity logical name=[HoldingEJB]; physical name=[Holding]]
        Select [Select method=[ejbSelectQuoteFromSymbol]; EJB-QL=[ELECT
    OBJECT(q) from Quote q WHERE q.symbol = ?1]]
        Parser, lexer or Tree-walker exception
        Error while parsing.

> Better error for bad EJB QL
> ---------------------------
>
>          Key: GERONIMO-1072
>          URL: http://issues.apache.org/jira/browse/GERONIMO-1072
>      Project: Geronimo
>         Type: Bug
>   Components: OpenEJB
>     Versions: 1.0-M5
>     Reporter: Aaron Mulder
>     Assignee: Gianny Damour
>      Fix For: 1.0

>
> I have 2 tables with CMR -- say Parent(ID) and Child(ID, PARENT_ID).  In this case, I set up the Child EJB so that it did not have a CMP field for PARENT_ID, but it did have a CMR using that as the foreign key.
> I wrote an EJB QL statement something like "SELECT Object(c) FROM Child c WHERE c.parentId=?1" and got this error (and nothing on the console):
>     Error: Operation failed: Unable to initialize EJBContainer GBean:
>     ejbName [Test] caused by EJB [Entity logical name=[Test]; physical
>     name=[Test]]
> This was not terribly helpful in diagnosing the problem, which was that my EJB QL actually should have been "SELECT Object(c) FROM Child c WHERE c.parent.id=?1".  It did not even mention EJB QL.  Ideally, it would say something like "Invalid EJB QL for Query [findByParent] for EJB [Test]".

-- 
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


[jira] Assigned: (GERONIMO-1072) Better error for bad EJB QL

Posted by "Gianny Damour (JIRA)" <de...@geronimo.apache.org>.
     [ http://issues.apache.org/jira/browse/GERONIMO-1072?page=all ]

Gianny Damour reassigned GERONIMO-1072:
---------------------------------------

    Assign To: Gianny Damour

> Better error for bad EJB QL
> ---------------------------
>
>          Key: GERONIMO-1072
>          URL: http://issues.apache.org/jira/browse/GERONIMO-1072
>      Project: Geronimo
>         Type: Bug
>   Components: OpenEJB
>     Versions: 1.0-M5
>     Reporter: Aaron Mulder
>     Assignee: Gianny Damour
>      Fix For: 1.0

>
> I have 2 tables with CMR -- say Parent(ID) and Child(ID, PARENT_ID).  In this case, I set up the Child EJB so that it did not have a CMP field for PARENT_ID, but it did have a CMR using that as the foreign key.
> I wrote an EJB QL statement something like "SELECT Object(c) FROM Child c WHERE c.parentId=?1" and got this error (and nothing on the console):
>     Error: Operation failed: Unable to initialize EJBContainer GBean:
>     ejbName [Test] caused by EJB [Entity logical name=[Test]; physical
>     name=[Test]]
> This was not terribly helpful in diagnosing the problem, which was that my EJB QL actually should have been "SELECT Object(c) FROM Child c WHERE c.parent.id=?1".  It did not even mention EJB QL.  Ideally, it would say something like "Invalid EJB QL for Query [findByParent] for EJB [Test]".

-- 
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