Input parameters can only be used in WHERE clause or HAVING clause in a query.
Building with maven doesn't raise any error and the code works properly. The error is displayed only in JBDS. Using another Eclipse based IDE, for example IBM RAD doesn't raise any error. And even in JBDS, not all the projects have this behaviour.