users@glassfish.java.net

java.lang.reflect.InvocationTargetException -run EAR app client in Webstart

From: <glassfish_at_javadesktop.org>
Date: Mon, 01 Mar 2010 23:05:47 PST

Hi All,

I got the following error when trying to launch Application Client (CustomerBean-app-client.jar, argument - client.CustomerBean-app-client) from Admin Console/Webstart:

[b]java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
        at java.lang.reflect.Constructor.newInstance(Unknown Source)
        at com.sun.enterprise.appclient.jws.boot.JWSACCMain.run(JWSACCMain.java:221)
        at com.sun.enterprise.appclient.jws.boot.JWSACCMain.main(JWSACCMain.java:182)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at com.sun.javaws.Launcher.executeApplication(Unknown Source)
        at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
        at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
        at com.sun.javaws.Launcher.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.RuntimeException: java.lang.NoClassDefFoundError: org/jdom/JDOMException
        at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:487)
        ... 15 more
Caused by: java.lang.NoClassDefFoundError: org/jdom/JDOMException
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Unknown Source)
        at com.sun.enterprise.appclient.AppClientInfo.validateMainClass(AppClientInfo.java:278)
        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)
        ... 15 more
Caused by: java.lang.ClassNotFoundException: org.jdom.JDOMException
        at com.sun.enterprise.loader.EJBClassLoader.findClassData(EJBClassLoader.java:738)
        at com.sun.enterprise.loader.EJBClassLoader.findClass(EJBClassLoader.java:628)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClassInternal(Unknown Source)
        ... 21 more[/b]
This message is the same as the one encountered when running the same client was run from a command prompt without getting the client-stub (http://forums.java.net/jive/thread.jspa?threadID=75303&tstart=75). However, the same issue persisted despite having downloaded Client Stubs before launching the application client from Admin Console.

It is likely that this issue is due to the wrong sequence of steps used to deployed this Java EE 5 ear (CustomerBean) project in Admin Console since since it runs fine in Netbeans, Ant, asadmin (with get client stub...).

Thanks,

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

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