4 Replies Latest reply on Mar 15, 2005 9:26 PM by Paul Fewlass

    STILL TRYING AND FAILING

    Paul Fewlass Newbie

      BILL - THANKS FOR YOUR ONGOING PATIENCE - I HAVE REINSTALLED THE WHOLE THING AGAIN AND FOLLOWED THE INSTRUCTIONS METICULASLY - WHEN I RUN THE CLIENT USING ANT RUN IT NOW SAYS


      C:\tutorial\stateless>ant run
      Buildfile: build.xml

      prepare:

      compile:

      ejbjar:

      run:
      [java] log4j:WARN No appenders could be found for logger (org.jboss.remotin
      g.Client).
      [java] log4j:WARN Please initialize the log4j system properly.
      [java] Exception in thread "main" java.lang.reflect.UndeclaredThrowableExce
      ption
      [java] at $Proxy0.add(Unknown Source)
      [java] at org.jboss.tutorial.stateless.client.Client.main(Client.java:2
      1)
      [java] Caused by: java.rmi.ConnectException: Failed to communicate. Proble
      m during marshalling/unmarshalling; nested exception is:
      [java] java.net.SocketTimeoutException: Read timed out
      [java] at org.jboss.remoting.transport.socket.SocketClientInvoker.trans
      port(SocketClientInvoker.java:237)
      [java] at org.jboss.remoting.RemoteClientInvoker.invoke(RemoteClientInv
      oker.java:96)
      [java] at org.jboss.remoting.Client.invoke(Client.java:197)
      [java] at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(Inv
      okeRemoteInterceptor.java:39)
      [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInv
      ocation.java:66)
      [java] at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(Cl
      ientTxPropagationInterceptor.java:44)
      [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInv
      ocation.java:66)
      [java] at org.jboss.aspects.security.SecurityClientInterceptor.invoke(S
      ecurityClientInterceptor.java:38)
      [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInv
      ocation.java:66)
      [java] at org.jboss.aspects.remoting.IsLocalInterceptor.invoke(IsLocalI
      nterceptor.java:32)
      [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInv
      ocation.java:66)
      [java] at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(Stateles
      sRemoteProxy.java:82)
      [java] ... 2 more
      [java] Caused by: java.net.SocketTimeoutException: Read timed out
      [java] at java.net.SocketInputStream.socketRead0(Native Method)
      [java] at java.net.SocketInputStream.read(SocketInputStream.java:129)
      [java] at java.io.BufferedInputStream.fill(BufferedInputStream.java:218
      )
      [java] at java.io.BufferedInputStream.read(BufferedInputStream.java:235
      )
      [java] at java.io.ObjectInputStream$PeekInputStream.peek(ObjectInputStr
      eam.java:2200)
      [java] at java.io.ObjectInputStream$BlockDataInputStream.peek(ObjectInp
      utStream.java:2490)
      [java] at java.io.ObjectInputStream$BlockDataInputStream.peekByte(Objec
      tInputStream.java:2500)
      [java] at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:
      1267)
      [java] at java.io.ObjectInputStream.readObject(ObjectInputStream.java:3
      39)
      [java] at org.jboss.remoting.marshal.serializable.SerializableUnMarshal
      ler.read(SerializableUnMarshaller.java:34)
      [java] at org.jboss.remoting.transport.socket.SocketClientInvoker.trans
      port(SocketClientInvoker.java:215)
      [java] ... 13 more
      [java] Java Result: 1

      BUILD SUCCESSFUL
      Total time: 7 minutes 51 seconds
      C:\tutorial\stateless>

      JBOSS SAYS :----------------------------------------------

      18:35:55,141 INFO [Server] JBoss (MX MicroKernel) [4.0.1sp1 (build: CVSTag=JBos
      s_4_0_1_SP1 date=200502160314)] Started in 4m:1s:728ms
      18:39:42,939 INFO [Ejb3Module] found EJB3 stateless session bean: org.jboss.tut
      orial.stateless.bean.CalculatorBean
      18:39:58,671 INFO [ProxyDeployer] no declared remote bindings
      18:39:58,902 INFO [ProxyDeployer] there is remote interfaces
      18:39:58,912 INFO [ProxyDeployer] default remote binding has jndiName of org.jb
      oss.tutorial.stateless.bean.CalculatorRemote
      18:40:02,407 INFO [EJB3Deployer] Deployed: file:/C:/jboss-4.0.1sp1/server/all/d
      eploy/tutorial.ejb3
      18:49:27,880 ERROR [ServerThread] Failed to initialize
      java.net.SocketException: Connection reset by peer: socket write error
      at java.net.SocketOutputStream.socketWrite0(Native Method)
      at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
      at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
      at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65
      )
      at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
      at java.io.ObjectOutputStream$BlockDataOutputStream.flush(ObjectOutputSt
      ream.java:1622)
      at java.io.ObjectOutputStream.flush(ObjectOutputStream.java:655)
      at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.j
      ava:294)
      at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.jav
      a:141)


      ANY IDEAS ????????????? - PLEASE

        • 1. Re: STILL TRYING AND FAILING
          Igor Fedorenko Newbie

          Do you by any chance have software firewall running?

          • 2. Re: STILL TRYING AND FAILING
            Bill Burke Master

            Igor could be right....

            Another problem that people are coming across is that if you do ant run sometimes the Client will run before the EJB jar has been fully deployed so:

            $ ant

            wait a few seconds and look on the console to make sure the bean was deployed. Then

            $ ant run

            I don't think this is the problem though because it looks by the stack trace that you connect to the server and were starting to invoke through the EJB proxy.

            Also, are you sure you copied the jboss-remoting.jar to the server/all/lib directory? This looks like it could be the problem too.

            Bill

            • 3. Re: STILL TRYING AND FAILING
              Paul Fewlass Newbie

              well I don;t have firewall unless you count AOL as I have the misfortune of having to conect through AOL , although due to my slow machine I do not jboss and aol at the same time.

              I have copied jboss-remoting.jar as instructed, you may have a point with the time of deployment though - (although we are talking many minutes ) rather than seconds , with the stateless example I now get this ( I have done it 3 times in a row as I often get diffferent results ) as you can see I still get an error but it kind of works , is this right? :-

              C:\tutorial\stateless>ant
              Buildfile: build.xml

              prepare:

              compile:

              ejbjar:

              BUILD SUCCESSFUL
              Total time: 7 seconds
              C:\tutorial\stateless>ant run
              Buildfile: build.xml

              prepare:

              compile:

              ejbjar:

              run:
              [java] log4j:WARN No appenders could be found for logger (org.jboss.remotin
              g.Client).
              [java] 1 + 1 = 2
              [java] log4j:WARN Please initialize the log4j system properly.
              [java] 1 - 1 = 0

              BUILD SUCCESSFUL
              Total time: 4 minutes 14 seconds
              C:\tutorial\stateless>ant run
              Buildfile: build.xml

              prepare:

              compile:

              ejbjar:

              run:
              [java] log4j:WARN No appenders could be found for logger (org.jboss.remotin
              g.Client).
              [java] log4j:WARN Please initialize the log4j system properly.
              [java] 1 + 1 = 2
              [java] 1 - 1 = 0

              BUILD SUCCESSFUL
              Total time: 36 seconds
              C:\tutorial\stateless>ant run
              Buildfile: build.xml

              prepare:

              compile:

              ejbjar:

              run:
              [java] log4j:WARN No appenders could be found for logger (org.jboss.remotin
              g.Client).
              [java] 1 + 1 = 2
              [java] log4j:WARN Please initialize the log4j system properly.
              [java] 1 - 1 = 0

              BUILD SUCCESSFUL
              Total time: 1 minute 48 seconds
              C:\tutorial\stateless>

              • 4. Re: STILL TRYING AND FAILING
                Paul Fewlass Newbie

                Thanks you were right - it seems my machine at home is just too slow -