Mihir Mihir - 10 months ago 75
Java Question

Evaluation Errors in Eclipse:Can't Perform Nested Evaluation?

I am getting this message:

Can't Perform Nested Evaluation

in a dialouge when querying to DB to fetch some records.
The execution seems to stop there / the program is not moving to the next breakpoint and it is like hung in Eclipse. How to solve that error?

The code:

public int findCount(String countQuery, Object[] params) {
try {
BigDecimal count = (BigDecimal) jpaHelper
.findByNativeQuery(countQuery, params);
return count.intValueExact();
} catch (Exception e) {
return 0;


The query:

npe npe
Answer Source

First of all, it may be really unwise to put production code like this on a publicly available website. If you have signed some NDA, you may get in real trouble with your employee by doing that.

Second, your query is very complex. It joins a total of 11 tables, uses subqueries, function calls and most probably full-text search. Depending on the size of the tables, this query may take a lot of time (think: hours). That's why your debuggers stops at executing it and waits for the database to finish and return some results.

If you want to see what's going on on the database, I'd suggest:

  1. See the execution plan for that query. This should be doable with EXPLAIN keyword, or better use some graphical tools to visualize that.
  2. Verify (or ask some DB Admin) to see if there are indexes / partitions / statistics in place.