org.apache.flink.api.common.functions.InvalidTypesException: The return type of function 'retrieve(ReplyGraph.java:33)' could not be determined automatically, due to type erasure. You can give type information hints by using the returns(...) method on the result of the transformation call, or by letting your function implement the 'ResultTypeQueryable' interface.

Stack Overflow | hasan | 9 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Flink does not run my appliation due to invalidtypesexception when using java8 lambdas

    Stack Overflow | 9 months ago | hasan
    org.apache.flink.api.common.functions.InvalidTypesException: The return type of function 'retrieve(ReplyGraph.java:33)' could not be determined automatically, due to type erasure. You can give type information hints by using the returns(...) method on the result of the transformation call, or by letting your function implement the 'ResultTypeQueryable' interface.
  2. 0

    Creating a graph using a mapper function does not work

    GitHub | 2 years ago | cebe
    org.apache.flink.client.program.ProgramInvocationException: The main method caused an error.

    Root Cause Analysis

    1. org.apache.flink.api.common.functions.InvalidTypesException

      The generic type parameters of 'Tuple3' are missing. It seems that your compiler has not stored them into the .class file. Currently, only the Eclipse JDT compiler preserves the type information necessary to use the lambdas feature type-safely. See the documentation for more information about how to compile jobs containing lambda expressions.

      at org.apache.flink.api.java.typeutils.TypeExtractor.validateLambdaGenericParameter()
    2. flink-java
      DataSet.map
      1. org.apache.flink.api.java.typeutils.TypeExtractor.validateLambdaGenericParameter(TypeExtractor.java:1316)
      2. org.apache.flink.api.java.typeutils.TypeExtractor.validateLambdaGenericParameters(TypeExtractor.java:1302)
      3. org.apache.flink.api.java.typeutils.TypeExtractor.getUnaryOperatorReturnType(TypeExtractor.java:346)
      4. org.apache.flink.api.java.typeutils.TypeExtractor.getUnaryOperatorReturnType(TypeExtractor.java:304)
      5. org.apache.flink.api.java.typeutils.TypeExtractor.getMapReturnTypes(TypeExtractor.java:119)
      6. org.apache.flink.api.java.DataSet.map(DataSet.java:215)
      6 frames
    3. org.apache.flink
      ReplyGraph.main
      1. org.apache.flink.quickstart.exercise2.ReplyGraph.retrieve(ReplyGraph.java:33)
      2. org.apache.flink.quickstart.exercise2.ReplyGraph.main(ReplyGraph.java:56)
      2 frames
    4. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      4. java.lang.reflect.Method.invoke(Method.java:498)
      4 frames
    5. IDEA
      AppMain.main
      1. com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)
      1 frame