Hi,

I have a stateless session bean with the same local and remote interface. 
Lookup for local interface from my webapp works fine, but the lookup for the 
remote interface fails with:

javax.naming.NameNotFoundException: remote not bound
        at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
        at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
        at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
        at org.jnp.server.NamingServer.lookup(NamingServer.java:296)
        at org.jnp.server.NamingServer.lookup(NamingServer.java:270)
        at org.jnp.server.NamingServer.lookup(NamingServer.java:270)
        at sun.reflect.GeneratedMethodAccessor17.invoke(Unknown Source)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
        at sun.rmi.transport.Transport$1.run(Transport.java:153)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
        at 
sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466)
        at 
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707)
        at java.lang.Thread.run(Thread.java:595)
        at 
sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.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)
        at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
        at javax.naming.InitialContext.lookup(InitialContext.java:351)
        at BeanTestUtil.getRemoteUserManager(BeanTestUtil.java:40)
        ...

Here's my bean declaration:

@Local
@Remote
public interface UserManager {
   ...
}

@Stateless
@Local(UserManager.class)
@Remote(UserManager.class)
public class UserManagerBean implements UserManager {
   ...
}

And here's the lookup:

Properties props = new Properties();
props.put(Context.INITIAL_CONTEXT_FACTORY, 
"org.jnp.interfaces.NamingContextFactory");
props.setProperty(Context.URL_PKG_PREFIXES, 
"org.jboss.naming:org.jnp.interfaces");
props.put(Context.PROVIDER_URL, "jnp://localhost:1099");
context = new InitialContext(props);
contect.lookup("TestEAR/UserManagerBean/remote");

And here's the output of JNDIView:

Global JNDI Namespace
  ...
  +- TestEAR(class: org.jnp.interfaces.NamingContext)
  |   +- UserManagerBean (class: org.jnp.interfaces.NamingContext)
  |   |   +- local (proxy: $Proxy137 implements interface 
org.community.ejb.business.UserManager,interface 
org.jboss.ejb3.JBossProxy,interface javax.ejb.EJBLocalObject)
  |   |   +- remote (proxy: $Proxy136 implements interface 
org.community.ejb.business.UserManager,interface 
org.jboss.ejb3.JBossProxy,interface javax.ejb.EJBObject)
...


I use JBoss 4.0.5 with EJB3.0 (from WebInstaller)

Has anybody an idea what's going wrong?

Strunker

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4008426
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to