1 Reply Latest reply on Nov 4, 2010 3:36 AM by Wolf-Dieter Fink

    EJB NameNotFoundException

    Vjiay K Newbie

      Hey, i am new to ejb and jboss. Here is the code to lookup for ejb:

       

      ctx = new InitialContext();

      ejbHome = (ServiceRequestControlHome) ctx.lookup("java:comp/env/ebccs.common.ServiceRequestControl");

       

       

      entry in: jboss.xml

      <session>

      <ejb-name>servicerequestcontroller</ejb-name>

      <jndi-name>ebccs.common.ServiceRequestControl</jndi-name>

      <call-by-value>false</call-by-value>

      <configuration-name>Pool Size Stateless Session Bean</configuration-name>

      </session>

       

       

      entry in: ejb-jar.xml

       

      <session>

      <ejb-name>servicerequestcontroller</ejb-name>

      <home>ca.cgi.ebccs.common.servicerequestcontroller.ServiceRequestControlHome</home>

      <remote>ca.cgi.ebccs.common.servicerequestcontroller.ServiceRequestControl</remote>

      <ejb-class>ca.cgi.ebccs.common.servicerequestcontroller.ServiceRequestControlBean</ejb-class>

      <session-type>Stateless</session-type>

      <transaction-type>Container</transaction-type>

      </session>

       

       

      I get javax.naming.NameNotFoundException: ebccs.common.ServiceRequestControl not bound an runtime.

      Exception trace:

       

      javax.naming.NameNotFoundException: ebccs.common.ServiceRequestControl not bound
              at org.jnp.server.NamingServer.getBinding(NamingServer.java:771)
              at org.jnp.server.NamingServer.getBinding(NamingServer.java:779)
              at org.jnp.server.NamingServer.getObject(NamingServer.java:785)
              at org.jnp.server.NamingServer.lookup(NamingServer.java:443)
              at org.jnp.server.NamingServer.lookup(NamingServer.java:399)
              at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:726)
              at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:833)
              at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)
              at javax.naming.InitialContext.lookup(InitialContext.java:392)
              at ca.cgi.ebccs.common.input.OrderMAXSAQueryServlet.doPost(OrderMAXSAQueryServlet.java:118)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
              at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
              at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
              at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126
              at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
              at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
              at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:905)
              at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:592)
              at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:2036)
              at java.lang.Thread.run(Thread.java:619)

       

       

      Can any help in resolving the issue.

       

      Than You.