Follow by Email

Sunday, September 13, 2015

java.lang.NoSuchMethodError: com.rsa.jsafe.CryptoJ.isNativeAvailable(Ljava/lang/String;)


java.lang.NoSuchMethodError: com.rsa.jsafe.CryptoJ.isNativeAvailable(Ljava/lang/String;)

Ah you lil devlil , this exception wasted alot of my time debugging and looking into the solution , this could be because of many reasons

  1. You have new jar in you project and you compile your code with it but when you deploy to server  , it has old jar file in it's class path , and the class loader has loaded the old jar file which doesn't have this new method in the specified class.
  2. You may have two version of same jar file in your class path , an older version and a newer version.
However none of the above was the case for me , and I was left totally clueless.

I had file in my classpath also , everything was perfect.


After banging my head with the wall for so many days , I was lucky to find the solution which was to copy the latest from my Documentum installation folder and copy another file called dfc.keystore in my classpath. And this resolved my problem , now don't ask me why :) and try this solution at your machine if it works leave a comment here.

Tuesday, September 1, 2015

Where can I view Tomcat log files in Eclipse?

Below text taken from a very useful post at stackoverflow

if you're after the catalina.out log file then follow the directions below:
  • In the servers tab, double-click on the Tomcat Server. You will get a screen called Overview.
  • Click on "Open launch configuration". Click on the "Common" tab.
  • Towards the bottom of the screen you can check the "File" checkbox and then specify a file that can be used to log your console (catalina.out) output.
  • Finally, restart the Tomcat server.

How do I know my class is loaded from which jar in my classpath?

If you want to see from which jar file your class has been loaded while running your web application , then add below VM attribute in your JDK


Java will start putting the information on standard output regarding a class being loaded from which jar file . This is sometimes very useful to deal with the weird class path issue , especially if you have different versions of same jar files in your class path  for god knows whatever reason ;).