Error: java.lang.NoSuchMethodError

This error manifests itself usually after upgrading the webapp and has no apparent meaning, as the required class seems to be present in the compiled jar files. It is usually due to one of the two following causes:
  • An old version of the compiled classes is being cached by Tomcat, or
  • Tomcat is not being restarted, i.e. Tomcat receives the shutdown command but for some reason cannot terminate
To solve this problem:
  • Shut down Tomcat (check with the Unix command ps fax that no instances of java keep running after the required shutdown and - in case they do - kill them manuall with killall -9 java).
  • Clean up the Tomcat class cache - delete the entire content of the directory work that is usually located within the main Tomcat directory
  • Make sure that there is one and only one QueueMetrics webapp in the entire Tomcat system (look below the webapps directory and delete accordingly)
  • Restart Tomcat
This should fix your problem. If you fear that you have too few RAM for QueueMetrics, an ongoing "deep" garbage collection can slow down the JAva VM to a crawl and prevent it from stopping when requested to do so. In this case,see also "Out of memory error".

Permalink - Back to FAQs

QueueMetrics Training