0 Replies Latest reply on Nov 19, 2007 5:23 PM by gopala Krishna Manchukonda

    NameNotFound Exception error when stateless EJB deployed in

    gopala Krishna Manchukonda Newbie

      Hi,
      I am deploying EJB3.0 stateless session bean in JBoss on Linux.
      But, client is getting JNDI NameNotFoundException when trying to lookup.


      Looks like only the local interface is bind to JNDI tree when deployed on Linux.

      jboss-4.2.1.GA

      These are the classes:

      ExternalSearchService.java

      package com.attomic.infoservices.common;

      import java.util.List;
      import java.util.Map;

      import javax.ejb.Remote;


      @Remote
      public interface ExternalSearchService {
      public List search(String args,int linkCount,String searchSource,Map params)throws ExternalSearchServiceException;
      }


      ExternalSearchServiceBean.java

      package com.attomic.infoservices.services;

      import java.util.List;
      import java.util.Map;

      import javax.ejb.Remote;
      import javax.ejb.Stateless;
      import org.jboss.annotation.ejb.Clustered;
      import org.jboss.annotation.ejb.RemoteBinding;

      import com.attomic.infoservices.common.ExternalSearchService;
      import com.attomic.infoservices.common.ExternalSearchServiceException;
      import com.attomic.infoservices.external.ExternalSearchInterfaceFactory;


      @Clustered
      @Stateless

      @Remote ({ExternalSearchService.class})
      @RemoteBinding (jndiBinding="services/ExternalSearchServiceRemote")
      public class ExternalSearchServiceBean implements ExternalSearchService{

      public List search(String args,int linkCount,String searchSource,Map params)throws ExternalSearchServiceException{
      try{
      return ExternalSearchInterfaceFactory.search(args, linkCount, searchSource, params);
      }catch(Throwable t){
      throw new ExternalSearchServiceException(t);
      }
      }
      }



      deployed jar file contains:

      ExternalSearchService.class
      ExternalSearchServiceBean.class
      ExternalSearchServiceException.class
      SearchResultElement.class


      please let me know if you need the jboss log for reference.
      This is intended to work in a Jboss cluster. It works fine on Windows XP but not on Linux.


      Regards
      Gopal