2 Replies Latest reply on Feb 5, 2007 12:03 PM by bob82

    connecting to a remote ejb

    bob82

      hi everybody
      i have a problem trying to lookup an EJB from a standalone client, using the queue example of JBoss.
      I do this:
      Code:

      ic = new InitialContext();
      fe = (Interface)ic.lookup("/JndiName");




      in jndi.properties i set the server url properly in this way:
      java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
      java.naming.provider.url=jnp://hostname:1099

      I get this excpetion:
      Code:

      [java] java.lang.reflect.UndeclaredThrowableException
      [java] at $Proxy0.getUtenteByID(Unknown Source)
      [java] at org.jboss.example.jms.queue.QueueExample.example(QueueExample
      .java:73)
      [java] at org.jboss.example.jms.common.ExampleSupport.run(ExampleSuppor
      t.java:58)
      [java] at org.jboss.example.jms.queue.QueueExample.main(QueueExample.ja
      va:115)
      [java] Caused by: java.lang.Exception: Can not make remoting client invocat
      ion due to not being connected to server.
      [java] at org.jboss.remoting.Client.invoke(Client.java:611)
      [java] at org.jboss.remoting.Client.invoke(Client.java:599)
      [java] at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(Inv
      okeRemoteInterceptor.java:55)
      [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInv
      ocation.java:101)
      [java] at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(Cl
      ientTxPropagationInterceptor.java:61)
      [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInv
      ocation.java:101)
      [java] at org.jboss.aspects.security.SecurityClientInterceptor.invoke(S
      ecurityClientInterceptor.java:55)
      [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInv
      ocation.java:101)
      [java] at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInte
      rceptor.java:77)
      [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInv
      ocation.java:101)
      [java] at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(Stateles
      sRemoteProxy.java:102)




      Any suggestion?