7 Replies Latest reply on Sep 25, 2007 5:05 PM by dhinojosa

    Could not instantiate Seam component :/

    yacho

      OK so heres another problem i stumbled upon :

      i Have statefull Session bean that defines my component

      i get the following error when executing #{userManager(newUser)} :

      21:46:24,625 WARN [lifecycle] Could not instantiate Seam component: userManager
      org.jboss.seam.InstantiationException: Could not instantiate Seam component: userManager
      at org.jboss.seam.Component.newInstance(Component.java:1853)


      even trough it deploys ok and its loaded :
      21:44:43,625 INFO [Component] Component: userManager, scope: EVENT, type: STATEFUL_SESSION_BEAN, class: sessionbeans.UserManagerBean, JNDI: \UserManagerBean/local


      My Session Bean looks like this :
      @Stateful
      @Name("userManager")
      @Scope(EVENT)
      
      public class UserManagerBean implements UserManager, Serializable {
      
       @PersistenceContext
       EntityManager em;
      
       @In
       public String register(User newUser) {
       User existing = (User) em.createQuery("from User where username={#newUser.username} and passwd={#newUser.passwd}").getSingleResult();
      
       if (existing != null) {
       em.persist(newUser);
      
       return "registered";
       } else {
       return null;
       }
      
       }
       @Remove
       public void destroy() {}


      It Seems to be ok - so wheres the fuss ?
      is the JNDI path correct ? because im a bit confused about the slashes :/