1 Reply Latest reply on Nov 19, 2004 2:33 PM by Russ Loucks

    implement a wild card search

    Harshinie Dayaratne Newbie

      I want implement a wild card search using ejb ql.

      to do that i have implemented ejb query using LIKE with %. as given in the sample.
      the query signature as follows
      @ejb.finder signature = "java.util.Collection findByConsignorRef(java.lang.String consignorRef)"
      * query = "SELECT OBJECT(o) FROM Order o WHERE o.consignorReference LIKE ?1"

      the parameter contains %.

      when i deploy that in jboss
      following exception is thrown

      org.jboss.deployment.DeploymentException: Error compiling EJB-QL statement 'SEL
      CT OBJECT(o) FROM Order o WHERE o.consignorReference LIKE ?1'; - nested throwab
      e: (org.jboss.ejb.plugins.cmp.ejbql.ParseException: Encountered "1" at line 1,
      olumn 63.
      Was expecting:
      <STRING_LITERAL> ...
      )

      pls tell me what is the error.

      how can i eleminate this error.

      is there anyother way i could implement this.