users@glassfish.java.net

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

From: <glassfish_at_javadesktop.org>
Date: Mon, 22 Feb 2010 22:56:13 PST

Hi All,

I am having difficulty running an Application Client (FundsBean.ear Netbeans 6.7, JDK1.6.0_16 project on XP) on the command line with the following error:

C:\Documents and Settings\Jack\FundsBean\FundsBean-app-client\dist>appclient -client FundsBean-app-client.jar
23/02/2010 4:14:47 PM com.sun.enterprise.deployment.annotation.impl.DefaultError Handler error
SEVERE: Class [ org/jdom/JDOMException ] not found. Error while loading [ classclient.JMSCustomerApplicationClient ]
23/02/2010 4:14:47 PM com.sun.enterprise.deployment.archivist.Archivist readAnnotations
WARNING: Error in annotation processing: java.lang.NoClassDefFoundError: org/jdom/JDOMException
23/02/2010 4:14:47 PM com.sun.enterprise.appclient.MainWithModuleSupport <init>
WARNING: ACC003: Application threw an exception.
java.lang.NoClassDefFoundError: org/jdom/JDOMException
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:247)
        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)
        at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:259)
        at com.sun.enterprise.appclient.Main.main(Main.java:200)
Caused by: java.lang.ClassNotFoundException: org.jdom.JDOMException
        at com.sun.enterprise.loader.EJBClassLoader.findClassData(EJBClassLoader.java:715)
        at com.sun.enterprise.loader.EJBClassLoader.findClass(EJBClassLoader.java:628)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
        ... 8 more

I thought that the C:\Documents and Settings\Jack\FundsBean\dist\FundsBean.ear, C:\Documents and Settings\Jack\FundsBean\FundsBean-app-client\dist>appclient -client FundsBean-app-client.jar would have packed all libraries, jars... so that it will not need to reference them (e.g. jdom.jar).
 
I have no problem running the same project through Ant (ant run/run-ac) on the command line.

Thanks,

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

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