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:
- 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.
- Refer to the exception in detail and try to fix it.
- Refer to application server's
server.log
file for
clues
or messages.
- Try alternative ways of doing the same thing. For example, if
deployment fails then try deploying through the Admin Console or CLI.
- Before retrying, run the clean target to undeploy and to remove
the generated directories.
- Restart the application server which might be needed to apply
certain non dynamic configuration changes.
- Make sure the user ID and password or the credentials are valid.
- 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.
-
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.
C:\sonia2\glassfishv3\glassfish\samples\javaee6\security\http-method-omission\b
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:
C:\sonia2\glassfishv3\glassfish\samples\bp-project\command-line-ant-tasks.xml:1
: The following error occurred while executing this line:
C:\sonia2\glassfishv3\glassfish\samples\bp-project\common-properties.xml:35:
Th
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 © 1997-2010 Oracle and/or its affiliates. All rights reserved.