I have encountered the same problem with you.But when i deployed it in Jboss4.0,it works.I dont konw why,do you?
With JBoss 3.2.x implementing EJB 2.0 the like operator with a varaiable as argument is not supported for standard apps. Constant values are supported. If you surround the placeholder with '' this is a constant string, not a variable any more.
There is an jboss specific extension which supports this.
Put a constant after like in ejb-jar.xml and put the same query in jbosscmp-jdbc.xml with a variable. As far as I remember, the % sign has to be in the variables content.
With JBoss 4.0 implementing EJB 2.1 the like operator with a variable is supported as a standard feature.
This problem troubles me for several days. Now I know it is a ?????Limitation, thank you guys very much!