getResource or getResourceAsStream, consider using getClass().getResource, which
returns a URL object, then invoke the url.setUseCaches method to turn o caching for that
jar le, and use url.getInputStream() to obtain the stream.
Although turning o caching for access to the jar le can slow performance, this approach does
allow the application to be undeployed or redeployed. Note also that if the
getClass().getResourceAsStream method is used instead, then the jar le in which the
resource is located is cached (this is the default Java runtime setting) and remains open until the
server is stopped.
Issues Related to asadmin
asadmin start-domain Command Fails
The command asadmin start-domain fails with one of the following errors:
■
Error: CLI143 There is more than one domain...
■
Error: Could Not Start Domain
Error: CLI143 There is more than one domain...
Description
When issued with no arguments, the command asadmin start-domain fails with the error:
CLI143 There is more than one domain in C:\\Sun\\AppServer\\domains.
Please use operand to specify the domain.
CLI156 Could not start the domain null.
This error occurs when there is more than one domain in the domains directory, none of them
is named domain1, and no domain is specied with the start-domain command.
Solution
Specify the domain when issuing the start-domain command:
asadmin start-domain domain-name
For example:
asadmin start-domain mycustomdomain
IssuesRelatedtoasadmin
Chapter2 • Specic Issues 31