2 Replies Latest reply on Jun 8, 2004 3:35 AM by Lennart Petersson

    Error while invoking the bean from the client

    milgurung Newbie

      Hi All,
      I got the following error when tried to invoke the bean from the client app. Please help me out. Any kind of help is appreciated. Thanks!

      ERROR [main] (Test.java:96) - Naming exception: null
      javax.naming.CommunicationException [Root exception is java.lang.ClassNotFoundEx
      ception: org.jboss.ejb.plugins.local.LocalHomeProxy (no security manager: RMI cl
      ass loader disabled)]
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:652)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:507)
      at javax.naming.InitialContext.lookup(Unknown Source)
      at net.clearbridge.dxs.data.FileDataFacade.init(Test.java:88)
      at net.clearbridge.dxs.data.FileDataFacade.find(Test.java:51)
      at net.clearbridge.dxs.EDIToXML.translateEDIToXML(Go.java:85)
      at net.clearbridge.dxs.EDITest.run(Go.java:35)
      at net.clearbridge.dxs.EDITest.main(Go.java:25)
      Caused by: java.lang.ClassNotFoundException: org.jboss.ejb.plugins.local.LocalHo
      meProxy (no security manager: RMI class loader disabled)
      at sun.rmi.server.LoaderHandler.loadClass(Unknown Source)
      at sun.rmi.server.LoaderHandler.loadClass(Unknown Source)
      at java.rmi.server.RMIClassLoader$2.loadClass(Unknown Source)
      at java.rmi.server.RMIClassLoader.loadClass(Unknown Source)
      at sun.rmi.server.MarshalInputStream.resolveClass(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)

        • 1. Re: Error while invoking the bean from the client
          Pankil Shah Newbie

          hi ,
          the problem is with the security manager is not loaded . add the following code in the beginning of ur client :
          if (System.getSecurityManager() == null)
          System.setSecurityManager(new RMISecurityManager());

          Also create a security policy file with below configurations :

          grant {
          permission java.security.AllPermission;

          Now run ur client with the following syntax:

          java -Djava.security.policy=(security policy file name) client file.

          we have solved the above communication exception and able to get the LocalHome object reference but we are stuck with a null pointer exception when we call the create method on the localhome 's object. if u get the solution than post it as a reply to this suggestion.

          • 2. Re: Error while invoking the bean from the client
            Lennart Petersson Novice

            Sorry but aren't you way out no??? Expecting to have a local home on a clien app? Do read the spec regarding Local and Remote interfaces first and then see what's wrong!

            You have to use remote interfaces when using remote clients, locals are only for the JBoss JVM!