Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why I am getting java.lang.AbstractMethodError errors?

Tags:

java

thrift

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)
like image 385
Avinash Avatar asked Jul 31 '13 11:07

Avinash


2 Answers

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.

like image 182
Evgeniy Dorofeev Avatar answered Nov 06 '22 01:11

Evgeniy Dorofeev


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.

like image 34
devrobf Avatar answered Nov 06 '22 00:11

devrobf