1 Reply Latest reply on Sep 10, 2007 4:01 PM by Dhinakar Perumal

    Failed to retrieve stub from server

    Paul Tamalunas Newbie

      I initially posted this issue to the JNDI forum, but didn't get a response. It seemed to me my problem was stemming from clustering, since (as indicated below) I'm getting a message that my local JBoss AS is trying to access a clustered JBoss AS on my LAN. So I'm submitting to this forum in hopes that the Clustering experts can help me resolve my issue.

      Here's the situation. We've had a web app that's been running fine on JBoss 4.0.5.GA, as the server-side for a Flex app. All developers are running JBoss AS's on their local machines and sharing a common MSSQL database. I built an MDB, added it to the deploy dir, and it worked somewhat with our web app, but the MDB couldn't find the FlexSession stuff. So we thought we'd build an .ear, to include the .war of the web app and the .jar of the MDB.

      The problem I'm getting on start-up is

      ...
      17:59:02 INFO [org.hibernate.util.NamingHelper] JNDI InitialContext properties:{}
      17:59:02 FATAL [org.hibernate.connection.DatasourceConnectionProvider] Could not find datasource: jdbc/PlanITDataSource
      javax.naming.CommunicationException: Failed to retrieve stub from server 192.168.1.18:1100 [Root exception is java.io.StreamCorruptedException: unexpected block data]
      ...


      Now, I never had this problem before, so something is not configured right, I guess. That IP address belongs to my colleague, who is running a clustered JBoss setup; I'm running non-clustered. (18 and 38 are the clustered AS, 14 is mine, and 30 is the data server.) He's also running Linux, whereas I'm running Windows XP Pro. He was able to get the app up and running, after wading through some configuration issues. We're on the same LAN, as are the other developers, who are only using the .war, not the .ear or .jar (MDB), and they don't experience any errors (all are on Windows boxes).

      Can you please tell me what's wrong with our set-up? Is there a way to make sure the clustered JBoss installation doesn't interfere with the non-clustered ones? I'm hoping that will solve my issue. Or maybe there's another solution.

      Thanks
      Pauly T.

        • 1. Re: Failed to retrieve stub from server
          Dhinakar Perumal Newbie

          Hi,

          I had the same issue and I fixed it. It took me a good day or two to figure it out. I noticed that quiet a few people are having the same issue. Hence I am detailing the steps I followed to fix it.
          1. First I added all the jar under Client folder in JBoss to the classpath for running the client program.
          2. Use the IP address and port should be the one that is specified in "jboss:service=Naming" in the jboss-service.xml file
          3. Make sure you have Bean's Name in the lookup and NOT the remote interface name in the look up.

          EX: HelloWorld iBean = (HelloWorld) iContext.lookup("TestSB/remote");

          HelloWorld - Remote interface
          TestSB - my Stateless bean.

          Good Luck!
          Dhina