2

I am trying to run this program : [Flink CEP Monitoring][1]

[1]: https://github.com/tillrohrmann/cep-monitoring on Amazon EC2 with openjdk1.8 & Flink 1.0.2 installed on it. But when I am trying to run this program,it is throwing the following exception :

The generic type parameters of 'Map' 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. org.apache.flink.api.java.typeutils.TypeExtractor.validateLambdaGenericParameter(TypeExtractor.java:1316) org.apache.flink.api.java.typeutils.TypeExtractor.validateLambdaGenericParameters(TypeExtractor.java:1302) org.apache.flink.api.java.typeutils.TypeExtractor.getUnaryOperatorReturnType(TypeExtractor.java:346) org.apache.flink.cep.PatternStream.select(PatternStream.java:64) org.stsffap.cep.monitoring.CEPMonitoring.main(CEPMonitoring.java:95)

Is there any way to compile Flink programs with Java 8 due to Lambda expressions ?? How can I solve this error ??

Hank D
  • 6,271
  • 2
  • 26
  • 35
AKSHAY SHINGOTE
  • 407
  • 1
  • 8
  • 22

2 Answers2

0

This is a eclipse bug: #449063!

In the meantime I suggest you to build the project outside the eclipse. Use "mvn clean install" from your command line and then you will probably run the main class from your eclipse ide.

maiello
  • 21
  • 2
0

By default the Eclipse JDT compiler does not store the generic type information in the class files. You have to set the JDT flag org.eclipse.jdt.core.compiler.codegen.lambda.genericSignature to generate.

You can find a detailed description in the Java 8 Programming Guide.

twalthr
  • 2,584
  • 16
  • 15