Getting java.lang.NoSuchMethod for a method that exists java 7

I am getting a strange error that I am having trouble understanding, can someone here explain to me what this actually means? I will add more information upon request.

Here is the stack trace:

java.lang.NoSuchMethodError: com.someCompany.ctg.tla.models.tables.SubtopicColumn.getHaveAnyNode()Ljava/lang/String;
    at com.someCompany.ctg.tla.compilers.DecisionTableLinker.insertSubtopics(DecisionTableLinker.java:373)
    at com.someCompany.ctg.tla.compilers.DecisionTableLinker.attachTopics(DecisionTableLinker.java:284)
    at com.someCompany.ctg.tla.compilers.DecisionTableBuilder.link(DecisionTableBuilder.java:213)
    at com.someCompany.ctg.tla.compilers.DecisionTableBuilder.link(DecisionTableBuilder.java:247)
    at com.someCompany.ctg.tla.compilers.qa.CompilerTest.testCompiler(CompilerTest.java:54)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)

      

Is this error basically what I call a method that doesn't exist? Or the class I'm calling depends on a method that doesn't exist ...

+3


source to share


2 answers


The error indicates that you are importing and using a version jar

with a class library that explicitly skips the method getHaveAnyNode()

.

If you have two versions of this jars

, make sure the right one is imported. It looks like you are compiling the right jar well and packing with the wrong one.



See NoSuchMethodError

+3


source


This means that the method you are calling does not exist.



In your case: String getHaveAnyNode ()

+3


source







All Articles