Download
FAQ History |
![]() ![]() ![]() |
API
Search Feedback |
Common Problems and Their Solutions
Use the following guidelines for troubleshooting any problems you have creating, compiling, installing, deploying, and running the example application.
Errors Starting 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
andshutdown.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.
"Unable to Locate the Server localhost:8080" Error
Symptom: an "unable to locate server" error when trying to load a Web application in a browser.
Solution: Tomcat can take quite some time before fully loading, so first of all, make sure you've allowed at least 5 minutes for Tomcat to load before continuing troubleshooting. To verify that Tomcat is running, point your browser to
http://localhost:8080
. When the Java WSDP index page displays, you may continue. If the index screen does not load immediately, wait up to several minutes and then retry. If Tomcat still has not loaded, check the log files, as explained below, for further troubleshooting information.When Tomcat starts up, it initializes itself and then loads all the Web applications in
<JWSDP_HOME>
/webapps
. When you run Tomcat, the server messages are logged to<JWSDP_HOME>
/logs/launcher.server.log
. The progress of loading Web applications can be viewed in the file<JWSDP_HOME>
/logs/jwsdp_log.<
date
>.txt
.Compilation Errors
Ant Cannot Locate the Build File
Symptom: When you type
ant
build
, these messages appear:Solution: Start
Ant
from the<INSTALL>
/jwstutorial13/examples/gs/
directory, or from the directory where you created the application. If you want to runAnt
from your current directory, then you must specify the build file on the command line. When you specify the build file in this way, you must specify the fully-qualified path to the file, not just a relative path. For example, you would type this command on a single line:The Compiler Cannot Resolve Symbols
Symptom: When you type
ant
build
, the compiler reports many errors, including these:Solution: Make sure you are using the version of
Ant
that ships with this version of the Java WSDP. To verify which version you are using, enterant -version
at the terminal window or command prompt. Java WSDP 1.3 usesAnt
version 1.5.4. If this is not the version that displays at the version request, the best way to ensure that you are using this version is to use the full path to theAnt
files to build the application,<JWSDP_HOME>
/apache-ant/bin/ant
build
. Other versions may not include all of the functionality expected by the example application build files."Connection refused" Error
Symptom: When you type
ant
install
at the terminal window or command prompt, you get the following message:file:
<INSTALL>
/jwstutorial13/examples/common/targets.xml:28: java.net.ConnectException: Connection refused: connectSolution: Tomcat has not fully started. Wait a few minutes, and then attempt to install the application again. For more information on troubleshooting Tomcat startup, see "Unable to Locate the Server localhost:8080" Error.
When attempting to run the install task, the system appears to hang.
Symptom: When you type
ant
install
, the system appears to hang.Solution: Start Tomcat. For information on doing this, see Starting Tomcat.
Solution: The Tomcat startup script starts Tomcat 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
install
task does not run immediately, wait up to several minutes and then retry theinstall
task. To verify that Tomcat is running, point your browser tohttp://localhost:8080
. When the Java WSDP index page displays, you may continue. If the Java WSDP index page does not load immediately, wait up to several minutes and then retry. If Tomcat still has not loaded, check the log files, as explained below, for further troubleshooting information.When Tomcat starts up, it initializes itself and then loads all the Web applications in
<JWSDP_HOME>
/webapps
. When you run Tomcat, the server messages are logged to<JWSDP_HOME>
/logs/launcher.server.log
. The progress of loading Web applications can be viewed in the file<JWSDP_HOME>
/logs/jwsdp_log.<
date
>.txt
.Installation and Deployment Errors
Server Returned HTTP Response Code: 401 for URL
Symptom: When you type
ant
install
, these message appear:BUILD FAILED <INSTALL
>/jwstutorial13/examples/common/targets.xml:42: 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
<INSTALL>
/jwstutorial13/examples/common/build.properties
file match a user name and password with the role ofmanager
in thetomcat-users.xml
file. For more information on setting up this information, see Modifying the Build Properties File.Failure to Run Client Application
Symptom: The browser reports that the page cannot be found or displayed (HTTP Status 404).
Solution: If you have restarted Tomcat since the last time you installed the application, you need to install the application again now that Tomcat is restarted. For information on installing the application, see Installing the Web Application.
Solution: Start Tomcat. If you need more information on starting Tomcat, see Starting Tomcat.
Solution: If you've already started Tomcat, note that 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. For more information on troubleshooting the startup of Tomcat, see "Unable to Locate the Server localhost:8080" Error.
Solution: Make sure that you have the slashes in the right direction for the
tutorial.home
property in the<INSTALL>
/jwstutorial13/examples/common/build.properties
file. The slashes should go to the right,/
, otherwise, the build file does not recognize this parameter and copies files to the wrong location for deployment.The localhost Machine Is Not Found
Symptom: The browser reports that the page cannot be found (HTTP 404).
Solution: This may happen 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 accesslocalhost
.To do this in the Netscape Navigator browser, select Edit
Preferences
Advanced
Proxies and select
No
Proxy
for:
localhost
. In Internet Explorer, select ToolsInternet Options
Connections
LAN Settings, then check the Bypass Proxy Server For Local Addresses checkbox.
The Application Has Not Been Deployed
Symptom: The browser reports that the page cannot be found (HTTP 404) or the requested resource is not available.
Solution: Install the application. For more detail, see Deploying Web Applications for general information on installing Web applications or Installing the Web Application for information on starting the Getting Started example. If the application says that it was installed but you are still getting this message, it is likely that the build file is not copying the files to the correct location as expected by Tomcat. Check that the files are being copied to the proper directories by verifying that the build properties are correct as discussed in Modifying the Build Properties File or Failure to Run Client Application.
"Build Failed: Application Already Exists at Path" Error
Symptom: When you enter
ant
install
at a terminal window or command prompt, you get this message:[install] FAIL - Application already exists at path /gs BUILD FAILED<INSTALL>
/jwstutorial13/examples/common/targets.xml:28: FAIL - Application already exists at path /gsThis application has already been installed. If you've made changes to the application since it was installed, use
ant
reload
to update the application in Tomcat.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 by running
ant
build
,ant
install
, do so now.Solution: If Tomcat is loading, but has not yet loaded all of the existing contexts, you will 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.
Solution: If the application says that it was installed but you are still getting this message, it is likely that the build file is not copying the files to the correct location as expected by Tomcat. Check that the files are being copied to the directories as discussed in Modifying the Build Properties File or Failure to Run Client Application.
No Error Messages, Page Loads as Blank Page
Symptom: After you install the application, you enter the correct URL in your Internet Explorer Web browser. Although no error messages display, the application does not load in the browser.
Solution: On some Web browsers, you have to set the encoding to
UTF-8
in order for the application to display. Here's how to do that:Load Cyrillic Language Pack
Symptom: After you install the application, you enter the correct URL in your Internet Explorer Web browser, and are prompted to load the Cyrillic Language Pack.
Solution: On some version of Microsoft Internet Explorer Web browsers, you have to set the encoding to
UTF-8
orWestern European
in order for the application to display properly. To do this, follow this sequence: ViewEncoding
UTF-8. Click the Refresh button and the application should display in the browser window.
Download
FAQ History |
![]() ![]() ![]() |
API
Search Feedback |
All of the material in The Java(TM) Web Services Tutorial is copyright-protected and may not be published in other works without express written permission from Sun Microsystems.