1 2 Previous Next 18 Replies Latest reply on May 10, 2006 10:30 PM by 吴奕雄

    EJB client cannot connect: [SocketServerInvoker] Failed to a

    Andreas Nauerz Newbie

      Hi guys!

      I have developed a very simple EJB with the JBoss IDE 1.5:

      Here is the EJB:

      Interface:

      package src;
      
      import javax.ejb.Remote;
      
      @Remote
      public interface MyCalculator
      {
       int add(int x, int y);
      
       int sub(int x, int y);
      }
      


      Implementation:

      package src;
      
      import javax.ejb.Stateless;
      import src.MyCalculator;
      
      public @Stateless class MyCalculatorBean implements MyCalculator {
      
       public int add(int x, int y)
       {
       return x+y;
       }
      
       public int sub(int x, int y)
       {
       return x-y;
       }
      
      }
      


      jndi.properties:

      java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
      java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
      java.naming.provider.url=localhost:1099
      


      It deployed successfully.

      Next I developed the client.
      First I got some ClassNotFoundException for the class EJBMetaDataImpl. Luckily that problem could be solved as I found another thread stating that the client project needs the jboss-client.jar.

      Here ist the client:

      import java.rmi.RMISecurityManager;
      import java.util.Enumeration;
      import java.util.Hashtable;
      
      import javax.naming.Context;
      import javax.naming.InitialContext;
      
      import src.MyCalculator;
      
      public class MyCalculator_Client
      {
      
       /**
       * @param args
       */
       public static void main(String[] args)
       {
       try
       {
       System.setSecurityManager(new RMISecurityManager());
       InitialContext ctx = new InitialContext();
      
       MyCalculator myCalculator = (MyCalculator) ctx
       .lookup("MyCalculatorBean/remote");
      
       System.out.println("1+2=" + myCalculator.add(1, 2));
      
       } catch (Exception e)
       {
       e.printStackTrace(System.err);
       }
       }
      
      }
      


      Here is the exception during invocation:

      20:13:12,665 ERROR [SocketServerInvoker] Failed to accept socket connection
      java.lang.reflect.InvocationTargetException
       at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
       at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
       at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
       at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
       at org.jboss.remoting.transport.socket.ServerThread.createServerSocket(ServerThread.java:147)
       at org.jboss.remoting.transport.socket.ServerThread.<init>(ServerThread.java:84)
       at org.jboss.remoting.transport.socket.SocketServerInvoker.processInvocation(SocketServerInvoker.java:434)
       at org.jboss.remoting.transport.socket.SocketServerInvoker.run(SocketServerInvoker.java:401)
       at java.lang.Thread.run(Thread.java:595)
      Caused by: java.io.EOFException
       at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2232)
       at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2698)
       at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:750)
       at java.io.ObjectInputStream.<init>(ObjectInputStream.java:268)
       at org.jboss.remoting.loading.ObjectInputStreamWithClassLoader.<init>(ObjectInputStreamWithClassLoader.java:57)
       at org.jboss.remoting.serialization.impl.java.JavaSerializationManager.createInput(JavaSerializationManager.java:52)
       at org.jboss.remoting.transport.socket.ServerSocketWrapper.createInputStream(ServerSocketWrapper.java:56)
       at org.jboss.remoting.transport.socket.ClientSocketWrapper.createStreams(ClientSocketWrapper.java:76)
       at org.jboss.remoting.transport.socket.ClientSocketWrapper.<init>(ClientSocketWrapper.java:54)
       at org.jboss.remoting.transport.socket.ServerSocketWrapper.<init>(ServerSocketWrapper.java:50)
       ... 9 more
      20:13:12,675 ERROR [SocketServerInvoker] Failed to accept socket connection
      java.lang.reflect.InvocationTargetException
       at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
       at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
       at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
       at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
       at org.jboss.remoting.transport.socket.ServerThread.createServerSocket(ServerThread.java:147)
       at org.jboss.remoting.transport.socket.ServerThread.<init>(ServerThread.java:84)
       at org.jboss.remoting.transport.socket.SocketServerInvoker.processInvocation(SocketServerInvoker.java:434)
       at org.jboss.remoting.transport.socket.SocketServerInvoker.run(SocketServerInvoker.java:401)
       at java.lang.Thread.run(Thread.java:595)
      Caused by: java.net.SocketException: Software caused connection abort: recv failed
       at java.net.SocketInputStream.socketRead0(Native Method)
       at java.net.SocketInputStream.read(SocketInputStream.java:129)
       at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
       at java.io.BufferedInputStream.read1(BufferedInputStream.java:256)
       at java.io.BufferedInputStream.read(BufferedInputStream.java:313)
       at java.io.ObjectInputStream$PeekInputStream.read(ObjectInputStream.java:2217)
       at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2230)
       at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2698)
       at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:750)
       at java.io.ObjectInputStream.<init>(ObjectInputStream.java:268)
       at org.jboss.remoting.loading.ObjectInputStreamWithClassLoader.<init>(ObjectInputStreamWithClassLoader.java:57)
       at org.jboss.remoting.serialization.impl.java.JavaSerializationManager.createInput(JavaSerializationManager.java:52)
       at org.jboss.remoting.transport.socket.ServerSocketWrapper.createInputStream(ServerSocketWrapper.java:56)
       at org.jboss.remoting.transport.socket.ClientSocketWrapper.createStreams(ClientSocketWrapper.java:76)
       at org.jboss.remoting.transport.socket.ClientSocketWrapper.<init>(ClientSocketWrapper.java:54)
       at org.jboss.remoting.transport.socket.ServerSocketWrapper.<init>(ServerSocketWrapper.java:50)
       ... 9 more
      


      Any idea?

      Thanks!

        • 1. Re: EJB client cannot connect: [SocketServerInvoker] Failed
          Andreas Nauerz Newbie

          Ah, just forgotten:

          I had another problem after the ClassNotFoundException which was some "access denied" thing.

          But I think I fixed that by inserting the following line

          permission java.security.AllPermission;
          


          into the JREs security policy file.

          Here is the file java.policy:

          // Standard extensions get all permissions by default
          
          grant codeBase "file:${{java.ext.dirs}}/*" {
           permission java.security.AllPermission;
          };
          
          // default permissions granted to all domains
          
          grant {
           permission java.security.AllPermission;
          
           // Allows any thread to stop itself using the java.lang.Thread.stop()
           // method that takes no argument.
           // Note that this permission is granted by default only to remain
           // backwards compatible.
           // It is strongly recommended that you either remove this permission
           // from this policy file or further restrict it to code sources
           // that you specify, because Thread.stop() is potentially unsafe.
           // See "http://java.sun.com/notes" for more information.
           permission java.lang.RuntimePermission "stopThread";
          
           // allows anyone to listen on un-privileged ports
           permission java.net.SocketPermission "localhost:1024-", "listen";
          
           // "standard" properies that can be read by anyone
          
           permission java.util.PropertyPermission "java.version", "read";
           permission java.util.PropertyPermission "java.vendor", "read";
           permission java.util.PropertyPermission "java.vendor.url", "read";
           permission java.util.PropertyPermission "java.class.version", "read";
           permission java.util.PropertyPermission "os.name", "read";
           permission java.util.PropertyPermission "os.version", "read";
           permission java.util.PropertyPermission "os.arch", "read";
           permission java.util.PropertyPermission "file.separator", "read";
           permission java.util.PropertyPermission "path.separator", "read";
           permission java.util.PropertyPermission "line.separator", "read";
          
           permission java.util.PropertyPermission "java.specification.version", "read";
           permission java.util.PropertyPermission "java.specification.vendor", "read";
           permission java.util.PropertyPermission "java.specification.name", "read";
          
           permission java.util.PropertyPermission "java.vm.specification.version", "read";
           permission java.util.PropertyPermission "java.vm.specification.vendor", "read";
           permission java.util.PropertyPermission "java.vm.specification.name", "read";
           permission java.util.PropertyPermission "java.vm.version", "read";
           permission java.util.PropertyPermission "java.vm.vendor", "read";
           permission java.util.PropertyPermission "java.vm.name", "read";
          };
          


          I have no more ideas...

          • 2. Re: EJB client cannot connect: [SocketServerInvoker] Failed
            Andreas Nauerz Newbie

            Hey, new info:

            The error does not occurr if I remove the following line from the client:

             System.out.println("1+2=" + myCalculator.add(1, 2));
            


            Any thoughts?

            • 3. Re: EJB client cannot connect: [SocketServerInvoker] Failed
              Andreas Nauerz Newbie

              Ok, I could fix this introducing a interface annotated with @Local and looking that one up within my client.

              Hm... probably a beginners error - I am letting client and EJB run on the same physical host :-/

              Next I received another ClassNotFoundException for TimedObjectInvoker which I could fix by adding the jboss.jar to my client project.

              What I am observing now is:

              java.lang.NullPointerException
               at org.jboss.ejb3.stateless.StatelessLocalProxy.invoke(StatelessLocalProxy.java:74)
               at $Proxy0.add(Unknown Source)
               at client.MyCalculator_Client.main(MyCalculator_Client.java:34)
              


              But I think the solution to this is described here:

              http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3915623#3915623

              I will give this a try...

              • 5. Re: EJB client cannot connect: [SocketServerInvoker] Failed
                William DeCoste Apprentice

                A bean's local interface can only be used if the client is within the same VM as the bean. Looks like your client is in it's own VM and trying to use the local interface.

                • 6. Re: EJB client cannot connect: [SocketServerInvoker] Failed
                  Janek Ziniewicz Newbie

                  I still have the same problem as NautilusIII in both cases, local and remote. I believe that NullPointerException case is proper behaviour.

                  bdecoste please read whole thread and see that we have problems with invoking methods of remote interface. Any ideas?

                  • 7. Re: EJB client cannot connect: [SocketServerInvoker] Failed
                    Janek Ziniewicz Newbie

                    I'll post my code, maybe this will help.
                    I use jBoss404RC1 on linux.

                    My interfaces:

                    package manager;
                    
                    import javax.ejb.Local;
                    
                    public interface ControllerLocal {
                    
                     public String Sth();
                    }
                    
                    


                    package manager;
                    
                    import javax.ejb.Remote;
                    
                    
                    public interface ControllerRemote {
                    
                     public String Sth();
                    
                    }
                    


                    the bean:
                    package manager;
                    
                    import java.util.Date;
                    
                    import javax.ejb.Local;
                    import javax.ejb.Remote;
                    import javax.ejb.Stateless;
                    
                    @Stateless
                    @Local ({ControllerLocal.class})
                    @Remote ({ControllerRemote.class})
                    public class StatelessController implements ControllerLocal, ControllerRemote {
                    
                     public String Sth() {
                     return "Controller: " + new Date().toString();
                     }
                    
                    }
                    


                    and test:
                    package test;
                    
                    import java.util.Hashtable;
                    
                    import javax.naming.Context;
                    import javax.naming.InitialContext;
                    import javax.naming.NamingException;
                    
                    import junit.framework.TestCase;
                    import manager.ControllerLocal;
                    import manager.ControllerRemote;
                    
                    public class ControllerTest extends TestCase {
                    
                     ControllerLocal scl = null;
                     ControllerRemote scr = null;
                    
                     private Context createInitialContext() throws NamingException {
                     Hashtable<String, String> hm = new Hashtable<String, String>(3);
                     hm.put("java.naming.factory.initial","org.jnp.interfaces.NamingContextFactory");
                     hm.put("java.naming.factory.url.pkgs","org.jboss.naming:org.jnp.interfaces");
                     hm.put("java.naming.provider.url", "127.0.0.1:1099");
                     return new InitialContext(hm);
                     }
                    
                     protected void setUp() throws Exception {
                     super.setUp();
                     Context ctx = createInitialContext();
                     scl = (ControllerLocal) ctx.lookup("StatelessController/local");
                     scr = (ControllerRemote) ctx.lookup("StatelessController/remote");
                     }
                    
                     public void testLocal() {
                     assertNotNull("scl == null", scl);
                     scl.Sth();
                     }
                    
                     public void testRemote() {
                     assertNotNull("scr == null", scr);
                     scr.Sth();
                     }
                    }
                    


                    And now my errors: testLocal() throws
                    java.lang.NullPointerException
                     at org.jboss.ejb3.stateless.StatelessLocalProxy.invoke(StatelessLocalProxy.java:74)
                     at $Proxy0.Sth(Unknown Source)
                     at test.ControllerTest.testLocal(ControllerTest.java:35)
                     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                     at java.lang.reflect.Method.invoke(Method.java:585)
                     at junit.framework.TestCase.runTest(TestCase.java:154)
                     at junit.framework.TestCase.runBare(TestCase.java:127)
                     at junit.framework.TestResult$1.protect(TestResult.java:106)
                     at junit.framework.TestResult.runProtected(TestResult.java:124)
                     at junit.framework.TestResult.run(TestResult.java:109)
                     at junit.framework.TestCase.run(TestCase.java:118)
                     at junit.framework.TestSuite.runTest(TestSuite.java:208)
                     at junit.framework.TestSuite.run(TestSuite.java:203)
                     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478)
                     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
                     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
                    


                    testRemote throws:
                    17:26:56,536 ERROR [SocketServerInvoker] Failed to accept socket connection
                    java.lang.reflect.InvocationTargetException
                     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
                     at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
                     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
                     at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
                     at org.jboss.remoting.transport.socket.ServerThread.createServerSocket(ServerThread.java:147)
                     at org.jboss.remoting.transport.socket.ServerThread.<init>(ServerThread.java:84)
                     at org.jboss.remoting.transport.socket.SocketServerInvoker.processInvocation(SocketServerInvoker.java:434)
                     at org.jboss.remoting.transport.socket.SocketServerInvoker.run(SocketServerInvoker.java:401)
                     at java.lang.Thread.run(Thread.java:595)
                    Caused by: java.net.SocketException: Connection reset
                     at java.net.SocketInputStream.read(SocketInputStream.java:168)
                     at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
                     at java.io.BufferedInputStream.read1(BufferedInputStream.java:256)
                     at java.io.BufferedInputStream.read(BufferedInputStream.java:313)
                     at java.io.ObjectInputStream$PeekInputStream.read(ObjectInputStream.java:2217)
                     at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2230)
                     at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2698)
                     at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:750)
                     at java.io.ObjectInputStream.<init>(ObjectInputStream.java:268)
                     at org.jboss.remoting.loading.ObjectInputStreamWithClassLoader.<init>(ObjectInputStreamWithClassLoader.java:57)
                     at org.jboss.remoting.serialization.impl.java.JavaSerializationManager.createInput(JavaSerializationManager.java:52)
                     at org.jboss.remoting.transport.socket.ServerSocketWrapper.createInputStream(ServerSocketWrapper.java:56)
                     at org.jboss.remoting.transport.socket.ClientSocketWrapper.createStreams(ClientSocketWrapper.java:76)
                     at org.jboss.remoting.transport.socket.ClientSocketWrapper.<init>(ClientSocketWrapper.java:54)
                     at org.jboss.remoting.transport.socket.ServerSocketWrapper.<init>(ServerSocketWrapper.java:50)
                     ... 9 more
                    17:26:56,538 ERROR [SocketServerInvoker] Failed to accept socket connection
                    java.lang.reflect.InvocationTargetException
                     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
                     at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
                     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
                     at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
                     at org.jboss.remoting.transport.socket.ServerThread.createServerSocket(ServerThread.java:147)
                     at org.jboss.remoting.transport.socket.ServerThread.<init>(ServerThread.java:84)
                     at org.jboss.remoting.transport.socket.SocketServerInvoker.processInvocation(SocketServerInvoker.java:434)
                     at org.jboss.remoting.transport.socket.SocketServerInvoker.run(SocketServerInvoker.java:401)
                     at java.lang.Thread.run(Thread.java:595)
                    Caused by: java.io.EOFException
                     at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2232)
                     at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2698)
                     at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:750)
                     at java.io.ObjectInputStream.<init>(ObjectInputStream.java:268)
                     at org.jboss.remoting.loading.ObjectInputStreamWithClassLoader.<init>(ObjectInputStreamWithClassLoader.java:57)
                     at org.jboss.remoting.serialization.impl.java.JavaSerializationManager.createInput(JavaSerializationManager.java:52)
                     at org.jboss.remoting.transport.socket.ServerSocketWrapper.createInputStream(ServerSocketWrapper.java:56)
                     at org.jboss.remoting.transport.socket.ClientSocketWrapper.createStreams(ClientSocketWrapper.java:76)
                     at org.jboss.remoting.transport.socket.ClientSocketWrapper.<init>(ClientSocketWrapper.java:54)
                     at org.jboss.remoting.transport.socket.ServerSocketWrapper.<init>(ServerSocketWrapper.java:50)
                     ... 9 more
                    17:34:16,343 ERROR [SocketServerInvoker] Failed to accept socket connection
                    java.lang.reflect.InvocationTargetException
                     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
                     at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
                     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
                     at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
                     at org.jboss.remoting.transport.socket.ServerThread.createServerSocket(ServerThread.java:147)
                     at org.jboss.remoting.transport.socket.ServerThread.<init>(ServerThread.java:84)
                     at org.jboss.remoting.transport.socket.SocketServerInvoker.processInvocation(SocketServerInvoker.java:434)
                     at org.jboss.remoting.transport.socket.SocketServerInvoker.run(SocketServerInvoker.java:401)
                     at java.lang.Thread.run(Thread.java:595)
                    Caused by: java.net.SocketException: Connection reset
                     at java.net.SocketInputStream.read(SocketInputStream.java:168)
                     at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
                     at java.io.BufferedInputStream.read1(BufferedInputStream.java:256)
                     at java.io.BufferedInputStream.read(BufferedInputStream.java:313)
                     at java.io.ObjectInputStream$PeekInputStream.read(ObjectInputStream.java:2217)
                     at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2230)
                     at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2698)
                     at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:750)
                     at java.io.ObjectInputStream.<init>(ObjectInputStream.java:268)
                     at org.jboss.remoting.loading.ObjectInputStreamWithClassLoader.<init>(ObjectInputStreamWithClassLoader.java:57)
                     at org.jboss.remoting.serialization.impl.java.JavaSerializationManager.createInput(JavaSerializationManager.java:52)
                     at org.jboss.remoting.transport.socket.ServerSocketWrapper.createInputStream(ServerSocketWrapper.java:56)
                     at org.jboss.remoting.transport.socket.ClientSocketWrapper.createStreams(ClientSocketWrapper.java:76)
                     at org.jboss.remoting.transport.socket.ClientSocketWrapper.<init>(ClientSocketWrapper.java:54)
                     at org.jboss.remoting.transport.socket.ServerSocketWrapper.<init>(ServerSocketWrapper.java:50)
                     ... 9 more
                    17:34:16,346 ERROR [SocketServerInvoker] Failed to accept socket connection
                    java.lang.reflect.InvocationTargetException
                     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
                     at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
                     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
                     at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
                     at org.jboss.remoting.transport.socket.ServerThread.createServerSocket(ServerThread.java:147)
                     at org.jboss.remoting.transport.socket.ServerThread.<init>(ServerThread.java:84)
                     at org.jboss.remoting.transport.socket.SocketServerInvoker.processInvocation(SocketServerInvoker.java:434)
                     at org.jboss.remoting.transport.socket.SocketServerInvoker.run(SocketServerInvoker.java:401)
                     at java.lang.Thread.run(Thread.java:595)
                    Caused by: java.io.EOFException
                     at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2232)
                     at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2698)
                     at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:750)
                     at java.io.ObjectInputStream.<init>(ObjectInputStream.java:268)
                     at org.jboss.remoting.loading.ObjectInputStreamWithClassLoader.<init>(ObjectInputStreamWithClassLoader.java:57)
                     at org.jboss.remoting.serialization.impl.java.JavaSerializationManager.createInput(JavaSerializationManager.java:52)
                     at org.jboss.remoting.transport.socket.ServerSocketWrapper.createInputStream(ServerSocketWrapper.java:56)
                     at org.jboss.remoting.transport.socket.ClientSocketWrapper.createStreams(ClientSocketWrapper.java:76)
                     at org.jboss.remoting.transport.socket.ClientSocketWrapper.<init>(ClientSocketWrapper.java:54)
                     at org.jboss.remoting.transport.socket.ServerSocketWrapper.<init>(ServerSocketWrapper.java:50)
                     ... 9 more
                    


                    deployed jar
                    META-INF/
                    META-INF/MANIFEST.MF
                    jar/
                    manager/
                    model/
                    test/
                    manager/ControllerLocal.class
                    manager/ControllerRemote.class
                    manager/StatelessController.class
                    test/ControllerTest.class
                    


                    Why calls to methods of remote inteface don't work? Any ideas?


                    • 8. Re: EJB client cannot connect: [SocketServerInvoker] Failed
                      William DeCoste Apprentice

                      For the remote call, it looks like there is a problem deserializing an object. Any possibility that the client and server are out of sync regarding the application classes?

                      • 9. Re: EJB client cannot connect: [SocketServerInvoker] Failed
                        Janek Ziniewicz Newbie

                         

                        "bdecoste" wrote:
                        For the remote call, it looks like there is a problem deserializing an object. Any possibility that the client and server are out of sync regarding the application classes?


                        No, tests were run on fresh deployment. Additionally I removed from classpath libraries shipped with JBoss-IDE and use jars from server directory.

                        Btw, how can I debug jboss source from inside Eclipse (with JBoss-IDE) ?

                        • 10. Re: EJB client cannot connect: [SocketServerInvoker] Failed
                          William DeCoste Apprentice

                          Looks like the stack trace for the remote interface is from the server side? Can you send upload the corresponding client side log?

                          • 11. Re: EJB client cannot connect: [SocketServerInvoker] Failed
                            Janek Ziniewicz Newbie

                             

                            Looks like the stack trace for the remote interface is from the server side?

                            You are right.

                            Can you send upload the corresponding client side log?

                            My client doesn't generate any logs.

                            • 12. Re: EJB client cannot connect: [SocketServerInvoker] Failed
                              Janek Ziniewicz Newbie

                              Why http://jira.jboss.com/jira/browse/EJBTHREE-449 was closed? This issue is definitely not solved. Should I create report it once again with detailed steps needed to recreate the problem?

                              • 13. Re: EJB client cannot connect: [SocketServerInvoker] Failed
                                Jens Elkner Apprentice

                                Not sure, whether you put the right logs on the issue (it says somes bla at linux, but the logs sees to come from windows). Anyway, I guess you missed to post the important part - the log, which states, that the entity is not bound.

                                You should lookup your bean with $EARNAME/$beanname/local|remote so in you case
                                MyCalculator myCalculator = (MyCalculator) ctx.lookup("ejb3_1/MyCalculatorBean/remote);

                                Does it help ;-)

                                • 14. Re: EJB client cannot connect: [SocketServerInvoker] Failed
                                  Janek Ziniewicz Newbie

                                   

                                  it says somes bla at linux, but the logs sees to come from windows

                                  Please read whole thread :)
                                  You should lookup your bean with $EARNAME/$beanname/local|remote so in you case

                                  This type of lookup is proper only if beans are packaged in ear file. My beans are in ordinary jar file. Docs say that I should use "$beanname/local|remote" string for looking up a bean and indeed it works.

                                  1 2 Previous Next