2 Replies Latest reply on Jan 25, 2004 6:09 AM by Juha Lindfors

    VERY URJENT!! Seems like JBOSS replaces String params with n

    Shai Bentin Newbie

       

      "bentins" wrote:
      "bentins" wrote:
      I have the following doclet:

      * @ejb.finder
      * query = "SELECT DISTINCT OBJECT(a) FROM User AS a WHERE a.userName LIKE '%?1%'"
      * signature = "com.matrix.framework.ip.UserLocal findByUserName(java.lang.String aUserName)"

      it compiles and deploys with no problem!!!

      When I call the finder it finds nothing! eventhough such a user exists!!!
      more over when I tested the doclet by putting the string directly into it like this:

      * @ejb.finder
      * query = "SELECT DISTINCT OBJECT(a) FROM User AS a WHERE a.userName LIKE '%james%'"
      * signature = "com.matrix.framework.ip.UserLocal findByUserName(java.lang.String aUserName)"

      it found the object.

      I used p6Spy driver to look at the SQL. Here is what was generated:

      1074621247243|5|0|statement|SELECT DISTINCT t0_a.ID FROM EMI_USER t0_a WHERE (t0_a.USER_NAME LIKE '%?1%')|SELECT DISTINCT t0_a.ID FROM EMI_USER t0_a WHERE (t0_a.USER_NAME LIKE '%null1%')

      it seems that Jboss replaced my String with nulls. I checked my code and printed out the strings just before the finder is run and it had a good value.

      Can anyone help me on what could be wrong here?