4 Replies Latest reply on Jun 12, 2009 2:08 PM by Arvinder Singh

    Faces Event > EJBTransactionRolledbackException > @In attribute requires non-null value

    Arvinder Singh Novice


      I am following the examples from seam in action (www.manning.com/dallen) and am using an ear deployment instead of war.
      What I have here is a simple registration example, that used faces events to validate a field when an event is raised, like tab over the field.

      In summary, the main difference is that I am deploying this in an ear and I am not sure why this error is occuring - I have
      looked in the formums and tried adding this to the action, but nothing has worked:

      @In(create = true,required=true)
          protected PasswordBean passwordBean = new PasswordBean();


      public class RegisterBean implements Register {
          private Log log;
          StatusMessages statusMessages;
          private Member newMember;
          private EntityManager entityManager;
          protected MemberValidator memberValidator;
          protected PasswordManager passwordManager;
          @In(create = true,required=true)
          protected PasswordBean passwordBean = new PasswordBean();
          private FacesMessages facesMessages;
          public String register() {
              return "success";
          public boolean isUsernameAvailable(String username) {
              log.info("Checking if username is available " + username);
              return entityManager.createQuery(
                      "select m from Member m where m.username = :username")
                      .setParameter("username", username)
                      .getResultList().size() == 0;
          public boolean isEmailRegistered(String email) {
              return entityManager.createQuery(
                      "select m from Member m where m.email = :email")
                      .setParameter("email", email)
                      .getResultList().size() > 0;
          public void verifyUsernameAvailable(ValueChangeEvent e) {
              String username = (String) e.getNewValue();
              if (!isUsernameAvailable(username)) {
                          "Sorry, username already taken");
          public void checkEmailRegistered(ValueChangeEvent e) {
              String email = (String) e.getNewValue();
              if (isEmailRegistered(email)) {
                          "Sorry, email address is already registered");


      08:40:07,016 ERROR [STDERR] 12-Jun-2009 08:40:07 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
      INFO: Added Library from: jar:file:/C:/projects/jboss-4.2.3.GA/server/default/deploy/example.ear/example.war/WEB-INF/li
      08:40:18,813 ERROR [AjaxViewRoot] Error processing faces event for the component registerActionForm:usernameField:username
      javax.faces.event.AbortProcessingException: /register.xhtml @28,65 valueChangeListener="#{register.verifyUsernameAvailable}":
      javax.ejb.EJBTransactionRolledbackException: @In attribute requires non-null value: register.passwordBean
              at javax.faces.event.MethodExpressionValueChangeListener.processValueChange

      Auth Package


      @Namespace(value = "http://example.org/components/auth", prefix = "org.example.auth")
      package com.example.app.ex.auth;
      import org.jboss.seam.annotations.AutoCreate;
      import org.jboss.seam.annotations.Namespace;


      public class PasswordBean {
              private String password;
              private String confirm;
              public String getPassword() {
                      return password;
              public void setPassword(String password) {
                      this.password = password;
              public String getConfirm() {
                      return confirm;
              public void setConfirm(String confirm) {
                      this.confirm = confirm;
              public boolean verify() {
                      return confirm != null && confirm.equals(password);


       <auth:password-bean name="passwordBean" scope="event"/>