'Why I am getting java.lang.AbstractMethodError errors?
What are the possible causes for ABstractMethodError?
Exception in thread "pool-1-thread-1" java.lang.AbstractMethodError:
org.apache.thrift.ProcessFunction.isOneway()Z
at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:51)
at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39)
at com.gemfire.gemstone.thrift.hbase.ThreadPoolServer$ClientConnnection.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Solution 1:[1]
The simple answer is this: some code is trying to call a method which is declared abstract
. Abstract methods have no body and cannot be executed. Since you have provided so little information I can't really elaborate more on how this can happen since the compiler usually catches this problem - as described here, this means the class must have changed at runtime.
Solution 2:[2]
It usually means that you are using an old version of an interface implementation which is missing a new interface method. For example java.sql.Connection interface got a new getSchema method in 1.7. If you have 1.6 JDBC driver and call Connection.getSchema you will get AbstractMethodError.
Solution 3:[3]
From documnentation of AbstractMethodError
Thrown when an application tries to call an abstract method. Normally, this error is caught by the compiler; this error can only occur at run time if the definition of some class has incompatibly changed since the currently executing method was last compiled.
Solution 4:[4]
A kind of special case of the above answer.
I had this error, because I was using a spring-boot-starter-parent
(e.g. 2.1.0.RELEASE
uses spring version: 5.1.2.RELEASE
) but I also included a BOM
, that also defined some spring dependencies, but in an older version (e.g. 5.0.9.RELEASE
).
So one thing to do, is check your dependency tree
(in Eclipse e.g. you can use the Dependency Hierarchy) if you are using the same versions.
So one solution could be that you upgrade the spring dependencies in your BOM
, another one could be that you exclude them (but depending on the amount, this could be ugly).
Solution 5:[5]
If you download any project zip file, after unzipping them and importing into Android Studio, you are unable to run the project because this error happened.
I got out of the problem by deleting my android studio, then download and install the new version.
I truly hope it help.
Solution 6:[6]
If you you are getting this error on the implemented methods, make sure you have added your dependencies correctly as mentioned in this thread.
Solution 7:[7]
As Damian quoted :
Normally, this error is caught by the compiler; this error can only occur at run time if [...]
I had the same error that was not caught by the compiler but at runtime. To solve it I only compiled again without giving the code any modification.
Solution 8:[8]
if you are getting this error on a minified build using Proguard then check if the class is a POJO class and if so then exclude it from the Proguard using the below rule:
-keep class your.application.package.pojo.** {*;}
Solution 9:[9]
I had the same error when I imported an eclipse project into intellij ide.. I tried to import it without .iml file then my problem was solved
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow