-
Bug
-
Resolution: Done
-
Major
-
None
-
None
-
None
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