2 Replies Latest reply on Sep 12, 2004 2:23 AM by srik

    help with jndi lookup plz

    srik

      Dear friends,

      When I try to do a jndi lookup in jboss3.2.5 environment,

      //Getting initial context
      ctx = new InitialContext();

      //Loading mail properties
      Session mailSession = (Session)PortableRemoteObject.narrow(ctx.lookup("java:/Mail"), Session.class);


      I get the following exception:

      javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out]
      at org.jnp.interfaces.NamingContext.discoverServer(NamingContext.java:11
      19)
      at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1196)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:516)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:509)
      at javax.naming.InitialContext.lookup(Unknown Source)
      at com.sextanttech.util.ATMApplicationTester.testBeanManagedPersistence(
      ATMApplicationTester.java:453)
      at com.sextanttech.util.DatabaseBuilder.main(DatabaseBuilder.java:40)
      Caused by: java.net.SocketTimeoutException: Receive timed out
      at java.net.PlainDatagramSocketImpl.receive(Native Method)
      at java.net.DatagramSocket.receive(Unknown Source)
      at org.jnp.interfaces.NamingContext.discoverServer(NamingContext.java:10
      89)
      ... 6 more


      I 'd appreciate any help regarding this problem.

      Thanks in advance,
      srik.



        • 1. Re: help with jndi lookup plz
          darranl

          Where are you trying to do this lookup, are you outside the JBoss server?

          Items bound under java: can not be accessed from the outside.

          • 2. Re: help with jndi lookup plz
            srik

            Dear darranl,
            thanks for your reply. You were true. I was trying to run a stand-alone application, outside of the jboss container. So, how can I make use of java mail services by being outside.

            thnx in advance.
            srik