Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NetBeans 8.0.2 fails to start Tomcat because of missing catalina.bat

I just finished setting up the prelimanary steps for a Java Web project on NetBeans. I installed NetBeans and created a network drive using Samba on my home Ubuntu Server, which has Tomcat7. When I try to run the example Hello World project, i get the following error:

Starting of Tomcat failed, the Z:\usr\share\tomcat7\bin\catalina.bat startup script is missing. C:\Users\\Documents\NetBeansProjects\WebApplication1\nbproject\build-impl.xml:1150: Starting of Tomcat failed, the Z:\usr\share\tomcat7\bin\catalina.bat startup script is missing. BUILD FAILED (total time: 3 seconds)

I checked the directory its is referencing and there is a catalina.sh file but no .bat file. Anyone know hints to get this file or how to get NetBeans to run the .sh file instead?

like image 699
Wade Guest Avatar asked May 10 '15 02:05

Wade Guest


People also ask

Why isn't my Tomcat server is not starting?

Finding cause. Most common issue with Tomcat note starting is that Java is not configured properly, user trying to start Tomcat does not have permissions to do so, or another program is using port 8080 on that server.


2 Answers

  1. Download the appropiate zip file from https://tomcat.apache.org/. I use Tomcat 8.0.33 and I download zip file from the zip link in the Binary Distributions subsection of the 8.0.3 section download zip file.

  2. Open the zip file (you don't need uncompress it), go to bin folder, copy the catalina.bat file.

  3. Go to Apache Tomcat bin folder in you machine and paste the catalina.bat file.

  4. Go to you NetBeans, click on Services tag (window -> services), left click in ApacheTomcat, click Start option

  5. If must copy other files like setclasspath.bat, go to step 2.

like image 92
alejandro Avatar answered Oct 10 '22 10:10

alejandro


If you are using Windows, Netbeans need the .bat file, not the .sh file.

catalina.bat file is distributed with the Tomcat binary distribution.

It's not in your path means either you have mingled with the files or you have downloaded wrong distribution (eg: source distribution).

So download a fresh copy of tomcat from here, set the path correctly and try again.

like image 2
Amila Avatar answered Oct 10 '22 10:10

Amila