0 Replies Latest reply on Mar 7, 2006 4:07 AM by Holger Johanndeiter

    Communication Exception: Failed to retrieve stub from server

    Holger Johanndeiter Newbie

      I'm using JBoss 4.0.3SP1 with Elcipse 3.1 Jboss IDE 1.5.
      I wrote a simple EntityBean which seems to deploy fine (no errors).
      But when i try to access it with my test client app, i get the following error

      javax.naming.CommunicationException: Failed to retrieve stub from server [Root exception is java.io.StreamCorruptedException: unexpected block data]
       at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:248)
       at org.jnp.interfaces.NamingContext.discoverServer(NamingContext.java:1294)
       at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1431)
       at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:579)
       at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:572)
       at javax.naming.InitialContext.lookup(Unknown Source)
       at Client1.main(Client1.java:24)
      Caused by: java.io.StreamCorruptedException: unexpected block data
       at java.io.ObjectInputStream.readObject0(Unknown Source)

      the line it occurs in is:

      Object ref = c.lookup("ejb/Cabin");

      as context properties i use server/default/conf/jndi.properties
      im not logged on as admin but as mere user, maybe thats important.

      how can i fix this?