The JavaTM Web Services Tutorial
Home
TOC
PREV TOP NEXT

Common Problems and Their Solutions

Cannot Start Tomcat

"Out of Environment Space" Error

Symptom: An "out of environment space" error when running the startup and shutdown batch files in Microsoft Windows 9X/ME-based operating systems.

Solution: In the Microsoft Windows Explorer, right-click on the startup.bat and shutdown.bat files. Select Properties, then select the Memory tab. Increase the Initial Environment field to something like 4096. Select Apply.

After you select Apply, shortcuts will be created in the directory you use to start and stop the container.

Compilation Errors

Server returned HTTP response code: 401 for URL ...

Symptom: When you type ant install, these message appear:

BUILD FAILED	
/home/you/gs/build.xml:44:	
java.io.IOException: Server returned HTTP response code: 401	
for URL: http://localhost:8080/manager/install?path= ...
 

Solution: Make sure that the user name and password in your build.properties file match a user name and password with the role of manager in the tomcat-users.xml file. For more information on setting up this information, see Creating the Build Properties File.

Ant Cannot Locate the Build File

Symptom: When you type ant build, these messages appear:

Buildfile: build.xml does not exist!	
Build failed.
 

Solution: Start Ant from the <JWSDP_HOME>/docs/tutorial/examples/gs/ directory, or from the directory where you created the application. If you want to run Ant from your current directory, then you must specify the build file on the command line. For example, on Microsoft Windows operating systems, you would type this command on a single line:

ant -buildfile 
C:\wspack1.0\docs\tutorial\examples\gs\build.xml	
build
 
The Compiler Cannot Resolve Symbols

Symptom: When you type ant build, the compiler reports many errors, including these:

cannot resolve symbol	
. . .	
BUILD FAILED	
. . .	
Compile failed, messages should have been provided
 

Solution: Make sure the JWSDP_HOME environment variable is set correctly. See Checking the Environment Variables.

Deployment Errors

Failure to run client application

Symptom: The browser reports that the page cannot be found (HTTP 404).

Solution: The startup script starts the task in the background and then returns the user to the command line prompt immediately. Even though you are returned to the command line, the startup script may not have completely started Tomcat. If the Web Client does not run immediately, wait up to a minute and then retry to load the Web client.

The localhost Machine Is Not Found

Symptom: The browser reports that the page cannot be found (HTTP 404).

Solution: Sometimes when you are behind a proxy and the firewall will not let you access the localhost machine. To fix this, change the proxy setting so that it does not use the proxy to access localhost.

To do this in the Netscape Navigator browser, select Edit -> Preferences -> Advanced -> Proxies and select No Proxy for: localhost. In Internet Explorer, select Tools -> Internet Options -> Connections -> LAN Settings.

The Application Has Not Been Deployed

Symptom: The browser reports that the page cannot be found (HTTP 404).

Solution: Deploy the application. For more detail, see Deploying the Application.

HTTP 500: No Context Error

Symptom: Get a No Context Error when attempting to run a deployed application.

Solution: This error means that Tomcat is loaded, but it doesn't know about your application. If you have not deployed the application, that would be the first step. If you have successfully deployed the application by running ant remove, ant build, ant install, ant reload, and you're still getting the error, read on.

If Tomcat is loaded, but has not yet loaded all of the existing contexts, you will also get this error. Continue to select the Reload or Refresh button on your browser until either the application loads or you get a different error message.

Home
TOC
PREV TOP NEXT