Wicket7: https://github.com/wicketstuff/core/blob/wicket-7.x/lambda-parent/lambda/src/main/java/org/wicketstuff/lambda/SerializableBiConsumer.java
WBR, Maxim (from mobile, sorry for the typos) On Thu, Jun 21, 2018, 08:13 Maxim Solodovnik <solomax...@gmail.com> wrote: > > https://cwiki.apache.org/confluence/display/WICKET/Migration+to+Wicket+8.0#MigrationtoWicket8.0-Provideserializableversionsofjava.util.function.(Supplier|Consumer|Function|BiConsumer)ASFJIRA5aa69414-a9e9-3523-82ec-879b028fb15bWICKET-5991 > <https://cwiki.apache.org/confluence/display/WICKET/Migration+to+Wicket+8.0#MigrationtoWicket8.0-Provideserializableversionsofjava.util.function.(Supplier%7CConsumer%7CFunction%7CBiConsumer)ASFJIRA5aa69414-a9e9-3523-82ec-879b028fb15bWICKET-5991> > > WBR, Maxim > (from mobile, sorry for the typos) > > On Wed, Jun 20, 2018, 22:42 m.xinu <mehdi_x...@yahoo.com.invalid> wrote: > >> Hi, >> >> I'm using Apache Wicket 7.9.0 alongside Spring 5.0.5.RELEASE. In one of >> my beans, I call some stream API containing multiple lambda expressions. >> During that page execution, I get following exception: >> >> Caused by: java.io.NotSerializableException: >> org.devocative.metis.service.data.ReportService$$Lambda$126/997816965 >> >> and it is very strange for me since it is in one of my beans not in any >> Wicket-related part. >> >> I've searched and I've found the Serializable casting solution, however >> it results in a very complex syntax for my code. So is there any other >> solution? Dose Wicket has a way for this type of serialization? >> >> >> P.S: My block of code for stream: >> >> reports.parallelStream() >> .filter(report -> >> externalAuthorizationService == null || >> externalAuthorizationService.authorizeReport(report, null, >> currentUser.getUserId()) >> ) >> .flatMap(report -> report.getGroups().stream().map(dataGroup -> new >> KeyValueVO<>(dataGroup, report))) >> .collect(Collectors.groupingBy( >> KeyValueVO::getKey, >> () -> new TreeMap<>(Comparator.comparing(DataGroup::getName)), >> Collectors.mapping( >> KeyValueVO::getValue, >> Collectors.toList())) >> ); >> >>