I suspect the culprit is the Java upgrade rather than Tapestry. There are some internal changes in the sorting algorithm (for example, see https://bugs.openjdk.java.net/browse/JDK-8062797 although it doesn't directly match your case). But basically, you have to make sure your grid data source doesn't contain null values, or you feed a comparator to it that can handle nulls.
Kalle On Mon, Jun 27, 2016 at 7:43 AM, Davide Vecchi <d...@amc.dk> wrote: > Hi everybody > > For now I cannot post code to reproduce this problem because it only > occurs with one columns of a specific grid from a big application and so > far I wasn't able to extract the code to reproduce the error into a > runnable example. But after posting this I will keep trying and if I manage > I will post that. > > We migrated this web application from Java 1.7 + Tapestry 5.3.7 to Java > 1.8 with Tapestry 5.3.8 . > > Clicking on the column header of this column - which contains String > values - causes the exception below. > > While I'm investigating this error I was wondering if someone is aware of > differences in the grid sorting of Tapestry 5.3.8 that might cause it to > throw a null-pointer where Tapestry 5.3.7 wouldn't (and maybe should; it's > likely that there is a mistake of mine that was somehow being "forgiven" by > 5.3.7). > > Stacktrace: > > java.lang.NullPointerException > ? > org.apache.tapestry5.internal.grid.CollectionGridDataSource$2.compare(CollectionGridDataSource.java:78) > ? > org.apache.tapestry5.internal.grid.CollectionGridDataSource$3.compare(CollectionGridDataSource.java:91) > ? java.util.TimSort.countRunAndMakeAscending(TimSort.java:355) > ? java.util.TimSort.sort(TimSort.java:234) > ? java.util.Arrays.sort(Arrays.java:1512) > ? java.util.ArrayList.sort(ArrayList.java:1454) > ? java.util.Collections.sort(Collections.java:175) > ? > org.apache.tapestry5.internal.grid.CollectionGridDataSource.prepare(CollectionGridDataSource.java:97) > ? > my.package.gui.tapestry.components.AMCGridEmbedded$CachingDataSource.prepare(AMCGridEmbedded.java:853) > ? > my.package.gui.tapestry.components.AMCGridEmbedded.setupDataSource(AMCGridEmbedded.java:1174) > ? > my.package.gui.tapestry.components.AMCGridEmbedded.setupRender(AMCGridEmbedded.java:655) > ? > my.package.gui.tapestry.components.AMCGridEmbedded.advised$setupRender_1a14d3f8fd924(AMCGridEmbedded.java) > ? > my.package.gui.tapestry.components.AMCGridEmbedded$Invocation_setupRender_1a14d3f8fd923.proceedToAdvisedMethod(Unknown > Source) > ? > org.apache.tapestry5.internal.plastic.AbstractMethodInvocation.proceed(AbstractMethodInvocation.java:84) > ? .... > ? .... > >