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 ;).

Thursday, June 4, 2015

Sura feel and gravitational force

Taken from below lecture
gravitation force  g = 9.80 meters/sec
Which mean if you drop an object from few hundred meters at 0 speed , after once second it's speed will be 9.80 meters per second but after another second it's speed will become double and will keep adding 9.8 meter/per second each second.

Subhan Allah this helped me find a scientific reason behind the story mentioned in Sura feel

Tuesday, December 23, 2014

Spring : How to escape HTML in all the pages of your application

In Spring we can escape HTML in all JSP pages generated by < form > tags.
For entire application put below lines in your web.xml

For more details see the below stackoverflow thread

Wednesday, December 10, 2014

Tinymce multiple textareas block problem

Problem :

I am using Internet Explorer , I have 4 text editors in one page all TimyMCE , the problem I am facing is that I am able to enter text in first editor however when I click on next textarea I can't type anything in it however I can see the cursor blinking in it

I have also noticed
  1. If i use tab to go to 2nd editor I am able to type , but when I use mouse to click on that textarea I can't type.
  2. I have waited for enough time to allow scipts to be loaded properly but I still face the same problme.
I am running Internet explorer in below mode

meta http-equiv="X-UA-Compatible" content="IE=8"  Shifitng it to IE=9 seems to resolve problems , but I want to run my application as IE=8. 

Solution :

I found that the latest TinyMCE editor version 4.X was not working very welll will the older browser compatibility IE=8 , being in that mode is a must for me right now because of some other dependent scripts which create problems in IE=9 .
So I decided to use an older version of TinyMCE 3.X which appeared to be compatable and now the applicaiotn is working fine.


Tuesday, November 25, 2014

HTML TD Can't Wrap text , grows with the size of line and mess up the witdh of the TD

I am using Internet Explorer 9.

A dynamicaly generated text having a very long line when displayed in a TD in my HTML table mess up the whole width of the TD which basically grows to fit the whole line and doesn't automaticaly wrap text

applying wrap text CSS on TD is not working , The solution was to apply the below style at table level

style="width: 100%; table-layout: fixed;"

I didn't even need to apply text wraping to my TDs.

Below Thread was very helpfull

and the solution which worked for me in this thread is copy pasted below

table-layout:fixed will resolve the expanding cell problem, but will create a new one. IE by default will hide the overflow but Mozilla will render it outside the box.
Another solution would be to use: overflow:hidden;width:?px
<table style="table-layout:fixed; width:100px">
   <td style="overflow:hidden; width:50px;">fearofthedarkihaveaconstantfearofadark</td>
Since I am using IE I had to only use
style="width: 100%; table-layout: fixed;"
for my table.