0 Replies Latest reply on Jun 19, 2003 9:29 AM by lunluc

    Server-side problems with Handle's getEJBObject()

    lunluc Newbie

      Hi,
      I'm trying to port a WebLogic7 application to JBoss3.2.1. I'm using JDK1.4.1. The is a bit of code in the application where a session bean handle gets stored in an entity bean. However, when getEJBObject() gets called on the handle i get back:
      2003-06-19 15:14:59,143 ERROR [STDERR] java.rmi.ServerException: Could not get EJBObject; nested exception is:
      java.rmi.ConnectException: Connection refused to host: localhost; nested exception is:
      java.net.ConnectException: Connection refused: connect
      2003-06-19 15:14:59,143 ERROR [STDERR] at org.jboss.proxy.ejb.handle.StatefulHandleImpl.getEJBObject(StatefulHandleImpl.java:140)

      The stack trace goes like...
      2003-06-19 15:14:59,203 ERROR [STDERR] Caused by: java.rmi.ConnectException: Connection refused to host: localhost; nested exception is:
      java.net.ConnectException: Connection refused: connect
      2003-06-19 15:14:59,203 ERROR [STDERR] at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:567)
      2003-06-19 15:14:59,203 ERROR [STDERR] at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:185)
      2003-06-19 15:14:59,203 ERROR [STDERR] at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:171)
      2003-06-19 15:14:59,203 ERROR [STDERR] at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:101)
      2003-06-19 15:14:59,203 ERROR [STDERR] at org.jboss.invocation.jrmp.server.JRMPInvoker_Stub.invoke(Unknown Source)
      2003-06-19 15:14:59,203 ERROR [STDERR] at org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(JRMPInvokerProxy.java:135)
      2003-06-19 15:14:59,203 ERROR [STDERR] at org.jboss.proxy.ejb.handle.StatefulHandleImpl.getEJBObject(StatefulHandleImpl.java:136)
      2003-06-19 15:14:59,203 ERROR [STDERR] ... 96 more
      2003-06-19 15:14:59,203 ERROR [STDERR] Caused by: java.net.ConnectException: Connection refused: connect
      2003-06-19 15:14:59,203 ERROR [STDERR] at java.net.PlainSocketImpl.socketConnect(Native Method)
      2003-06-19 15:14:59,213 ERROR [STDERR] at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
      2003-06-19 15:14:59,213 ERROR [STDERR] at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
      2003-06-19 15:14:59,213 ERROR [STDERR] at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
      2003-06-19 15:14:59,213 ERROR [STDERR] at java.net.Socket.connect(Socket.java:426)
      2003-06-19 15:14:59,213 ERROR [STDERR] at java.net.Socket.connect(Socket.java:376)
      2003-06-19 15:14:59,213 ERROR [STDERR] at java.net.Socket.(Socket.java:291)
      2003-06-19 15:14:59,213 ERROR [STDERR] at java.net.Socket.(Socket.java:119)
      2003-06-19 15:14:59,213 ERROR [STDERR] at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:22)
      2003-06-19 15:14:59,213 ERROR [STDERR] at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:128)
      2003-06-19 15:14:59,213 ERROR [STDERR] at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:562)

      What I did was, I serialized the handle and wrote it to a file which I later read in a client and used to *successfully* getEJBObject() from it!


      Has anybody an idea of what's wrong?
      (p.s. `localhost' is used in the stack trace in place of the IP of the machine...)

      Thanx in advance.