4

I have a problem with Flink

java.lang.NoSuchMethodError: org.apache.flink.api.java.typeutils.ObjectArrayTypeInfo.getInfoFor(Lorg/apache/flink/api/common/typeinfo/TypeInformation;)Lorg/apache/flink/api/java/typeutils/ObjectArrayTypeInfo;
    at LowLevel.FlinkImplementation.FlinkImplementation$$anon$6.<init>(FlinkImplementation.scala:28)
    at LowLevel.FlinkImplementation.FlinkImplementation.<init>(FlinkImplementation.scala:28)
    at IRLogic.GmqlServer.<init>(GmqlServer.scala:15)
    at it.polimi.App$.main(App.scala:20)
    at it.polimi.App.main(App.scala)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    ...

the line with the problem is this one

implicit val regionTypeInformation = 
         api.scala.createTypeInformation[FlinkDataTypes.FlinkRegionType]

in the FlinkRegionType I have an Array of custom object

I developed the app with the maven plugin in the IDE and everything is working good, but when I move to the version I downloaded from the website I get the error above

I am using Flink 0.9

I was thinking that some library may be missing but I am using maven for handling everything. Moreover running through the code of ObjectArrayTypeInfo.java it doesn't seem to be the problem

5
  • Are you sure that you are using the same Flink versions. The quickstart Maven archetypes are configured for Flink 0.8.1. Can you check the pom.xml file if version is correctly set to 0.9 (milestone-1 or SNAPSHOT)? Commented May 8, 2015 at 10:19
  • in the pom.xml i have 0.9-SNAPSHOT, in the webclient 0.9.0-milestone-1 Commented May 8, 2015 at 10:52
  • Have you tried to set the pom.xml to 0.9.0-milestone-1 and rebuild the program JAR file? Commented May 8, 2015 at 10:59
  • ok using the milestone-1 in maven it showed me some different errors, but after solving them everything works correctly, thanks. if you post an answer i will mark it as correct Commented May 8, 2015 at 11:52
  • Possible duplicate of java.lang.NoSuchMethodError in Flink Commented Oct 25, 2017 at 12:45

1 Answer 1

3

A NoSuchMethodError commonly indicates a version mismatch between the libraries a Flink program was compiled with and the system the program is executed on. Especially if the same code works in an IDE setup where compile and execution libraries are the same.

In such case, you should check the version of the Flink dependencies, for example in the Maven POM file.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.