[jboss-user] [EJB 3.0 Users] - Client JNDI lookup (vs. JBoss), ClassNotFoundException

kesson do-not-reply at jboss.com
Thu Nov 26 06:29:06 EST 2009


Hello all,
I just hope it is a right thread for my question. I'm running on Windows  XP with JBoss 4.2.2.GA installed on it (but actually the same problem is also on Linux installation of JBoss). I've got a small client trying to do get an InitialContext() and talk to the local JBoss server running on same machine. 
I've got such an exception as a result:

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/la
ng/exception/NestableException
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12
4)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
        at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:169)
        at $Proxy0.(Unknown Source)
        at sun.reflect.GeneratedSerializationConstructorAccessor16.newInstance(U
nknown Source)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
        at java.io.ObjectStreamClass.newInstance(ObjectStreamClass.java:924)
        at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1
737)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
        at java.rmi.MarshalledObject.get(MarshalledObject.java:142)
        at org.jnp.interfaces.MarshalledValuePair.get(MarshalledValuePair.java:7
2)
        at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:710)
        at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627)
        at javax.naming.InitialContext.lookup(InitialContext.java:392)
        at JbossMainApp.appclient.Main.getResourceManager(Main.java:134)
        at JbossMainApp.appclient.Main.main(Main.java:56)


I am running the app from batch file, and the command line is like this:

  | set clib_dir=D:\dev_folder\client_lib
  | set jboss_client_path=D:\dev_folder\jboss-4.2.2.GA\client
  | java -classpath %clib_dir%\velo.jar;%jboss_client_path%\jbossall-client.jar;%jboss_client_path%\log4j.jar;%jboss_client_path%\jsf-api.jar;%jboss_client_path%\ejb3-persistence.jar;%clib_dir%\password1_4.jar;%clib_dir%\commons-cli-1.0.jar;%clib_dir%\groovy-all-1.1-BETA-1.jar;%clib_dir%\commons-configuration-1.3.jar;%jboss_client_path%\jnp-client.jar  app.main app_parameter

The remarkable fact is that I have the same application call in another evironment (production env., installed on Linux server), with the same command line and pretty same configuration of JBoss - there I have it working well. 

I'll appreciate every help/hint.

TIA.

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4267650#4267650

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4267650



More information about the jboss-user mailing list