Sun GlassFish Enterprise Server 

Troubleshooting Sample Applications

There are three components which contribute to the smooth working of sample applications. These components are the build infrastructure, application server, and the sample application. Follow the common build instructions to set up the the build infrastructure and application server. To troubleshoot a sample application, follow this procedure:
  1. Use the fine-grained Ant targets to isolate the problem. For example, if Ant all causes an exception then try to run the constituent Ant targets like compile, package, deploy, and run separately.
  2. Refer to the exception in detail and try to fix it.
  3. Refer to application server's server.log file for clues or messages.
  4. Try alternative ways of doing the same thing. For example, if deployment fails then try deploying through the Admin Console or CLI.
  5. Before retrying, run the clean target to undeploy and to remove the generated directories.
  6. Restart the application server which might be needed to apply certain non dynamic configuration changes.
  7. Make sure the user ID and password or the credentials are valid.
  8. If the application uses JDBC resources, make sure that the database server is up and running and the resources are setup properly. Likewise, if the application usees JMS resources, make sure the MQ server is running and the JMS resources are configured properly.
  9. The recommended version of Ant is 1.7.1. It is possible to use Ant 1.6.5 since certain samples support this version. The samples which do not support Ant 1.6.5 may cause exceptions similar to the following.
    ild.xml:9: The following error occurred while executing this line:
    C:\sonia2\glassfishv3\glassfish\samples\bp-project\main.xml:22: The
    following e
    ror occurred while executing this line:
    : The following error occurred while executing this line:
     type doesn't support the "quiet" attribute. 
    To resolve this, one need to use Ant version 1.7.1 which can be downloaded using the Update Tool that is included with Sun GlassFish Enterprise Server. For instructions for using Update Tool, see Extending Enterprise Server in Sun GlassFish Enterprise Server v3 Administration Guide.

The above list is evolving and is by no means exhaustive.

Copyright © 2009 Sun Microsystems, Inc. All rights reserved.