mysema/querydsl — Issue #33: Improve "Undeclared Path X" error message
Author: cowwoc
Created: 2011-10-19 15:00:03+00:00
State: open

I've recently started seeing "Undeclared Path X" error messages when issuing queries. I eventually tracked it down to the fact that I was referencing an SQL variable in my query that was not being passed into the SQLQueryImpl constructor.

I found the error message to be confusing. I suggest providing more information about what is actually wrong, such as:

Query refers to undeclared variable "X". Please declare it in the SQLQueryImpl constructor.

1. The variable name should be quoted, to make it obvious we're talking about a user-declared variable
2. The error message should suggest how to fix the problem.