Exception java.lang.NoSuchMethodError: org.apache.commons.io.FileUtils.moveFile(Ljava/io/File;Ljava/io/File;)
Exception in thread "main" java.lang.NoSuchMethodError: org.apache.commons.io.FileUtils.moveFile(Ljava/io/File;Ljava/io/File;)
a program of mine is making a call to this method . It was working fine till before few days. and now it is throwing this exception.
Since the exception is from an apache FileUtils class,it cant be any problem with my program also. So what could be the possible cause for this?
Re: Exception java.lang.NoSuchMethodError: org.apache.commons.io.FileUtils.moveFile(Ljava/io/File;Ljava/io/File;)
Could the program be executed with a different definition of the class than it was compiled with?
The one used for compilation had the method, the one for execution did not.
Read the API doc for the error message.
Re: Exception java.lang.NoSuchMethodError: org.apache.commons.io.FileUtils.moveFile(Ljava/io/File;Ljava/io/File;)
Quote:
Originally Posted by
Norm
Could the program be executed with a different definition of the class than it was compiled with?
The one used for compilation had the method, the one for execution did not.
Read the API doc for the error message.
But my doubt is, the code I am executing is that of a standard tool which is installed in the cluster since a long time.
How can execution with a different definition of the class happen after compiling?
Re: Exception java.lang.NoSuchMethodError: org.apache.commons.io.FileUtils.moveFile(Ljava/io/File;Ljava/io/File;)
Quote:
How can execution with a different definition of the class happen after compiling?
The code was compiled with jarFileA and executed with jarFileB which has a different definition for the class.
Re: Exception java.lang.NoSuchMethodError: org.apache.commons.io.FileUtils.moveFile(Ljava/io/File;Ljava/io/File;)
ok ,got it Norm. Thank you. I will get back in case I get any doubts further.
Re: Exception java.lang.NoSuchMethodError: org.apache.commons.io.FileUtils.moveFile(Ljava/io/File;Ljava/io/File;)
I have seen a similar issue with sqoop... but i dont know if that could help you :)