2 Replies Latest reply on May 21, 2007 4:56 PM by grettke_spdr

    Can't deploy Stateless bean?

    grettke_spdr

      Hi folks,

      I'm working on a prototype in Seam 1.2.1 and JBoss 4.0.5GA using EJB3.

      So far I've only written Stateful beans. Today I wrote a Stateless bean and when I tried deploying the app it failed with the error message:

      java.lang.RuntimeException: Could not create Component: policyHolderDao

      I can see that the class file is in the ear. For that bean it has a @Local interface and the bean is marked as @Stateless.

      What am I doing wrong here?

        • 1. Re: Can't deploy Stateless bean?
          michael.c.small

          Can you post your stateless bean?

          • 2. Re: Can't deploy Stateless bean?
            grettke_spdr

             

            Can you post your stateless bean?


            Definitely:

            @Local
            public interface PolicyHolderDAO {
             public List<SearchResultDTO> searchOnName(String name);
             public void destroy();
            }
            


            @Stateless
            @Name("policyHolderDao")
            public class PolicyHolderDAOImpl implements PolicyHolderDAO {
            
             @Logger
             private Log log;
            
             @PersistenceContext
             EntityManager em;
            
             public List<SearchResultDTO> searchOnName(String name) {
             List<SearchResultDTO> results = new ArrayList<SearchResultDTO>();
             return results;
             }
            
             @Destroy
             @Remove()
             public void destroy() {
             }
            }