3 Replies Latest reply on Nov 30, 2005 8:31 AM by paul.hettl

    What JAR files does a Remote Client need to access an EJB 3.

    kimbaltrue

      I'm getting the following error when I try to lookup a EJB interface. The Bean is an EJB 3.0 Bean, but at this point I suspect that as not being an issue. I successfully access the context through JNDI by includin the jbossall-client JAR, but apparently this jar doesn't have ALL the classes I need. Why are aspects coming up at this point?

      Here is the code. It's wrapped in a try/catch but otherwise it's fairly simple. The failure occurs at the lookup call.

      InitialContext ic = new InitialContext();
       assert ic != null;
       System.out.println("Obtained Context");
       Accountant acc = (Accountant)ic.lookup(AccountantRemote.class.getName());
       assert acc != null;
       System.out.println("Found Accountant");


      Here's the exception I get. I've tried including just about every jboss/client jar there is.
      Exception in thread "main" java.lang.NoClassDefFoundError: org/jboss/aspects/asynch/AsynchProvider
       at java.lang.Class.getDeclaredFields0(Native Method)
       at java.lang.Class.privateGetDeclaredFields(Unknown Source)
       at java.lang.Class.getDeclaredField(Unknown Source)
       at java.io.ObjectStreamClass.getDeclaredSUID(Unknown Source)
       at java.io.ObjectStreamClass.access$600(Unknown Source)
       at java.io.ObjectStreamClass$2.run(Unknown Source)
       at java.security.AccessController.doPrivileged(Native Method)
       at java.io.ObjectStreamClass.<init>(Unknown Source)
       at java.io.ObjectStreamClass.lookup(Unknown Source)
       at java.io.ObjectStreamClass.initNonProxy(Unknown Source)
       at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)
       at java.io.ObjectInputStream.readClassDesc(Unknown Source)
       at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
       at java.io.ObjectInputStream.readObject0(Unknown Source)
       at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
       at java.io.ObjectInputStream.readSerialData(Unknown Source)
       at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
       at java.io.ObjectInputStream.readObject0(Unknown Source)
       at java.io.ObjectInputStream.readObject(Unknown Source)
       at java.rmi.MarshalledObject.get(Unknown Source)
       at org.jnp.interfaces.MarshalledValuePair.get(MarshalledValuePair.java:57)
       at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:637)
       at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:572)
       at javax.naming.InitialContext.lookup(Unknown Source)
       at org.ccf.Medici.client.AccountantFactory.main(AccountantFactory.java:101)