1 Reply Latest reply on Jul 25, 2003 3:26 AM by mrgat331

    How to use order by clause in jboss

    hlfrom331 Newbie

      Hi all,

      I'm using JBuilder 8 + JBossOpenTool + JBoss3.2.1

      When deploying the ear file to JBoss I got error like below:

      How to correct it ?

      org.jboss.deployment.DeploymentException: Error compiling EJB-QL statement 'select object(o) from Foo o order by o.col1'; - nested throwable: (org.jboss.ejb.plugins.cmp.ejbql.ParseException: Encountered "order" at line 1, column 29.
      Was expecting one of:

      "," ...
      )
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.(JDBCEJBQLQuery.java:46)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCCommandFactory.createEJBQLQuery(JDBCCommandFactory.java:53)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCQueryManager.start(JDBCQueryManager.java:218)
      ...

      thanks

        • 1. Re: How to use order by clause in jboss
          mrgat331 Newbie

          The ORDER BY clause was not included in the specification due to "problems dealing with the mismatch in ordering behavior between the Java language and databases." -- Enterprise JavaBean, 3rd Edition, page 251.

          A way to get around it is to retrieve a collection of data and manipulate it based upon your ordering criteria.