]
Stuart Douglas commented on WFLY-2118:
--------------------------------------
I wonder if we should change this behaviour? The intention was to make development easier,
as you can see stack traces if you are working on localhost (and there are no proxy
headers), but it could be confusing as it overrides the default error page.
PersistenceException breaks default error page
----------------------------------------------
Key: WFLY-2118
URL:
https://issues.jboss.org/browse/WFLY-2118
Project: WildFly
Issue Type: Bug
Components: Web (Undertow)
Reporter: Juergen Zimmermann
Assignee: Stuart Douglas
Attachments: mojarra-2.1.zip, testcase-WFLY-2118.zip
I'm using the latest WildFly snapshot with Undertow 1.0.0.Beta13. When I get a
PersistenceException caused by Hibernate due to an invalid entity (according to Bean
Validation), then the webbrowser doesn't get the default error page. The stacktrace is
shown below. I'll attach a testcase.
{code}
[com.arjuna.ats.arjuna] ARJUNA012125: TwoPhaseCoordinator.beforeCompletion - failed for
SynchronizationImple< 0:ffffc0a8b801:4240ead4:523ac52c:15,
org.hibernate.engine.transaction.synchronization.internal.RegisteredSynchronization@20cf7473
>: javax.persistence.PersistenceException: error during managed flush
at
org.hibernate.jpa.spi.AbstractEntityManagerImpl$CallbackExceptionMapperImpl.mapManagedFlushFailure(AbstractEntityManagerImpl.java:1785)
[hibernate-entitymanager-4.3.0.Beta4.jar:4.3.0.Beta4]
at
org.hibernate.engine.transaction.synchronization.internal.SynchronizationCallbackCoordinatorImpl.beforeCompletion(SynchronizationCallbackCoordinatorImpl.java:118)
[hibernate-core-4.3.0.Beta4.jar:4.3.0.Beta4]
at
org.hibernate.engine.transaction.synchronization.internal.RegisteredSynchronization.beforeCompletion(RegisteredSynchronization.java:53)
[hibernate-core-4.3.0.Beta4.jar:4.3.0.Beta4]
at
com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.beforeCompletion(SynchronizationImple.java:76)
[narayana-jts-jacorb-5.0.0.M4.jar:5.0.0.M4 (revision: ${buildNumber})]
at
com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.beforeCompletion(TwoPhaseCoordinator.java:273)
[narayana-jts-jacorb-5.0.0.M4.jar:5.0.0.M4 (revision: ${buildNumber})]
at
com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:93)
[narayana-jts-jacorb-5.0.0.M4.jar:5.0.0.M4 (revision: ${buildNumber})]
at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:162)
[narayana-jts-jacorb-5.0.0.M4.jar:5.0.0.M4 (revision: ${buildNumber})]
at
com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1170)
[narayana-jts-jacorb-5.0.0.M4.jar:5.0.0.M4 (revision: ${buildNumber})]
at
com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:126)
[narayana-jts-jacorb-5.0.0.M4.jar:5.0.0.M4 (revision: ${buildNumber})]
at
com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:75)
at
com.arjuna.ats.jta.cdi.transactional.TransactionalInterceptorBase.endTransaction(TransactionalInterceptorBase.java:131)
[narayana-jts-jacorb-5.0.0.M4.jar:5.0.0.M4 (revision: ${buildNumber})]
at
com.arjuna.ats.jta.cdi.transactional.TransactionalInterceptorBase.invokeInOurTx(TransactionalInterceptorBase.java:77)
[narayana-jts-jacorb-5.0.0.M4.jar:5.0.0.M4 (revision: ${buildNumber})]
at
com.arjuna.ats.jta.cdi.transactional.TransactionalInterceptorRequired.intercept(TransactionalInterceptorRequired.java:52)
[narayana-jts-jacorb-5.0.0.M4.jar:5.0.0.M4 (revision: ${buildNumber})]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_40]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
[rt.jar:1.7.0_40]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[rt.jar:1.7.0_40]
at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_40]
at
org.jboss.weld.interceptor.proxy.SimpleMethodInvocation.invoke(SimpleMethodInvocation.java:30)
[weld-core-impl-2.1.0.Beta1.jar:2013-09-05 17:01]
at
org.jboss.weld.interceptor.chain.AbstractInterceptionChain.invokeNext(AbstractInterceptionChain.java:90)
[weld-core-impl-2.1.0.Beta1.jar:2013-09-05 17:01]
at
org.jboss.weld.interceptor.chain.AbstractInterceptionChain.invokeNextInterceptor(AbstractInterceptionChain.java:75)
[weld-core-impl-2.1.0.Beta1.jar:2013-09-05 17:01]
at
org.jboss.weld.interceptor.proxy.InterceptorMethodHandler.executeInterception(InterceptorMethodHandler.java:48)
[weld-core-impl-2.1.0.Beta1.jar:2013-09-05 17:01]
at
org.jboss.weld.interceptor.proxy.InterceptorMethodHandler.invoke(InterceptorMethodHandler.java:41)
[weld-core-impl-2.1.0.Beta1.jar:2013-09-05 17:01]
at
org.jboss.weld.bean.proxy.CombinedInterceptorAndDecoratorStackMethodHandler.invoke(CombinedInterceptorAndDecoratorStackMethodHandler.java:53)
[weld-core-impl-2.1.0.Beta1.jar:2013-09-05 17:01]
at testcase.web.CustomerModel$Proxy$_$$_WeldSubclass.create(Unknown Source) [classes:]
at testcase.web.CustomerModel$Proxy$_$$_WeldClientProxy.create(Unknown Source)
[classes:]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_40]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
[rt.jar:1.7.0_40]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[rt.jar:1.7.0_40]
at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_40]
at javax.el.ELUtil.invokeMethod(ELUtil.java:326) [javax.el-3.0-b07.jar:3.0-b07]
at javax.el.BeanELResolver.invoke(BeanELResolver.java:536)
[javax.el-3.0-b07.jar:3.0-b07]
at javax.el.CompositeELResolver.invoke(CompositeELResolver.java:256)
[javax.el-3.0-b07.jar:3.0-b07]
at com.sun.el.parser.AstValue.invoke(AstValue.java:269) [javax.el-3.0-b07.jar:3.0-b07]
at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:304)
[javax.el-3.0-b07.jar:3.0-b07]
at
org.jboss.weld.util.el.ForwardingMethodExpression.invoke(ForwardingMethodExpression.java:40)
[weld-core-impl-2.1.0.Beta1.jar:2013-09-05 17:01]
at org.jboss.weld.el.WeldMethodExpression.invoke(WeldMethodExpression.java:50)
[weld-core-impl-2.1.0.Beta1.jar:2013-09-05 17:01]
at
org.jboss.weld.util.el.ForwardingMethodExpression.invoke(ForwardingMethodExpression.java:40)
[weld-core-impl-2.1.0.Beta1.jar:2013-09-05 17:01]
at org.jboss.weld.el.WeldMethodExpression.invoke(WeldMethodExpression.java:50)
[weld-core-impl-2.1.0.Beta1.jar:2013-09-05 17:01]
at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105)
[jsf-impl-2.1.26.jar:2.1.26]
at
javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:87)
[jsf-api-2.1.26.jar:2.1]
at
com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:101)
[jsf-impl-2.1.26.jar:2.1.26]
at javax.faces.component.UICommand.broadcast(UICommand.java:315)
[jsf-api-2.1.26.jar:2.1]
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:786)
[jsf-api-2.1.26.jar:2.1]
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1251)
[jsf-api-2.1.26.jar:2.1]
at
com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81)
[jsf-impl-2.1.26.jar:2.1.26]
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) [jsf-impl-2.1.26.jar:2.1.26]
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
[jsf-impl-2.1.26.jar:2.1.26]
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593)
[jsf-api-2.1.26.jar:2.1]
at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:87)
[undertow-servlet-1.0.0.Beta13.jar:1.0.0.Beta13]
at
io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:59)
[undertow-servlet-1.0.0.Beta13.jar:1.0.0.Beta13]
at
io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
[undertow-servlet-1.0.0.Beta13.jar:1.0.0.Beta13]
at
org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:81)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25)
[undertow-core-1.0.0.Beta13.jar:1.0.0.Beta13]
at
io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:113)
[undertow-servlet-1.0.0.Beta13.jar:1.0.0.Beta13]
at
io.undertow.security.handlers.AuthenticationCallHandler.handleRequest(AuthenticationCallHandler.java:52)
[undertow-core-1.0.0.Beta13.jar:1.0.0.Beta13]
at
io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:45)
[undertow-core-1.0.0.Beta13.jar:1.0.0.Beta13]
at
io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:58)
[undertow-core-1.0.0.Beta13.jar:1.0.0.Beta13]
at
io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:65)
[undertow-servlet-1.0.0.Beta13.jar:1.0.0.Beta13]
at
io.undertow.security.handlers.SecurityInitialHandler.handleRequest(SecurityInitialHandler.java:70)
[undertow-core-1.0.0.Beta13.jar:1.0.0.Beta13]
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25)
[undertow-core-1.0.0.Beta13.jar:1.0.0.Beta13]
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25)
[undertow-core-1.0.0.Beta13.jar:1.0.0.Beta13]
at
io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:209)
[undertow-servlet-1.0.0.Beta13.jar:1.0.0.Beta13]
at
io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:196)
[undertow-servlet-1.0.0.Beta13.jar:1.0.0.Beta13]
at
io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:69)
[undertow-servlet-1.0.0.Beta13.jar:1.0.0.Beta13]
at
io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:130)
[undertow-servlet-1.0.0.Beta13.jar:1.0.0.Beta13]
at io.undertow.server.HttpHandlers.executeRootHandler(HttpHandlers.java:36)
[undertow-core-1.0.0.Beta13.jar:1.0.0.Beta13]
at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:614)
[undertow-core-1.0.0.Beta13.jar:1.0.0.Beta13]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
[rt.jar:1.7.0_40]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
[rt.jar:1.7.0_40]
at java.lang.Thread.run(Thread.java:724) [rt.jar:1.7.0_40]
Caused by: javax.validation.ConstraintViolationException: Validation failed for classes
[testcase.domain.Customer] during persist time for groups
[javax.validation.groups.Default, ]
List of constraint violations:[
ConstraintViolationImpl{interpolatedMessage='Min length = 2, max length = 32',
propertyPath=name, rootBeanClass=class testcase.domain.Customer, messageTemplate='Min
length = {min}, max length = {max}'}
ConstraintViolationImpl{interpolatedMessage='Zip code is 5 digits',
propertyPath=zip, rootBeanClass=class testcase.domain.Customer, messageTemplate='Zip
code is 5 digits'}
ConstraintViolationImpl{interpolatedMessage='A name must have one capital letter,
followed by small letters', propertyPath=name, rootBeanClass=class
testcase.domain.Customer, messageTemplate='A name must have one capital letter,
followed by small letters'}
]
at
org.hibernate.cfg.beanvalidation.BeanValidationEventListener.validate(BeanValidationEventListener.java:159)
[hibernate-core-4.3.0.Beta4.jar:4.3.0.Beta4]
at
org.hibernate.cfg.beanvalidation.BeanValidationEventListener.onPreInsert(BeanValidationEventListener.java:94)
[hibernate-core-4.3.0.Beta4.jar:4.3.0.Beta4]
at
org.hibernate.action.internal.EntityInsertAction.preInsert(EntityInsertAction.java:196)
[hibernate-core-4.3.0.Beta4.jar:4.3.0.Beta4]
at org.hibernate.action.internal.EntityInsertAction.execute(EntityInsertAction.java:96)
[hibernate-core-4.3.0.Beta4.jar:4.3.0.Beta4]
at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:377)
[hibernate-core-4.3.0.Beta4.jar:4.3.0.Beta4]
at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:369)
[hibernate-core-4.3.0.Beta4.jar:4.3.0.Beta4]
at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:286)
[hibernate-core-4.3.0.Beta4.jar:4.3.0.Beta4]
at
org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:340)
[hibernate-core-4.3.0.Beta4.jar:4.3.0.Beta4]
at
org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:52)
[hibernate-core-4.3.0.Beta4.jar:4.3.0.Beta4]
at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1235)
[hibernate-core-4.3.0.Beta4.jar:4.3.0.Beta4]
at org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:405)
[hibernate-core-4.3.0.Beta4.jar:4.3.0.Beta4]
at
org.hibernate.engine.transaction.synchronization.internal.SynchronizationCallbackCoordinatorImpl.beforeCompletion(SynchronizationCallbackCoordinatorImpl.java:113)
[hibernate-core-4.3.0.Beta4.jar:4.3.0.Beta4]
... 68 more
{code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: