-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
Labels
area/hibernate-validatorHibernate ValidatorHibernate Validatorkind/bugSomething isn't workingSomething isn't working
Milestone
Description
Describe the bug
Bean Validation annotations in JSF beans (via quarkus-myfaces extension) appear to be broken since 3.24.1 as long as quarkus-hibernate-orm is also present. Strangely, it does work in 3.24.0, but appears broken in at least 3.25.4, 3.26.1, 3.26.2 and 3.26.3. If quarkus-hibernate-orm is not present, then Bean Validation works fine in current 3.26.3. To be clear, I am not doing any JPA operations, it's just the fact that Hibernate ORM is present in the application that causes the breakage.
Expected behavior
Bean Validation annotations on a field are processed.
Actual behavior
2025-09-10 06:17:51,712 SEVERE [org.apa.myf.con.AjaxExceptionHandlerImpl] (executor-thread-1) jakarta.validation.ValidationException occurred while processing PROCESS_VALIDATIONS [Location=]: jakarta.validation.ValidationException: HV000041: Call to TraversableResolver.isReachable() threw an exception.
at org.hibernate.validator.internal.engine.ValidatorImpl.isReachable(ValidatorImpl.java:1350)
at org.hibernate.validator.internal.engine.ValidatorImpl.isValidationRequired(ValidatorImpl.java:1325)
at org.hibernate.validator.internal.engine.ValidatorImpl.validateMetaConstraint(ValidatorImpl.java:583)
at org.hibernate.validator.internal.engine.ValidatorImpl.validateConstraintsForSingleDefaultGroupElement(ValidatorImpl.java:543)
at org.hibernate.validator.internal.engine.ValidatorImpl.validateConstraintsForDefaultGroup(ValidatorImpl.java:512)
at org.hibernate.validator.internal.engine.ValidatorImpl.validateConstraintsForCurrentGroup(ValidatorImpl.java:448)
at org.hibernate.validator.internal.engine.ValidatorImpl.validateValueInContext(ValidatorImpl.java:831)
at org.hibernate.validator.internal.engine.ValidatorImpl.validateValue(ValidatorImpl.java:219)
at jakarta.faces.validator.BeanValidator.validate(BeanValidator.java:213)
at org.apache.myfaces.core.api.shared.ComponentUtils.callValidators(ComponentUtils.java:245)
at jakarta.faces.component.UIInput.validateValue(UIInput.java:463)
at jakarta.faces.component.UIInput.validate(UIInput.java:717)
at jakarta.faces.component.UIInput.processValidators(UIInput.java:297)
at jakarta.faces.component.UIForm.processValidators(UIForm.java:200)
at org.apache.myfaces.context.servlet.PartialViewContextImpl$PhaseAwareVisitCallback.visit(PartialViewContextImpl.java:721)
at org.apache.myfaces.component.visit.PartialVisitContext.invokeVisitCallback(PartialVisitContext.java:226)
at jakarta.faces.component.UIForm.visitTree(UIForm.java:312)
at jakarta.faces.component.UIComponent.visitTree(UIComponent.java:908)
at jakarta.faces.component.UIComponentBase.visitTree(UIComponentBase.java:1120)
at jakarta.faces.component.UIComponent.visitTree(UIComponent.java:908)
at jakarta.faces.component.UIComponentBase.visitTree(UIComponentBase.java:1120)
at org.apache.myfaces.context.servlet.PartialViewContextImpl.processPartialExecute(PartialViewContextImpl.java:411)
at org.apache.myfaces.context.servlet.PartialViewContextImpl.processPartial(PartialViewContextImpl.java:392)
at jakarta.faces.component.UIViewRoot$ProcessValidatorPhaseProcessor.process(UIViewRoot.java:1859)
at jakarta.faces.component.UIViewRoot._process(UIViewRoot.java:1716)
at jakarta.faces.component.UIViewRoot.processValidators(UIViewRoot.java:975)
at org.apache.myfaces.lifecycle.ProcessValidationsExecutor.execute(ProcessValidationsExecutor.java:39)
at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:172)
at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:125)
at jakarta.faces.webapp.FacesServlet.service(FacesServlet.java:223)
at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:74)
at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:63)
at io.undertow.servlet.handlers.ServletChain$1.handleRequest(ServletChain.java:68)
at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
at io.undertow.servlet.handlers.RedirectDirHandler.handleRequest(RedirectDirHandler.java:67)
at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:133)
at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:65)
at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)
at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)
at io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50)
at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:247)
at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:111)
at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:108)
at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)
at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
at io.quarkus.undertow.runtime.UndertowDeploymentRecorder$8$1.call(UndertowDeploymentRecorder.java:643)
at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:227)
at io.undertow.servlet.handlers.ServletInitialHandler.handleRequest(ServletInitialHandler.java:152)
at io.undertow.server.handlers.CanonicalPathHandler.handleRequest(CanonicalPathHandler.java:49)
at io.quarkus.undertow.runtime.UndertowDeploymentRecorder$1.handleRequest(UndertowDeploymentRecorder.java:126)
at io.undertow.server.Connectors.executeRootHandler(Connectors.java:284)
at io.undertow.server.DefaultExchangeHandler.handle(DefaultExchangeHandler.java:18)
at io.quarkus.undertow.runtime.UndertowDeploymentRecorder$4$2.run(UndertowDeploymentRecorder.java:443)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:545)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:328)
at io.quarkus.vertx.core.runtime.VertxCoreRecorder$15.runWith(VertxCoreRecorder.java:637)
at org.jboss.threads.EnhancedQueueExecutor$Task.doRunWith(EnhancedQueueExecutor.java:2651)
at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2630)
at org.jboss.threads.EnhancedQueueExecutor.runThreadBody(EnhancedQueueExecutor.java:1622)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1589)
at org.jboss.threads.DelegatingRunnable.run(DelegatingRunnable.java:11)
at org.jboss.threads.ThreadLocalResettingRunnable.run(ThreadLocalResettingRunnable.java:11)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Thread.java:1447)
Caused by: java.lang.NullPointerException: Cannot invoke "Object.getClass()" because "entity" is null
at org.hibernate.jpa.internal.util.PersistenceUtilHelper.getAttributeValue(PersistenceUtilHelper.java:215)
at org.hibernate.jpa.internal.util.PersistenceUtilHelper.isLoadedWithReference(PersistenceUtilHelper.java:207)
at io.quarkus.hibernate.orm.runtime.ProviderUtil.isLoadedWithReference(ProviderUtil.java:18)
at io.quarkus.hibernate.orm.runtime.HibernateOrmRecorder$IsAttributeLoadedPredicate.test(HibernateOrmRecorder.java:274)
at io.quarkus.hibernate.orm.runtime.HibernateOrmRecorder$IsAttributeLoadedPredicate.test(HibernateOrmRecorder.java:263)
at io.quarkus.hibernate.validator.runtime.HibernateValidatorRecorder$DelegatingTraversableResolver.isReachable(HibernateValidatorRecorder.java:309)
at org.hibernate.validator.internal.engine.resolver.CachingTraversableResolverForSingleValidation.isReachable(CachingTraversableResolverForSingleValidation.java:36)
at org.hibernate.validator.internal.engine.ValidatorImpl.isReachable(ValidatorImpl.java:1341)
... 69 more
How to Reproduce?
Reproducer attached, run the app with quarkus:dev , visit http://localhost:8080/index.xhtml and just press submit.
Output of uname -a
or ver
No response
Output of java -version
No response
Quarkus version or git rev
No response
Build tool (ie. output of mvnw --version
or gradlew --version
)
No response
Additional information
No response
Metadata
Metadata
Assignees
Labels
area/hibernate-validatorHibernate ValidatorHibernate Validatorkind/bugSomething isn't workingSomething isn't working