Uploaded image for project: 'JBoss Developer Materials'
  1. JBoss Developer Materials
  2. JDF-104

jboss-javaee6-webapp quickstart - HTTP 500 after trying to register a member with the existing e-mail

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • None
    • None
    • quickstarts
    • None
    • Hide

      1. register the member
      2. register him once again
      3. see the error

      Show
      1. register the member 2. register him once again 3. see the error

      I am doing functional tests for quickstart applications generated from archetypes located here: https://github.com/jboss-jdf/jboss-as-archetype. The quickstart application crashes after trying to register an user with the e-mail address which already exists from the previous member registration. HTTP code 500 and exception stack of AS is shown to me. This issue is solved in other examples by showing of appropriate error message right to the registration button.

      This bug holds for ear version of the archetype as well.

      exception
      
      javax.servlet.ServletException: javax.ejb.EJBException: javax.persistence.PersistenceException: org.hibernate.exception.ConstraintViolationException: Unique index or primary key violation: "CONSTRAINT_INDEX_8 ON PUBLIC.MEMBER(EMAIL)"; SQL statement:
      insert into Member (email, name, phone_number, id) values (?, ?, ?, ?) [23505-161]
      	javax.faces.webapp.FacesServlet.service(FacesServlet.java:606)
      	org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:62)
      root cause
      
      javax.faces.el.EvaluationException: javax.ejb.EJBException: javax.persistence.PersistenceException: org.hibernate.exception.ConstraintViolationException: Unique index or primary key violation: "CONSTRAINT_INDEX_8 ON PUBLIC.MEMBER(EMAIL)"; SQL statement:
      insert into Member (email, name, phone_number, id) values (?, ?, ?, ?) [23505-161]
      	javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:102)
      	com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
      	javax.faces.component.UICommand.broadcast(UICommand.java:315)
      	javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:794)
      	javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1259)
      	com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81)
      	com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
      	com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
      	javax.faces.webapp.FacesServlet.service(FacesServlet.java:593)
      	org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:62)
      root cause
      

            rafabene_jira Rafael Benevides (Inactive)
            smikloso Stefan Miklosovic (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: