4 Replies Latest reply on Oct 3, 2002 5:36 AM by Sheetal sachdev

    RMI Not bound Jboss 3.0/Oracle 8

    Sheetal sachdev Newbie

      I have an application with the following structure

      Common/META-INF/ --> contains ejb-jar.xml
      Common/src --> contains the source files (ejb's)

      Web/content --> contains the JSP's
      Web/lib --> contains struts.jar
      Web/src --> contains action forms (Struts Action Servlets)
      Web/WEB-INF --> contains web.xml

      I build the project using SilverStream eXtend wrkbench and get a Common.jar and a Web.war file.

      The jar and war files deploy correctly from the Jboss 'all' environment, however when i go to the AgentLogin.jsp to login to the application i get the following error from Jboss:

      Nested exception is:
      javax.naming.NameNotFoundException: RMI not bound
      at org.jnp.server.NamingServer.getBinding(NamingServer.java:495)
      at org.jnp.server.NamingServer.getBinding(NamingServer.java:503)
      at org.jnp.server.NamingServer.getObject(NamingServer.java:509)
      at org.jnp.server.NamingServer.lookup(NamingServer.java:253)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:445)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:429)
      at javax.naming.InitialContext.lookup(InitialContext.java:350)
      at com.sssw.bristol.util.ServiceLocator.getEJBHome(ServiceLocator.java:175)
      at com.sssw.bristol.struts.action.LoginAgentAction.perform(LoginAgentAction.java:42)
      at org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.java:1787)
      at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1586)
      at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
      at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
      at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
      at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
      at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
      at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1012)
      at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1107)
      at java.lang.Thread.run(Thread.java:484)
      16:17:54,617 ERROR [STDERR] at com.sssw.bristol.util.ServiceLocator.getEJBHome(ServiceLocator.java:179)
      16:17:54,617 ERROR [STDERR] at com.sssw.bristol.struts.action.LoginAgentAction.perform(LoginAgentAction.java:42)
      16:17:54,617 ERROR [STDERR] at org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.java:1787)
      16:17:54,627 ERROR [STDERR] at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1586)
      16:17:54,627 ERROR [STDERR] at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
      16:17:54,627 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
      16:17:54,637 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      16:17:54,637 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
      16:17:54,637 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
      16:17:54,647 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
      16:17:54,647 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
      16:17:54,647 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
      16:17:54,647 ERROR [STDERR] at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
      16:17:54,657 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
      16:17:54,657 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
      16:17:54,657 ERROR [STDERR] at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
      16:17:54,667 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
      16:17:54,667 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
      16:17:54,667 ERROR [STDERR] at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
      16:17:54,667 ERROR [STDERR] at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343)
      16:17:54,677 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
      16:17:54,677 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
      16:17:54,677 ERROR [STDERR] at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
      16:17:54,677 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
      16:17:54,687 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
      16:17:54,687 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
      16:17:54,687 ERROR [STDERR] at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
      16:17:54,697 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
      16:17:54,697 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
      16:17:54,697 ERROR [STDERR] at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
      16:17:54,697 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
      16:17:54,707 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
      16:17:54,707 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
      16:17:54,707 ERROR [STDERR] at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
      16:17:54,707 ERROR [STDERR] at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1012)
      16:17:54,717 ERROR [STDERR] at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1107)
      16:17:54,717 ERROR [STDERR] at java.lang.Thread.run(Thread.java:484)


      Please can someone out there help, i have been stuck on this one problem for about 5 weeks now :( let me know if you need any more information.

      TIA
      sas

        • 1. Re: RMI Not bound Jboss 3.0/Oracle 8
          David Jencks Master

          Please look at the topic of a forum before posting in it.

          Should you choose to repost in a forum where you might get an answer, I suggest you figure out what is being looked up and how many vms are involved.

          • 2. Re: RMI Not bound Jboss 3.0/Oracle 8
            Sheetal sachdev Newbie

            so... which forum would you suggest i post this topic on?

            • 3. Re: RMI Not bound Jboss 3.0/Oracle 8
              Sheetal sachdev Newbie

              For anyone that may be interested I have solved the problem outlined above.

              the problem was occuring beacuse of an incorrect JNDI name lookup in ServiceLocator.java which I think is a J2EE standard for centalising JNDI service lookups. I had a method as follows:

              public EJBHome getEJBHome(int service) throws ServiceLocatorException
              {
              Object obj = null;
              String serviceName = getServiceName(service);
              Class serviceClass = getServiceClass(service);

              if (serviceName == null || serviceClass == null)
              {
              throw new ServiceLocatorException("Invalid service specified: " + service);
              }

              Context ctx = this.createContext();

              try
              {
              obj = ctx.lookup("java:comp/env/ejb" + serviceName);
              }
              catch (NamingException eEnv)
              {
              try
              {
              obj = ctx.lookup("RMI/" + serviceName);
              }
              catch (NamingException eRMI)
              {
              throw new ServiceLocatorException("Unable to locate service: " + serviceName, eRMI);
              }
              }
              finally
              {
              this.closeContext(ctx);
              }

              EJBHome home = (EJBHome)PortableRemoteObject.narrow(obj, serviceClass);
              return home;

              basically the first try statement should not have had the "java:comp/env/ejb" bit.

              • 4. Re: RMI Not bound Jboss 3.0/Oracle 8
                Sheetal sachdev Newbie

                ps. I know this post is in the wrong foum, but i thought i had a problem with my datasource, but later realised not.