0 Replies Latest reply on Dec 20, 2007 4:00 PM by Dan Florian

    Problem Using Session Bean In A Simple Seam Web Project

    Dan Florian Newbie

      I'm using Red Hat Develop Studio 1.0.0 CR1 and am new to web development so I'm sure there is a simple solution. These steps recreate the problem:

      1. File -> New -> New Seam Web Project (using all defaults)
      2. New -> Seam Action. This creates a session bean/seam action and an xhtml page containing a command button referencing the action method. I named the seam component "register" and the Java class "Register."
      3. Modified "index.html" so that the home page of the project is this new xhtml page
      4. In session bean/action class added "@Stateful" and "@Scope(ScopeType.SESSION)" tags and made class Serializable
      5. In session bean/action class added "@Destroy" and "@Remove" tags to new method "destroy()"
      6. Refactored out an interface, added "@Local" tag to the interface
      7. Select project -> Run As -> Run on Server
      8. Noticed this in console log: [Component] Component: register, scope: CONVERSATION, type: STATEFUL_SESSION_BEAN, class: org.domain.simple.session.Register, JNDI: Register/local
      9. On web page that displays, hit the command button referencing the session bean/action method and get the following error:
      - org.jboss.seam.InstantiationException: Could not instantiate Seam component: register
      Caused by: javax.naming.NameNotFoundException: Register not bound
      10. I have not changed any configuration file other than "index.html." So the components.properties value for "jndiPattern" is still "#{ejbName}/local"

      Thanks for any help you can provide.