[jboss-user] [JBoss Seam] - Newbie at Seam: Can not access Sessionbean from Servlet

joerg.pfruender do-not-reply at jboss.com
Sat Mar 31 09:18:29 EDT 2007


I have deployed the tutorials and tried to generate own beans with the Eclipse Hibernate Tools. The Webapp works fine, I can create and find records in the database. There is only one ugly error in the log: "StateManager" not yet installed. I do not know if this is critical.
Then I tried to write an own Servlet where I wanted to use the sessionbeans, but I always get a javax.naming.NameNotFoundException.

The Bean is registered, I can use it with the JSP pages and I can see it in the JMX-Console:

anonymous wrote : 
  |   |   +- SessionEditorBean (class: org.jnp.interfaces.NamingContext)
  |   |   |   +- localStatefulProxyFactory (class: org.jboss.ejb3.stateful.StatefulLocalProxyFactory)
  |   |   |   +- local (class: java.lang.Object)

My code:

InitialContext ic= new InitialContext();
  | bean = ic.lookup("seamapp/sessionEditor/local");

  | @Stateful
  | @Interceptors(SeamInterceptor.class)
  | public class SessionEditorBean implements SessionEditor {
  |   ...
  | }

I have tried the Bean's classname as JNDI name but it didn't help. Has anyone an idea?
Thank you very much.
Jörganonymous wrote : 

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

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4033442

More information about the jboss-user mailing list