I'm getting the error at the bottom and would like to know if there's
anything special I need to do inside an Action. Server type is Orion 1.4.5.

ConfigBuildBean - Session Bean
ConfigBuildHome - EJBHome
ConfigBuild - EJBObject

---------- ejb-jar.xml --------------------------------

      <session>
         <description>Used in the configuration of new builds.</description>
         <display-name>Build Configuration Session Bean</display-name>
         <ejb-name>com.neuroquest.cais.ejb.config.ConfigBuildBean</ejb-name>

<ejb-class>com.neuroquest.cais.ejb.config.ConfigBuildBean</ejb-class>
         <home>com.neuroquest.cais.ejb.config.ConfigBuildHome</home>
         <remote>com.neuroquest.cais.ejb.config.ConfigBuild</remote>
         <session-type>Stateless</session-type>
         <transaction-type>Container</transaction-type>
      </session>

-------- Session Bean Implementations --------------------------

public class NewAction extends Action
{
   public ActionForward perform(ActionMapping mapping, ActionForm form,
         HttpServletRequest request, HttpServletResponse response) {

      // turn form instance into custom form bean.
      NewForm newForm = (NewForm) form;
      //String viewName = newForm.getView();

      String initCtxFactory =
getInitParameter(Context.INITIAL_CONTEXT_FACTORY);
      String providerURL = getInitParameter(Context.PROVIDER_URL);

      try {

         Properties env = System.getProperties();
         env.put(Context.INITIAL_CONTEXT_FACTORY, initCtxFactory);
         env.put(Context.PROVIDER_URL, providerURL);

         Context ctx = new InitialContext(env);

         ConfigBuildHome home = (ConfigBuildHome)
ctx.lookup("ConfigBuildBean");

         ConfigBuild cfgBuild = home.create();
         cfgBuild.saveConfig();
      }
      catch (Exception e) {
         log(e);
         e.printStackTrace();
      }
      ...

----- The Error ------------------------------------------------------

cassia(root):/u/public/orion# java -jar orion.jar
Auto-unpacking /u/build/release/cais.ear... done.
Auto-deploying cais-ejb.jar (ejb-jar.xml had been touched since the previous
deployment)... done.
Orion/1.4.5 initialized
javax.naming.NameNotFoundException: ConfigBuildHome not found
        at com.evermind.server.rmi.RMIContext.lookup(JAX, Compiled Code)
        at com.evermind.server.hm.f4(JAX, Compiled Code)
        at com.evermind.server.hm.lookup(JAX, Compiled Code)
        at javax.naming.InitialContext.lookup(InitialContext.java, Compiled
Code)
        at com.neuroquest.cais.actions.NewAction.perform(NewAction.java,
Compiled Code)
        at
org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.ja
va, Compiled Code)
        at
org.apache.struts.action.ActionServlet.process(ActionServlet.java, Compiled
Code)
        at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java,
Compiled Code)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java, Compiled
Code)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java, Compiled
Code)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java, Compiled
Code)
        at com.evermind.server.http.d3.sw(JAX, Compiled Code)
        at com.evermind.server.http.d3.su(JAX, Compiled Code)
        at com.evermind.server.http.ef.s1(JAX, Compiled Code)
        at com.evermind.server.http.ef.do(JAX, Compiled Code)
        at com.evermind.util.f.run(JAX, Compiled Code)


Reply via email to