Title: HELP: I'm unable to connect to jboss from my Swing app

- I have a Session bean deployed on JBoss
- I have a swing app that try to connect to the remove component like this:

    1: java.lang.Object objRef = initialContext.lookup("java:comp/env/ejb/tspace/UserManager")
    2: cachedRemoteHome = (tspace.framework.user.interfaces.UserManagerRemoteHome) PortableRemoteObject.narrow(objRef, tspace.framework.user.interfaces.UserManagerRemoteHome.class);


But the line #1 fails and I receive the following error:

    [java] javax.naming.NameNotFoundException: ejb not bound
    [java]     at org.jnp.server.NamingServer.getBinding(NamingServer.java:495)

    [java]     at org.jnp.server.NamingServer.getBinding(NamingServer.java:503)

    [java]     at org.jnp.server.NamingServer.getObject(NamingServer.java:509)
    [java]     at org.jnp.server.NamingServer.lookup(NamingServer.java:253)
    [java]     at org.jnp.server.NamingServer.lookup(NamingServer.java:256)
    [java]     at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:45

    [java]     at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:56

    [java]     at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:44

    [java]     at javax.naming.InitialContext.lookup(InitialContext.java:347)
    [java]     at tspace.framework.user.util.GroupUtil.getLocalHome(GroupUtil.j
    5)
    [java]     at tspace.framework.user.ejb.UserManagerBean.findSubGroups(UserM
    rBean.java:225)
    [java]     at tspace.framework.user.ejb.UserManagerBean.findSubGroups(UserM
    rBean.java:212)
    [java]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [java]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcces
    pl.java:39)
    [java]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet
    cessorImpl.java:25)
    [java]     at java.lang.reflect.Method.invoke(Method.java:324)
    [java]     at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.
    e(StatelessSessionContainer.java:660)
    [java]     at org.jboss.resource.connectionmanager.CachedConnectionIntercep
    nvoke(CachedConnectionInterceptor.java:186)
    [java]     at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.inv
    tatelessSessionInstanceInterceptor.java:77)
    [java]     at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(Abstra
    nterceptor.java:107)
    [java]     at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(Tx
    ceptorCMT.java:151)
    [java]     at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCM
    a:60)
    [java]     at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInte
    or.java:130)

My swing app jndi.properties look like:

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

Does any one knows where the problem is?
thanx in advance.

PS: I checked with Jboss JNDIView and my component existed in the JNDI tree

Herve Tchepannou
Software Engineer
Objexis Coorporation
Phone: (514) 932 3295 Ext. 231
mailto:[EMAIL PROTECTED]

Objexis Coorporation
http://www.objexis.com
1635 Sherbrooke West, Suite #405
Montreal, Qc H3H 1E2
Tel: 514.932.3295
Fax: 514.932.4639
http://www.objexis.com

Important - This message may contain privileged and confidential information.  It is intended only for the use of the individual(s) named above. If the reader of this message is not the intended recipient you are hereby notified that any use, dissemination, distribution or reproduction of this message is prohibited. If you have received this message in error please notify Objexis Corporation immediately and promptly delete this message and any copies thereof. Any views expressed in this message are those of the individual sender and may not necessarily reflect the views of Objexis Corporation.

Reply via email to