0 Replies Latest reply on Mar 22, 2004 10:18 PM by chintan230

    EJB clustering

    chintan230 Newbie

      Hello All,

      I am working on EJB clustering. My EJB is configured fine, but client side it's generating following error.

      error is javax.naming.CommunicationException: Failed to retrieve stub from server 199.77.206.6:1100 [Root exception is java.io.StreamCorruptedExcepti
      on: unexpected block data]



      My client side code is:

      Properties properties = new Properties();
      properties.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");

      properties.put(Context.URL_PKG_PREFIXES, "jboss.naming:org.jnp.interfaces");
      properties.put(Context.PROVIDER_URL, "jnp://localhost:1100");


      InitialContext jndiContext;
      Object ref; // Get a reference to a PropsHome Bean
      jndiContext = new InitialContext( properties );

      PropsHome home = null;

      try {

      ref = jndiContext.lookup("Props");
      home = (PropsHome) PortableRemoteObject.narrow (ref, PropsHome.class);
      }
      catch( Exception errE )
      {
      System.out.println(" error is " + errE );
      }

      .....




      It's look like error is in searlization, I don't have any idea because EJB is supposed to do that thing by itself.


      I greatly appreciate your help.

      Best Regards,
      Chintan