You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by Gurminderpal <gu...@bayatree.com> on 2012/01/18 08:29:11 UTC

Exception on http://openejb.apache.org/hello-world.html

Hello there,
                     I have gone through your article on OpenEJB 
standalone server. Until "Run the Client" Step everything worked well.
                   When i run the exception i get following exception.

     E:\projects>java -cp 
e:\openejb-3.1.4\lib\openejb-client-3.1.4.jar:e:\openejb-3.
1.4\lib\javaee-api-5.0-3.jar: .org.acme.HelloClient

Exception in thread "main" java.lang.NoClassDefFoundError: 
/org/acme/HelloClient

Caused by: java.lang.ClassNotFoundException: .org.acme.HelloClient
         at java.net.URLClassLoader$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: .org.acme.HelloClient.  Program will exit.


I have HelloClient.class in org.acme package. Please find log file 
attached..

Regards,
Gurminderpal

Re: Exception on http://openejb.apache.org/hello-world.html

Posted by Romain Manni-Bucau <rm...@gmail.com>.
hi,

is it a type the space between the . and the class name?

shouldnt it be:

java -cp e:\openejb-3.1.4\lib\openejb-**client-3.1.4.jar:e:\openejb-3.
1.4\lib\javaee-api-5.0-3.jar:. org.acme.HelloClient

- Romain


2012/1/18 Gurminderpal <gu...@bayatree.com>

> Hello there,
>                    I have gone through your article on OpenEJB standalone
> server. Until "Run the Client" Step everything worked well.
>                  When i run the exception i get following exception.
>
>    E:\projects>java -cp e:\openejb-3.1.4\lib\openejb-**
> client-3.1.4.jar:e:\openejb-3.
> 1.4\lib\javaee-api-5.0-3.jar: .org.acme.HelloClient
>
> Exception in thread "main" java.lang.**NoClassDefFoundError:
> /org/acme/HelloClient
>
> Caused by: java.lang.**ClassNotFoundException: .org.acme.HelloClient
>        at java.net.URLClassLoader$1.run(**Unknown Source)
>        at java.security.**AccessController.doPrivileged(**Native Method)
>        at java.net.URLClassLoader.**findClass(Unknown Source)
>        at java.lang.ClassLoader.**loadClass(Unknown Source)
>        at sun.misc.Launcher$**AppClassLoader.loadClass(**Unknown Source)
>        at java.lang.ClassLoader.**loadClass(Unknown Source)
> Could not find the main class: .org.acme.HelloClient.  Program will exit.
>
>
> I have HelloClient.class in org.acme package. Please find log file
> attached..
>
> Regards,
> Gurminderpal
>