My Java skills are a little rusty, but this is really weird: I am getting a java.lang.NoSuchMethodError
at runtime when calling a method in a different class - note that the code compiled fine - and the other class is contained in the same JAR as the calling method!
That would seem to indicate it's not a classpath issue - but then what?
Check out this article. http://snippets.dzone.com/posts/show/3719
URL myClassURL = MyMysteryClass.class.getProtectionDomain().getCodeSource().getLocation();
That will tell you exactly where your class is being loaded from (according to the article). Should clear up any classpath questions.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With