4 Replies Latest reply on Sep 2, 2002 1:00 PM by dsundstrom

    Bug in Parsing NOT MEMBER OF?

      I'm continuing through the Monson-Haefel book. Still a slog, and JBoss continues to perform well. This one point about Exercise 8.2 I can't seem to overcome, so I thought I'd post excerpts from the server log:


      2002-08-06 19:59:49,490 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.CruiseEJB.findMemberOf] EJB-QL:
      SELECT OBJECT( crs ) FROM Cruise crs, IN (crs.reservations) res, Customer cust
      WHERE cust = ?1 AND cust MEMBER OF res.customers

      2002-08-06 19:59:49,500 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.CruiseEJB.findMemberOf] SQL: SELECT t0_crs.ID FROM Cruise t0_crs, Reservation t3_res, Customer t1_cust, Customer t2_res_customers, customer_reservation_link t4_res_customers_RELATION_TABLE WHERE ((t1_cust.ID=?) AND (t2_res_customers.ID = t1_cust.ID)) AND (t3_res.ID=t4_res_customers_RELATION_TABLE.RESERVATION_ID AND t2_res_customers.ID=t4_res_customers_RELATION_TABLE.CUSTOMER_ID AND t0_crs.ID=t3_res.CRUISE_ID)


      2002-08-06 19:59:49,500 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.CruiseEJB.findNotMemberOf] EJB-QL:
      SELECT OBJECT( crs ) FROM Cruise crs, IN (crs.reservations) res, Customer cust
      WHERE cust = ?1 AND cust NOT MEMBER OF res.customers

      2002-08-06 19:59:49,500 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.CruiseEJB.findNotMemberOf] SQL: SELECT t0_crs.ID FROM Cruise t0_crs, Reservation t2_res, Customer t1_cust WHERE ((t1_cust.ID=?) AND (t4_res_customers_RELATION_TABLE.RESERVATION_ID IS NULL AND t1_cust.ID=t4_res_customers_RELATION_TABLE.CUSTOMER_ID)) AND (t0_crs.ID=t2_res.CRUISE_ID)

      I'm not sure why the alias t4_res_customers_RELATION_TABLE is not defined (it is in MEMBER OF above), among other questions. I could, of course, overwrite it with <declared-sql>, which is what I did for the bug about Booleans in MySql (which is TINYINT): simpler for me than downloading a whole new build. But I thought someone would want to know, as I couldn't find mention of it elsewhere.

      Hope this helps!

        • 1. Re: Bug in Parsing NOT MEMBER OF?
          dsundstrom

          Pull down the 3.0.1 release and this problem will go away.

          • 2. Re: Bug in Parsing NOT MEMBER OF?
            dplante

            I'm getting this problem in version 3.0.2 with a connection to MySQL. However, I have noticed that the problem does not occur with Hypersonic

            I've attached a zip file that demonstrates the problem.
            To use (go to top directory i.e ex08_2_mysql)
            1. run ant
            2. run ant.initialize
            3. run ant run.client_82i. You should get the error

            Make sure JBOSS_HOME environment variable is set too to use this ANT build script.

            Note that to switch between Hypersonic and MySQL, edit ex08_2_mysq_\src\jboss-resources\META-INF\jbosscmp-jdbc.xml

            for Hypersonic, make sure the lines below <jbosscmp-jdbc> are like this:

            java:/TitanDS
            <datasource-mapping>mySQL</datasource-mapping>
            <create-table>true</create-table>
            <remove-table>true</remove-table>


            for Hypersonic, make sure the lines below <jbosscmp-jdbc> are like this:

            java:/DefaultDS
            <datasource-mapping>Hypersonic SQL</datasource-mapping>
            <create-table>true</create-table>
            <remove-table>true</remove-table>

            • 3. Re: Bug in Parsing NOT MEMBER OF?
              dplante

              here's the file

              • 4. Re: Bug in Parsing NOT MEMBER OF?
                dsundstrom

                Can you post this as a bug report on source forge?

                Thanks,

                -dain