2 Replies Latest reply on Aug 11, 2009 2:31 PM by tom til

    EJB not bound

    tom til Newbie

      Hello,


      i've a problem that drives me crazy


      i'm using seam 2.1.2 with jboss-5.1.0.GA
      my project is deploy as a .war


      the interesting part of my stack trace is :


      Exception during request processing:
      Caused by javax.servlet.ServletException with message: Could not instantiate Seam component: SocietiesManagementAction


        • 1. Re: EJB not bound
          tom til Newbie

          Hello,

          i've a problem that drives me crazy

          i'm using seam 2.1.2 with jboss-5.1.0.GA
          my project is deploy as a .war

          the interesting part of my stack trace is :

          Exception during request processing:
          Caused by javax.servlet.ServletException with message: "Could not instantiate Seam component: SocietiesManagementAction"

          and

          Caused by: javax.naming.NameNotFoundException: kiosk not bound


          I'm trying to use a Stateful / or a staless bean, but i've always a Caused by: javax.naming.NameNotFoundException: kiosk not bound



          the interesting part of my component.xml :
             core:init debug="true" jndiPattern="kiosk/#{ejbName}/local" distributable="true"/
          i replace @jndipattern@ by kiosk/#{ejbName}/local, no result..


          my SocietiesManagementAction



          @Stateful
          @Name(KKNames.SOCIETIES_MANAGEMENT_ACTION)
          @Restrict("#{identity.loggedIn}")
          public class SocietiesManagementAction implements SocietiesManagement {

                  public SocietiesManagementAction(){
                          super();
                  }
                 
          //      @In(value = KKNames.AM_SM_KIOSK)
          //      private AM_SM_Kiosk kiosk;
                  /*
                   * (non-Javadoc)
                   * @see fr.qualigraf.kiosk.kernel.UI.societiesManagement.SocietiesManagement#getSocieties()
                   */
                  public List<AM_SM_SocietyTree> getSocieties() throws UI_CantConnectLDAPException, UI_NonManagedLDAPException{
          //              try {
          //                      return kiosk.getSocieties();
          //              } catch (UM_CantConnectLDAPException e) {
          //                      throw new UI_CantConnectLDAPException(LDAPUtils.currentUrl, LDAPUtils.currentUserDN, LDAPUtils.currentBase);
          //              } catch (UM_NonManagedLDAPErrorException e) {
          //                      throw new UI_NonManagedLDAPException(e.getMessage());
          //              } catch (UM_InvalidDNException e) {
          //                      e.printStackTrace();
          //              } catch (UM_InvalidRoleException e) {
          //                      e.printStackTrace();
          //              } catch (UM_NotEnoughRightsException e) {
          //                      e.printStackTrace();
          //              }
                          return null;
                         
                  }
                 
                  public String getTruc(){
                          return "test is ok";
                  }
                 
                  @End
                  public void cancel() {;}

                  @Remove
                  public void destroy() {;}
          }





          the associated interface :
          @Local
          public interface SocietiesManagement {

                  public List<AM_SM_SocietyTree> getSocieties() throws UI_CantConnectLDAPException, UI_NonManagedLDAPException;
                  public String getTruc();
                  public void cancel();
                  public void destroy();
          }

          my .xhtml

          <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
              "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
          <ui:composition xmlns="http://www.w3.org/1999/xhtml"
                  xmlns:s="http://jboss.com/products/seam/taglib"
                  xmlns:ui="http://java.sun.com/jsf/facelets"
                  xmlns:f="http://java.sun.com/jsf/core"
                  xmlns:h="http://java.sun.com/jsf/html"
                  xmlns:rich="http://richfaces.org/rich"
                  template="layout/templateSocietiesManagement.xhtml">

                  <ui:define name="body">
             <h:form> 

                          
                           <h:outputText value="#{SocietiesManagementAction.truc}" />
            </h:form>
           
                  </ui:define>
                 
          </ui:composition>

          on the load of jboss i've
          Component: SocietiesManagementAction, scope: CONVERSATION, type: STATEFUL_SESSION_BEAN, class: fr.qualigraf.kiosk.kernel.UI.societiesManagement.SocietiesManagementAction, JNDI: kiosk/SocietiesManagementAction/local

          i've some comments on my class, for testing

          so anyone can help me please?
          i'm trying to enable stateful since yesterday and i got bored...

          Thanks by advance

          • 2. Re: EJB not bound
            tom til Newbie


            Hello,
            
            i've a problem that drives me crazy
            
            i'm using seam 2.1.2 with jboss-5.1.0.GA
            my project is deploy as a .war
            
            the interesting part of my stack trace is :
            
            
            
             Exception during request processing:
            Caused by javax.servlet.ServletException with message: "Could not instantiate Seam component: SocietiesManagementAction" 
             
            
            
            and
            
            
            
             Caused by: javax.naming.NameNotFoundException: kiosk not bound 
            
            
            
            I'm trying to use a Stateful / or a staless bean, but i've always a Caused by: javax.naming.NameNotFoundException: kiosk not bound
            
            
            
             the interesting part of my component.xml :
               <core:init debug="true" jndiPattern="kiosk/#{ejbName}/local" distributable="true"/>
            i replace @jndipattern@ by kiosk/#{ejbName}/local, no result.. 
            
            
            
            my SocietiesManagementAction
            
            
             
            @Stateful
            @Name(KKNames.SOCIETIES_MANAGEMENT_ACTION)
            @Restrict("#{identity.loggedIn}")
            public class SocietiesManagementAction implements SocietiesManagement {
            
                 public SocietiesManagementAction(){
                      super();
                 }
                 
            //     @In(value = KKNames.AM_SM_KIOSK)
            //     private AM_SM_Kiosk kiosk;
                 /*
                  * (non-Javadoc)
                  * @see fr.qualigraf.kiosk.kernel.UI.societiesManagement.SocietiesManagement#getSocieties()
                  */
                 public List<AM_SM_SocietyTree> getSocieties() throws UI_CantConnectLDAPException, UI_NonManagedLDAPException{
            //          try {
            //               return kiosk.getSocieties();
            //          } catch (UM_CantConnectLDAPException e) {
            //               throw new UI_CantConnectLDAPException(LDAPUtils.currentUrl, LDAPUtils.currentUserDN, LDAPUtils.currentBase);
            //          } catch (UM_NonManagedLDAPErrorException e) {
            //               throw new UI_NonManagedLDAPException(e.getMessage());
            //          } catch (UM_InvalidDNException e) {
            //               e.printStackTrace();
            //          } catch (UM_InvalidRoleException e) {
            //               e.printStackTrace();
            //          } catch (UM_NotEnoughRightsException e) {
            //               e.printStackTrace();
            //          }
                      return null;
                      
                 }
                 
                 public String getTruc(){
                      return "test is ok";
                 }
                 
                 @End
                 public void cancel() {;}
            
                 @Remove
                 public void destroy() {;}
            } 
            
            
            
            
            
             the associated interface :
            @Local
            public interface SocietiesManagement {
            
                 public List<AM_SM_SocietyTree> getSocieties() throws UI_CantConnectLDAPException, UI_NonManagedLDAPException;
                 public String getTruc();
                 public void cancel();
                 public void destroy();
            } 
            
            
            
            my .xhtml
            
            
             
            <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
                "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
            <ui:composition xmlns="http://www.w3.org/1999/xhtml"
                 xmlns:s="http://jboss.com/products/seam/taglib"
                 xmlns:ui="http://java.sun.com/jsf/facelets"
                 xmlns:f="http://java.sun.com/jsf/core"
                 xmlns:h="http://java.sun.com/jsf/html"
                 xmlns:rich="http://richfaces.org/rich"
                 template="layout/templateSocietiesManagement.xhtml">
            
                 <ui:define name="body">
               <h:form>  
            
                       
                       <h:outputText value="#{SocietiesManagementAction.truc}" />
              </h:form>
              
                 </ui:define>
                 
            </ui:composition>
             
            
            
            on the load of jboss i've
            14:26:00,792 INFO  [STDOUT] 14:26:00,792 INFO  [Component] Component: SocietiesManagementAction, scope: CONVERSATION, type: STATEFUL_SESSION_BEAN, class: fr.qualigraf.kiosk.kernel.UI.societiesManagement.SocietiesManagementAction, JNDI: kiosk/SocietiesManagementAction/local
            
            
            i've some comments on my class, for testing
            
            
            so anyone can help me please?
            i'm trying to enable stateful since yesterday and i got bored...
            
            Thanks by advance