Debug classpath issues with style (using tools from WizTools.org)


Classpath issues typically crop up at times like these: the application is developed and tested, and when deployed in a new environment, bombs. As can be expected in any Java application, the problem (in most cases) can be due to classpath and/or classloading issues. Typical solution-hunt for such problems have kept me waking early into the morning quite often. Not anymore!

JFind

https://bitbucket.org/wiztools/jfind

This is a command line tool which finds where a particular file is located. Usage is as simple as:

$ java -jar jfind-1.0.jar org.wiztools.somepackage.SomeClass .

This helps in locating conflicting and duplicate classes in filesystem.

Classloader Servlet

https://github.com/wiztools/classloader-servlet

JFind does one important functionality: finding the class location in filesystem. But what about situations where you need to analyze which class is getting loaded in which order at runtime? For this, we have the Classloader Servlet which is a collection of two servlets which help determine this. Deployment of Classloader servlet is as simple as dropping the servlet jar into your web application's /WEB-INF/lib directory. Checkout the web site for more information.

Posted on Sun Nov 16 00:14:52 EST 2014 by Subhash Chandran
java wiztools classpath servlet