[jboss-user] [EJB 3.0] - Urgent Help needed !! ejb3 lookup problem from remote clien

sursha do-not-reply at jboss.com
Thu Dec 21 20:57:54 EST 2006


Hi,
I've the following code to lookup an ejb. Using JBOSS 4.0.5GA and ejb3.

   Properties p=new Properties();
        p.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
        p.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
        p.put(Context.PROVIDER_URL,"jnp://host:1099");

    InitialContext ctx = new InitialContext(p);
    IReportService report = (IReportService) ctx.lookup(
                "ejb3/com/aaa/MyService");

    System.out.println("report.resubmit.."+report.resubmit());


------------------------------------------------------------

It works fine if jboss server and client is running on the same machine.
If I run the client from a remote machine, I get the following error


javax.naming.CommunicationException [Root exception is java.rmi.NoSuchObjectExce                                                                             ption: no such object in table]
        at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:722)
        at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
        at javax.naming.InitialContext.lookup(InitialContext.java:351)
        at reportclient.ReportClient.main(ReportClient.java:20)
Caused by: java.rmi.NoSuchObjectException: no such object in table
        at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Stream                                                                             RemoteCall.java:247)
        at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:                                                                             223)
        at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:126)
        at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
        at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:625)
        ... 3 more


Any help will be appreciated

Thanks


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3995760#3995760

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3995760



More information about the jboss-user mailing list