users@glassfish.java.net

Re: Error running App Client (-com.sun.enterprise.appclient.MainWithModuleSupp)

From: <glassfish_at_javadesktop.org>
Date: Wed, 24 Feb 2010 04:45:54 PST

Hi Tim,

Thanks for offering your expertise around. It is much appreciated.

I would like to clarify that past successful running of EAR projects have been in both Netbeans & Ant on command line.

Tim wrote:
>1. Deploy the EAR (which you undoubtedly have already done!).
>2. asadmin get-client-stubs --appname app-name localdir
>3. appclient -client localdir\FundsBeanClient.jar
This suggestion worked for simple EAR but got the following error with a much more complex which included many jars (e.g. jdom.jar- not sure whether this issue is related to it) in its CLASSPATH:

C:\Documents and Settings\Jack\FundsBean>asadmin get-client-stubs --appname FundsBean C:\temp\FundsBean-appclient
Command get-client-stubs executed successfully.

C:\Documents and Settings\Jack\FundsBean>appclient -client C:\temp\FundsBean-appclient\FundsBeanClient.jar
24/02/2010 10:17:26 PM com.sun.enterprise.appclient.MainWithModuleSupport <init>

[b]WARNING: ACC003: Application threw an exception.
java.lang.IllegalArgumentException: Could not locate an embedded app client matching the display name null
        at com.sun.enterprise.appclient.NestedAppClientInfo.getAppClient(NestedAppClientInfo.java:153)
        at com.sun.enterprise.appclient.AppClientInfo.getAppClient(AppClientInfo.java:205)
        at com.sun.enterprise.appclient.AppClientInfo.validateMainClass(AppClientInfo.java:274)
        at com.sun.enterprise.appclient.AppClientInfo.completeInit(AppClientInfo.java:174)
        at com.sun.enterprise.appclient.AppClientInfoFactory.buildAppClientInfo(AppClientInfoFactory.java:154)
        at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:366)
        at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:259)
        at com.sun.enterprise.appclient.Main.main(Main.java:200)
Exception in thread "main" java.lang.RuntimeException: java.lang.IllegalArgument
Exception: Could not locate an embedded app client matching the display name null
        at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:487)
        at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:259)
        at com.sun.enterprise.appclient.Main.main(Main.java:200)
Caused by: java.lang.IllegalArgumentException: Could not locate an embedded appclient matching the display name null
        at com.sun.enterprise.appclient.NestedAppClientInfo.getAppClient(NestedAppClientInfo.java:153)
        at com.sun.enterprise.appclient.AppClientInfo.getAppClient(AppClientInfo.java:205)
        at com.sun.enterprise.appclient.AppClientInfo.validateMainClass(AppClientInfo.java:274)
        at com.sun.enterprise.appclient.AppClientInfo.completeInit(AppClientInfo.java:174)
        at com.sun.enterprise.appclient.AppClientInfoFactory.buildAppClientInfo(AppClientInfoFactory.java:154)
        at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:366)
        ... 2 more[/b]
It appears that appclient expects main() to belonged to Main.java in C:\Documents and Settings\Jack\FundsBean\FundsBean-app-client which I don't have. Instead, I have been using a single application client (client.ApplicationClient.java) without a problem in Netbeans or Ant. Likewise, those simpler EARs also do not have Main.java in their respective applcation client folders either.

Any idea on why it worked on some & not others?

Thanks,

Jack
[Message sent by forum member 'htran_888' (htran_888_at_yahoo.com.au)]

http://forums.java.net/jive/thread.jspa?messageID=388421