Abstract Method Error

后端 未结 9 1893
你的背包
你的背包 2020-11-30 10:15

I am working on a project in netbeans that when I launch it using the glassfish 3.1.2.Everything works fine.But when i call the /invite url which is mapped to following meth

相关标签:
9条回答
  • 2020-11-30 10:46

    I had this error from a cause not mentioned here.

    I was using proguard and it obfuscated a class, which then led to the AbstractMethodError. Just had to keep that class in proguard.

    0 讨论(0)
  • 2020-11-30 10:46

    This could probably also be happening if you are mixing any spring dependecies with spring-boot. Check all the dependencies and find if there is sping-boot dependency. If you are using spring-boot then don't import spring dependencies as spring-boot already gives everyting. If you are trying to use spring then do not go for spring-boot and vice-versa.

    0 讨论(0)
  • 2020-11-30 10:54

    I lost some time on this.

    In pom.xml, for dependencies if you have set LATEST, it can be due to that, please specify the correct version no there, it is a best practice too

    0 讨论(0)
  • 2020-11-30 10:55

    java.lang.AbstractMethodError is 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.

    Seems like this problem is due to version incompatibility in some of the jar file. I can not figure it from your code. Please check this thread.

    0 讨论(0)
  • 2020-11-30 10:55

    Put a Breakpoint on the Exception (or the line where it is occurring) to find out which class/method exactly is causing the problem, then search your classpath for all occurrences of this class. If you have more than one version of a class on your classpath, remove the wrong one.

    0 讨论(0)
  • 2020-11-30 10:59

    This can occur in NetBeans while running Java 8 and implementing an interface using lambdas and then changing the interfaces signature.

    Simple solution: run Clean and build (Shift+F11 is by default)*

    0 讨论(0)
提交回复
热议问题