3 Replies Latest reply on Feb 11, 2002 10:19 AM by allisonwestley

    Message selectors

    rich_rodriguez

      I was trying to move our application from 2.2 to the 2.4.1 binaries, and I've run into problems with message selectors.

      In two places, we are using selectors on Long message properties. The code worked under 2.2, but generates exceptions ("SELECTOR: EQUAL: BAD OBJECT TYPE" and "SELECTOR: LT: BAD OBJECT TYPE") under 2.4.1.

      Has anyone else run into this?

      thanks,
      rich

        • 1. Re: Message selectors
          bsantang99

          I ran into the same issue when trying to create a selector comparing an int in 2.4.1. I haven't attempted to try other primitives but suspect the same behavior.

          String selector = "id = 5 OR id = 6";

          If you haven't already found out, try:

          String selector = "id = '5' OR id = '6'";

          • 2. Re: Message selectors

            The selector grammar was changes betwen these release. Please file a bugreport on sourceforge.

            //Peter

            • 3. Re: Message selectors
              allisonwestley

              I got the same error using 2.4.1. Previously I my message selector looked as follows:

              messageid = '5'

              even though messageid was an int, i changed this to

              messageid = 5

              in our latest build and it all worked fine. i think that the latter version is more correct (i.e. it looks like this was a bug fix).