query.distinct(true) causing problem in table

Using query.distinct(true) inside filtersWillBeAdded(CriteriaBuilder cb, CriteriaQuery<?> query, List predicates) method of a JPAContainer giving following errors in the stacktrace—

Severe: java.lang.NumberFormatException: For input string: “null”
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Integer.parseInt(Integer.java:580)
at java.lang.Integer.parseInt(Integer.java:615)
at com.vaadin.ui.Table.paintRowAttributes(Table.java:3948)
at com.vaadin.ui.Table.paintRow(Table.java:3872)
at com.vaadin.ui.Table.paintRows(Table.java:3711)
at com.vaadin.ui.Table.doPaintContent(Table.java:3299)
at com.vaadin.ui.Table.paintContent(Table.java:3268)
at com.vaadin.server.LegacyPaint.paint(LegacyPaint.java:65)

Here the interesting thing happening is that the container.size() giving the value with duplicate values where container.getItemIds() isn’t…

Can anyone help???


Without a test case with JPA entities it is pretty hard to give any detailed tips to get forward. The only thing that comes to my mind is that
don’t use JPAContainer
at all :wink: Typically your life will be easier without it.