FilterTable Date Filter fails with Vaadin JPA Container

Hi,

If I use IndexedContainer and use Date field in it then FilterTable is working fine in filtering records based on Date field.
If I use Vaadin JPA Container for fetching the values from DB (eclipselink) then FilterTable is failing to filter the records based on Date field.

I am using Vaadin 6.8.0 & filteringTable 0.5.0 & JPA Container 2.0.0.

Getting below error in UI


Internal error
Please notify the administrator.
Take note of any unsaved data, and click here to continue.

From Logs.

SEVERE: Terminal error:
com.vaadin.event.ListenerMethod$MethodException: Invocation of method buttonClick in org.tepi.filtertable.datefilter.DateFilterPopup$2 failed.
at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:530)
at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:164)
at com.vaadin.ui.AbstractComponent.fireEvent(AbstractComponent.java:1219)
at com.vaadin.ui.Button.fireClick(Button.java:567)
at com.vaadin.ui.Button.changeVariables(Button.java:223)

Caused by: com.vaadin.event.ListenerMethod$MethodException: Invocation of method valueChange in org.tepi.filtertable.FilterTable$1 failed.
at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:530)
at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:164)
at com.vaadin.ui.AbstractComponent.fireEvent(AbstractComponent.java:1219)
at com.vaadin.ui.AbstractField.fireValueChange(AbstractField.java:937)
at com.vaadin.ui.AbstractField.valueChange(AbstractField.java:1064)
at org.tepi.filtertable.datefilter.DateFilterPopup.setInternalValue(DateFilterPopup.java:152)
at org.tepi.filtertable.datefilter.DateFilterPopup$2.buttonClick(DateFilterPopup.java:98)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:510)
… 70 more
Caused by: java.lang.IllegalStateException: Cannot find any converters for DateFilter filters!
at com.vaadin.addon.jpacontainer.filter.util.FilterConverter.convertFilter(FilterConverter.java:267)
at com.vaadin.addon.jpacontainer.filter.util.FilterConverter.convertFilters(FilterConverter.java:283)
at com.vaadin.addon.jpacontainer.filter.util.FilterConverter.convertFiltersToArray(FilterConverter.java:291)
at com.vaadin.addon.jpacontainer.filter.util.FilterConverter.access$000(FilterConverter.java:38)
at com.vaadin.addon.jpacontainer.filter.util.FilterConverter$AndConverter.toPredicate(FilterConverter.java:61)
at com.vaadin.addon.jpacontainer.filter.util.FilterConverter.convertFilter(FilterConverter.java:263)
at com.vaadin.addon.jpacontainer.provider.LocalEntityProvider.doGetEntityCount(LocalEntityProvider.java:470)
at com.vaadin.addon.jpacontainer.provider.CachingSupport$FilterCacheEntry.getEntityCount(CachingSupport.java:150)
at com.vaadin.addon.jpacontainer.provider.CachingSupport.getEntityCount(CachingSupport.java:809)
at com.vaadin.addon.jpacontainer.provider.CachingLocalEntityProvider.getEntityCount(CachingLocalEntityProvider.java:130)
at com.vaadin.addon.jpacontainer.JPAContainer.size(JPAContainer.java:886)
at com.vaadin.ui.AbstractSelect.size(AbstractSelect.java:721)
at com.vaadin.ui.CustomTable.setCurrentPageFirstItemIndex(CustomTable.java:1261)
at com.vaadin.ui.CustomTable.containerItemSetChange(CustomTable.java:3867)
at com.vaadin.addon.jpacontainer.JPAContainer.fireContainerItemSetChange(JPAContainer.java:258)
at com.vaadin.addon.jpacontainer.JPAContainer$1.filtersApplied(JPAContainer.java:175)
at com.vaadin.addon.jpacontainer.filter.util.AdvancedFilterableSupport.fireListeners(AdvancedFilterableSupport.java:96)
at com.vaadin.addon.jpacontainer.filter.util.AdvancedFilterableSupport.applyFilters(AdvancedFilterableSupport.java:219)
at com.vaadin.addon.jpacontainer.filter.util.AdvancedFilterableSupport.addFilter(AdvancedFilterableSupport.java:253)
at com.vaadin.addon.jpacontainer.JPAContainer.addContainerFilter(JPAContainer.java:980)
at org.tepi.filtertable.FilterTable.setFilter(FilterTable.java:283)
at org.tepi.filtertable.FilterTable.access$6(FilterTable.java:282)
at org.tepi.filtertable.FilterTable$1.valueChange(FilterTable.java:191)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:510)
… 81 more

Hi,

this is a known issue in FilteringTable due to using a customized DateFilter class. Since version 0.6.0 the custom filter has been replaced with standard filters which should work with all filterable containers. So, please update to a later version of the add-on and report back if the problem persists.

-tepi

Thanks :). I have upgraded to filteringtable 0.8.3. Now it is working fine.

Br,
Sankar