Refresh Your Java - Before Java Interview
We are Agile, believe in less Documentation - Only Quick notes (Java Interview Questions) of Java/J2ee Read more....
"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.
This Portal is intended to put all Java/J2ee related topics at one single place for quick referance, not only Technical , but also the Project Management Related thing such as Development Process methodoogies build process, unit testing etc.,
This Portal has More than 500 Java Interview Questions (also could be Considered as Quick Notes) very neatly separated topic by topic with simple diagrams which makes you easily understandable. Importantly these are from our Realtime expericance.