|
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.batandshutdown.batfiles. 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 Tomcat index screen 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 by callingstartup.sh, 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
antbuild, these messages appear:Solution: Start
Antfrom the<INSTALL>/jwstutorial12/examples/gs/directory, or from the directory where you created the application. If you want to runAntfrom your current directory, then you must specify the build file on the command line. For example, you would type this command on a single line:BUILD FAILED for Unknown Reason
Symptom: When you type
antbuild, the compiler returns this message:
file: <INSTALL>/jwstutorial12/examples/web/common/targets.xml:3: Directory /jwstutorial12/examples/gs/build creation was not successful for an unknown reasonSolution: Make sure that you have entered the directory into which the tutorial was installed, your user name, and your password into the
<INSTALL>/examples/common/build.propertiesfile, as discussed in Modifying the Build Properties File.The Compiler Cannot Resolve Symbols
Symptom: When you type
antbuild, the compiler reports many errors, including these:Solution: Make sure you are using the version of
Antthat ships with this version of the Java WSDP. The best way to ensure that you are using this version is to use the full PATH to theAntfiles to build the application,<JWSDP_HOME>/apache-ant/bin/antbuild. Other versions may not include all of the functionality expected by the example application build files."Connection refused" Error
Symptom: When you type
antinstallat the terminal prompt, you get the following message:Solution: 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
antinstall, the system appears to hang.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
installtask does not run immediately, wait up to several minutes and then retry theinstalltask. To verify that Tomcat is running, point your browser tohttp://localhost:8080. When the Tomcat index screen displays, you may continue. If the splash 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 by callingstartup.sh, 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.Deployment Errors
Server returned HTTP response code: 401 for URL
Symptom: When you type
antinstall, 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
<INSTALL>/jwstutorial12/examples/common/build.propertiesfile match a user name and password with the role ofmanagerin thetomcat-users.xmlfile. 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 (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. For more information on troubleshooting the startup of Tomcat, see "Unable to Locate the Server localhost:8080" Error.
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
localhostmachine. 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
NoProxyfor: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: Install the application. For more detail, see Deploying the Application. 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 Organizing Web Applications.
"Build Failed: Application Already Exists at Path" Error
Symptom: When you enter
antinstallat a terminal prompt, you get this message:[install] FAIL - Application already exists at path /gs BUILD FAILED<INSTALL>/jwstutorial12/examples/gs/build.xml:82: 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
antreloadto 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 remove,antbuild,antinstall,antreload, 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 Organizing Web Applications.
|
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.