Flink NoSuchMethod exception when using dataset with custom array of objects

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 one

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

      

in FlinkRegionType

I have a Array

custom object

I have developed a maven plugin application in the IDE and everything works well, but when I go to the version downloaded from the website I get the above error

I am using Flink 0.9

I thought some library might be missing, but I am using maven to handle everything. Also, running the ObjectArrayTypeInfo.java code doesn't seem to be a problem

+3


source to share


1 answer


A NoSuchMethodError

usually indicates a version mismatch between the libraries with which the Flink program was compiled and the system on which the program is running. Especially if the same code runs in an IDE where the compilation and runtime libraries are the same.



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

+3


source







All Articles