11 Replies Latest reply on Feb 9, 2003 6:34 AM by Sacha Labourey

    Unable to connect to HAJNDI from client

    H.-C.Gürsoy Newbie

      Hi Folks,

      me again with some trouble ;-)

      Now, followed the advice from Sacha, i installed a stand alone tomcat, from which i want to connect to jboss.

      If i use the local JNDI i can connect to jb and evrything looks ok, but, if i try to connect to HA JNDI an exception raises (quoted at the end of the posting).

      I tryied evrything: Autosense while getting in the client the initial context (not set the Context.PROVIDER_URL parameter), set the provider-url to "jnp://localhost:1100" etc.
      I have set the "loopback" attribute in the cluster settings to true, too.

      That i'm doing wrong?
      Is this OK that i can't connect to HAJNDI from my client (in contrast to the jb clustering book)?
      Did i missunderstand anything?

      Using JB 3.0.6 / JDK 1.4.1
      on WIn2k SP2.

      Here the exception:
      ---------
      Failed to look up EmployeeSession from JNDI Context
      javax.naming.CommunicationException: Failed to retrieve stub from server 192.168.67.65:1100.
      Root exception is java.io.StreamCorruptedException: unexpected block data
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1288)
      at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845)
      at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769)
      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
      at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845)
      at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769)
      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
      at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
      at java.rmi.MarshalledObject.get(MarshalledObject.java:135)
      at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:192)
      at org.jnp.interfaces.NamingContext.discoverServer(NamingContext.java:1026)
      at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1103)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:470)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:463)
      at javax.naming.InitialContext.lookup(InitialContext.java:347)
      at net.hgy.jbcluster.jndi.ServiceLocator.getEJBHome(ServiceLocator.java:172)
      at net.hgy.jbcluster.actions.ListAllAction.perform(ListAllAction.java:57)
      at net.hgy.lsf.controller.AbstractControllerServlet.prozessAction(AbstractControllerServlet.java:34)
      at net.hgy.lsf.controller.BasicAbstractControllerServlet.processRequest(BasicAbstractControllerServlet.java:405)
      at net.hgy.lsf.controller.BasicAbstractControllerServlet.doGet(BasicAbstractControllerServlet.java:476)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:432)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:386)
      at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:534)
      at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:530)
      at java.lang.Thread.run(Thread.java:536)