0 Replies Latest reply on Oct 2, 2005 7:45 PM by Varun Lath

    Does it necessary to Import remote interface at client side

    Varun Lath Newbie

      I am using jboss-4.0.3RC1

      My remote interface looks like this

      public interface PatientService extends IPersonService {


      My client program looks like
      import IPersonService;
      InitialContext ctx = new javax.naming.InitialContext(properties);
      IPersonService service = (IPersonService) ctx.lookup(

      This code works fine if I import Remote Interface 'PatientService' at the client program but i don't want to import remote interface because Remote interface is extending IPersonService which is available at the client side . I am getting an exception

      javax.naming.CommunicationException [Root exception is java.lang.ClassNotFoundException: PatientService (no security manager: RMI class loader disabled)]
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:713)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:572)
      at javax.naming.InitialContext.lookup(Unknown Source)
      at TestEjb3.getServiceUsingEJB(TestEjb3.java:76)
      at TestEjb3.(TestEjb3.java:33)
      at TestEjb3.main(TestEjb3.java:26)
      Caused by: java.lang.ClassNotFoundException: PatientService (no security manager: RMI class loader disabled)
      at sun.rmi.server.LoaderHandler.loadProxyClass(Unknown Source)
      at java.rmi.server.RMIClassLoader$2.loadProxyClass(Unknown Source)
      at java.rmi.server.RMIClassLoader.loadProxyClass(Unknown Source)
      at sun.rmi.server.MarshalInputStream.resolveProxyClass(Unknown Source)
      at java.io.ObjectInputStream.readProxyDesc(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.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)
      ... 5 more

      This program works fine with Oracle application server without including the Remote interface at the client side.

      Does it mandatory in Jboss Server to import Remote Interface even if Remote Interface is extending a class which is already imported at the client side .

      Any suggestions , any help ??

      Many Thanks