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)} :
anonymous wrote : 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 :
anonymous wrote : 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 :/

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4088559#4088559

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4088559
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to