I’m not a coder or a DBA, so getting answers like “look at the source” or “reset your counter” aren’t really answers. Looking for a common, yet simple answer is really difficult as well since there’s the possibility that the answer is so simple that everyone has the problem and then finds their own way to fix it without telling anyone.
I’ll tell you my problem and how I fixed it in the hopes it helps you out.
We’re looking to offer Tomcat 6 along with our Tomcat 5.5 and Tomcat 5.0 installs that already exist. We can usually copy configuration files to the new location since it’s unique to our environment. We host so many different tomcat instances that it’s not feasible to put them all under $CATALINA_BASE, but that’s okay since we just set $CATALINA_HOME and run with it.
Do our configuration, get the various directories and environment variables set up, and fire it up.
Nothing.
Well, not quite nothing, but this:
java.lang.ClassNotFoundException: org.apache.catalina.startup.Catalina
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at org.apache.catalina.startup.Bootstrap.init(Bootstrap.java:215)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:390)
Nice and useful. All it really tells me (again, not a java programmer) is that it can’t find a library of some sort.
After most of the morning trying to debug and trace what gets set and when I make the discovery. The java libraries that tomcat uses changed directories between 5.x and 6.x. Instead of being spread out among different directories, they’re all in one location by default. I discovered this when I was able to start a Tomcat 5.5 instance, then started poking around to find out what was different between the two installs.
Once I found that, I tracked down where Tomcat looks for the libraries ($CATALINA_BASE/conf/catalina.properties), used the version of the file that came with Tomcat 6 and it fired right up. Yay.
Thanks for posting this issue and solution. I ran into the same error and was stymied for a while before I found your fix. Thanks google! and thanks to you (anonymous blogger)!