I actually found out why the error was occurring. This is due to a wrong import of the ProcessWindowFunction.
I did: org.apache.flink.streaming.api.functions.windowing
But i should have done: org.apache.flink.streaming.api.scala.function
The first one is a Java function, which has different parameters, whereas the second one is a scala function that has other parameters.
Java parameters: [(String, String, Int), NotInferredR, String, TimeWindow] Scala parameters: [(String, String, Int), CommitSummary, String, TimeWindow]
Commitsummary can be anyclass