Apache Tomcat fails to start from Netbeans


Log Message:

‘’ is not recognized as an internal or external command,
operable program or batch file.

The solution is taken from Stack Overflow with thanks to Sudeepta

I have faced the exact problem in apache-tomcat-7.0.56 and apache-tomcat-8.0.14 with netbeans7.4 and netbeans8. I installed tomcat from zip file. I fixed it by changing catalina.bat file in tomcat bin directory.

Find the bellow configuration in your catalina.bat file.



Just remove the double quotes



Now save and start your tomcat from NetBeans. It works for me in apache-tomcat-7.0.56 and apache-tomcat-8.0.14.


Apache Tomcat Severe Error

SEVERE: Error configuring application listener of class com.sun.faces.config.ConfigureListener
java.lang.ClassNotFoundException: com.sun.faces.config.ConfigureListener


Some things to note:

  1. Notice the time stamp beside the exception, this may not be an existing problem. If it happened today, it will always be shown on server startup as tomcat only creates a new log when the date changes (ie new log every day).
  2. Also, when running netbeans, although you may have cleared the logs directory in Apache Tomcat, you will also need to clean them in the catalina base directory. Right click on Tomcat in netbeans and you will see where the catalina base is located. This will then allow you to navigate to the logs to delete them.

For me, this problem was solved by adding



to the lib directory under WEB-INF directory of my project.


Create SSL Certificate for HTTPS localhost on Tomcat 7 Chrome and Internet Explorer

Getting SSL working with a self signed certificate for local development was poorly documented everywhere I looked. Step by Step guide

1.Create an alias in your hosts file.

To do this you need to know your ip address. Once you do, open


and add the entry with your ip address. EG:

hosts entry

Now, assuming you are running apache tomcat, you should be able to navigate to


and see the same content as localhost:8084

2. Generate an entry in the keystore file for your alias.

The part in bold must match your hosts file entry, eg, my command was (note, I am using the keystore provided with my JDK) (note, to see which of your installed JDk’s Netbeans is using:

C:\Program Files\NetBeans 7.x\etc\netbeans.conf

keytool -genkey -alias my.gelniris.com -keyalg RSA -keystore “C:\Program Files\Java\jdk1.7.0_71\jre\lib\security\cacerts”

You are asked for you password. The default password is ‘changeit’.

You are now asked to enter your name. enter your name as whatever value your alias is. In my case I entered the name as my.gleniris.com


  1. ‘keystore’ is not recognsed as an internal or external command. – Make sure the following directory (or your equivalent) is in the PATH environment variable. EG “C:\Program Files (x86)\Java\jre6\bin”
  2. access is denied / file not found exception for cacerts. – This was on Windows 7 and there were access issues. I needed to run command window as an administrator.

3.Configure Apache Tomcat to Allow Https connections

Navigate to server.xml which is located in your tomcat’s conf directory. Find the section “Define a SSL HTTP/1.1 Connector on port 8443” Add the below part to it. Do not uncomment anything, this should be all you need with the italics requiring you to add in your own values. Note: The part in bold is left out of most tutorials I found which caused me delays, hence this blogpost. Note that the default password for the cacerts file which came with the JDK is ‘changeit’

<Connector port=”8443″ protocol=”org.apache.coyote.http11.Http11Protocol” maxThreads=”150″ scheme=”https” secure=”true” SSLEnabled=”true” keystoreFile=”C:/Program Files/Java/jdk1.7.0_71/jre/lib/security/cacerts” keystorePass=”changeit” clientAuth=”false” keyAlias=”my.gleniris.com” sslProtocol=”TLS”/>

Restart Apache Tomcat. Note, if you are using Netbeans (like I am) you will also have to edit the server.xml in the Catalina base. You can find where catalina base is by clicking on the Tomcat server in Netbeans.

4.Copy the certificate which you have generated

Using Chrome, attempt to navigate to the secure section of your site. For me, it was (Note the HTTPS protocol):


Click on the broken red padlock in the address bar and Click the Certificate Information > Details tab > Copy To file > Export. Save it as the defaut .cer file type. Save it with the same name as you alias. For me this file is named:


5.Create an entry in the trusted certificate publishers directory of your machine

Open a command window and type


Expand the ‘Trusted Publishers’ directory. Using the menu bar, select action >All Tasks >Import, and import the file you created in step 4. Repeat this process in the ‘Trusted Root Certification Authorities’ directory. Restart your machine.

Note, syntax for keytool -delete

 -alias keyAlias
 -keystore keystore-name
 -storepass password

What an enormous pain in the b****x this proved to be.

The Why: http://www.larryullman.com/2012/11/14/getting-an-ssl-certificatesetting-up-https/

Windows 7 Security Restrictions on Apache Tomcat Log Files.

The problem: I installed Apache Tomcat 7 on my Windows 7 machine. When I start up Tomcat, its console reports a FileNotFoundException suggesting that it cannot access the log file. Tomcat starts up fine after this exception is spat out, but it looks ugly.

The Solution: I am sure there is a better system wide fix but the quick fix was to right click on the Apache Tomcat folder, select properties, select security and edit the usergroups to have full access.


With thanks to Stack Overflow

Setting Java Opts In Apache Tomcat

Setting Java Opts in the bin/catalina.(bat/sh) file can be used by your webserver to find files such as your applications property files.


Below is an example of increasing the memory size to hopefully avoid java out of memory errors. Also below, the location of property files is specified.

For windows the catalina.bat file should have the following line straight after the top comment section
set JAVA_OPTS=%JAVA_OPTS% -Xms512m -Xmx512m -XX:MaxPermSize=256m -Dcom.yourdomain.yourappname_1.properties=C:\workspaces\ws_4\application-one-name\properties\dev\prop.properties -Dcom.yourdomain.yourappname_2.properties=C:\workspaces\ws_4\application-two-name\properties\dev\prop.properties
For linux the catalina.bat file should have the following line straight after the top comment section
JAVA_OPTS=”$JAVA_OPTS -Xms512m -Xmx512m -XX:MaxPermSize=256mDcom.yourdomain.yourappname_1.properties=C:\workspaces\ws_4\application-one-name\properties\dev\prop.properties -Dcom.yourdomain.yourappname_2.properties=C:\workspaces\ws_4\application-two-name\properties\dev\prop.propertiess”

Note the quotes in the linux version as well as the absence of the word set.


Lee Dixon, smug in the knowledge that his applications could find their properties files.