I was getting the following error in the logs of the tomcat, when I try to start the tomcat server.
Error occurred during initialization of VM
Things I tried but didn’t work
1) I used class finder to find that which jar contains this class java.lang.Object, and it was rt.jar.
I added rt.jar in the classpath. But of no use.
2) I made a Environment variable CATALINA_HOME, JAVA_HOME, but didn’t help.
3) I tried rebooting the machine every time, after I set the paths specified in step 2.
4) Uninstalling and re-installing the tomcat didn’t help.
ROOT CAUSE AND SOLUTION:
During installation of tomcat, the default jre directory that was coming on the installation screens of tomcat didn’t had rt.jar
I realized this when I checked the jre folder.
Then I decided to uninstall and re-install tomcat and while re-installation I took care while specifying the jre folder. And the new jre folder had rt.jar
This solution made it work. 🙂
I m happy 🙂