• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Unable to start catalina.sh for tomcat7 version on windows bash

 
irfan pasha syed
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,

I have recently installed tomcat7 version and tried to start catalina.sh from my bash on my windows machine after setting the JAVA path.

I get the following error when i start in my console

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/catalina/s
tartup/Bootstrap
Caused by: java.lang.ClassNotFoundException: org.apache.catalina.startup.Bootstr
ap
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
Could not find the main class: org.apache.catalina.startup.Bootstrap. Program w
ill exit.

Any help is appreciated.

Regards,
irfan
 
Tim Holloway
Saloon Keeper
Posts: 18300
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"bash" under Windows?

Why aren't you simply using the catalina.bat or Windows service manager startup?
 
irfan pasha syed
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tim Holloway wrote:"bash" under Windows?

Why aren't you simply using the catalina.bat or Windows service manager startup?


Hi Tim,
I do have a script that does lot of modifications in the catalina.sh while will run on around 10 different platforms(UNIX,solaris.linux etc) so i use catalina.sh instead of catalina.bat.
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You use catalina.sh on Windows? If you want to run it on Windows you'll have to use the .bat file. If you need to do modifications then you have to do it in there instead of the .sh files which aren't meant for Windows.

 
Tim Holloway
Saloon Keeper
Posts: 18300
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Better yet, don't modify the catalina.sh/.bat files at all. People often do this to set environmental information when you can do it more safely by adding a setenv.bat or setenv.sh file to the Tomcat bin directory. If you set the environment up there, you don't risk potential damage to the catalina.sh logic and it's easier to carry the customizations forward when you upgrade.
 
irfan pasha syed
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tim Holloway wrote:Better yet, don't modify the catalina.sh/.bat files at all. People often do this to set environmental information when you can do it more safely by adding a setenv.bat or setenv.sh file to the Tomcat bin directory. If you set the environment up there, you don't risk potential damage to the catalina.sh logic and it's easier to carry the customizations forward when you upgrade.



Well i do a little modification, just setting JAVA_HOME and CATALINA_HOME and other environment variables. So the major requirement for me is when i can use catalina.sh on bash for tomcat 1.6 version why cant i use it for tomcat7 version.

 
Johnpaul jones
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I found solution for your problem....
 
irfan pasha syed
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Johnpaul jones wrote:I found solution for your problem....


Thanks a lot for finding solution for this issue. Can you please share your solution.


Regards,
Irfan
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic