Loading
NoSuchMethodError

Java Quick Notes

Refresh Your Java - Before Java Interview

We are Agile, believe in less Documentation - Only Quick notes (Java Interview Questions) of Java/J2ee Read more....


Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet

Go to SiteMap

Q)  java.lang.NoSuchMethodError


Ans)

"NoSuchMethodError" is thrown if an application tries to call a specified method of a class
(either static or instance), and that class no longer has a definition of that method.

One of the possible reasons for this could be the Jar or Class conflicting, this may
happen due to having the old Versions of Jar files or classes (_JspServlets classes
in Temp Directory) files in the Classpath.

Now a days most of the Web Applications are loaded with Tons of Jar files, as a result
there are chances that the same Class file could reside in multiple Jars files. As per
design JVM picks up (ClassLoader loads) the Class from the Jar which it reads first in
Classpath, which could be a wrong version of the Class which does not have the specified
method definition.

To avoid this, you need to remove all Older Versions of the Classes and Jars, and make
sure you have the Lasted Jar file first in Classpath.

If you encounter this while accessing the JSP, please clean the Temp folder of your
App server.



more info...       Back to top

------------------------- We hope you got necessary Info On -----------------------------------------

NoSuchMethodError


NoSuchMethodError

-------------------------------------------------------------------------------------------------------



Face Book
Request for a Mock Interview/Training

Get a PDF

Face Book
Same look (Read) on any device, this is Ads free