1 Reply Latest reply on Jul 29, 2002 8:42 PM by Mac Rinehart

    Everything's changed...

    Mac Rinehart Newbie


      The last time I used JBoss App Server was in the 3.0.0 Beta release. At this point things have changed quite a bit. In particular, there used to be a jndi.jar file in the beta release that one of my applications depends on. Now that library is not available (or I can't find it). Could someone please give me a tip on where it is, or what to use as a substitute?



        • 1. Re: Everything's changed...
          Mac Rinehart Newbie

          Let's refine the problem. The issue is that I'm having difficulty looking up the mail service with JNDI from a client application. I'm running Jboss-3.0.0 in the default mode.

          I've followed the directions providing in the Quick Start guide at sourceforge for setting up the jndi.properties file. I've also confirmed that the mail-service.xml file is loading on startup, and that the mail service is registered under the JNDI name of "java:/Mail". The source code snippet for locating the Mail properties is below:

          System.out.println( "Getting initial context." );
          ctx = new InitialContext();
          System.out.println("Loading mail properties");
          Session mailSession = (Session)PortableRemoteObject.narrow
          (ctx.lookup("java:/Mail"), Session.class);

          Properties props = mailSession.getProperties();
          String emailAddr = props.getProperty("mail.from");

          However, when trying to lookup the mail.from property, I get the following stack trace listed below.

          Getting initial context.
          Loading mail properties
          javax.naming.NameNotFoundException: Mail not bound
          at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Unknown Source)
          at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source)
          at sun.rmi.server.UnicastRef.invoke(Unknown Source)
          at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
          at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:445)
          at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:429)
          at javax.naming.InitialContext.lookup(Unknown Source)
          at com.sextanttech.util.ATMApplicationTester.setUp(ATMApplicationTester.java:67)
          at com.sextanttech.util.ATMApplicationTester.(ATMApplicationTester.java:59)
          at com.sextanttech.util.DatabaseBuilder.main(DatabaseBuilder.java:30)

          My question is, why is the Mail name not registered, even when it's registered? I must be doing something wrong but I'm not sure what. I have files to attach (the jndi.properties file and server.log) but the "Attach and Post" button doesn't appear to be working on the attach files page.

          - Mac