A problem occurs when all of the following are true:
The application is an EAR that contains an app client.
The EAR is directory deployed.
The EAR contains an application client module myAppClient.jar, which, because this is a directory deployment, is pre-expanded into myAppClient_jar. (For the purposes of this example, myApp is the name of the EAR. This name can be anything.)
Attempts to launch the application client fail with the following error because one file generated on the server is placed in the wrong server directory and overwrites another generated file:
java.lang.ClassNotFoundException:(main-class-for-the-client) |
For more information, see Issue report.
Change the name of the application client so it is not myAppClient.jar. Specifically:
Edit myApp/META-INF/application.xml so that the declaration of the client is <java>myClient.jar</java>. Note that you can use any name other than myAppClient.jar.
Rename the directory myApp/myAppClient_jar to myApp/myClient_jar. Note that the client's subdirectory name must be the same as the application client URI in the application.xml file, with the .jar replaced with _jar.
Deploy the application:
asadmin deploy --retrieve localdir myApp |
Run the application client:
appclient -client localdir/myAppClient.jar |