[
https://issues.jboss.org/browse/SEAMVALIDATE-14?page=com.atlassian.jira.p...
]
Gunnar Morling commented on SEAMVALIDATE-14:
--------------------------------------------
Seam Validation is not needed per-se to run Bean Validation/Hibernate Validator. It
provides some advanced features based on top of BV/HV though (DI for constraint
validators, automatic method validation). More information can be found in the Seam
Validation [reference
guide|http://docs.jboss.org/seam/3/validation/snapshot/reference/en-US/ht...].
Concerning the NPE, how do you register the constraint validator factory? Could you
provide a complete sample project demonstrating the problem?
java.lang.NullPointerException at
InjectingConstraintValidatorFactory.java:47
-----------------------------------------------------------------------------
Key: SEAMVALIDATE-14
URL:
https://issues.jboss.org/browse/SEAMVALIDATE-14
Project: Seam Validation
Issue Type: Bug
Affects Versions: 3.0.0.CR1
Environment: seam-3.0.0.CR1
org.hibernate:hibernate-validator:jar:4.2.0.Beta1
JBoss-6.0.0.Final
Mojarra- JSF 2.0
Reporter: Esteve Aviles
Assignee: Gunnar Morling
Hi,
I get a NullPointerException when trying to use Bean Validation with Seam 3.
I can get Bean Validation work with Seam 3, with and without Seam Valitation. Is it
required to use seam validations to enable Bean Validation basic features?
I have enabled: validation.xml and interceptor
<class>org.jboss.seam.validation.ValidationInterceptor</class>.
With this configuration I get:
java.lang.NullPointerException
at
org.jboss.seam.validation.InjectingConstraintValidatorFactory.getInstance(InjectingConstraintValidatorFactory.java:47)
at
org.hibernate.validator.engine.ConstraintTree.createAndInitializeValidator(ConstraintTree.java:338)
at
org.hibernate.validator.engine.ConstraintTree.getInitializedValidator(ConstraintTree.java:317)
at
org.hibernate.validator.engine.ConstraintTree.validateConstraints(ConstraintTree.java:144)
at
org.hibernate.validator.engine.ConstraintTree.validateConstraints(ConstraintTree.java:117)
at
org.hibernate.validator.metadata.MetaConstraint.validateConstraint(MetaConstraint.java:84)
at
org.hibernate.validator.engine.ValidatorImpl.validateValueForGroup(ValidatorImpl.java:756)
at org.hibernate.validator.engine.ValidatorImpl.validateValue(ValidatorImpl.java:691)
at org.hibernate.validator.engine.ValidatorImpl.validateValue(ValidatorImpl.java:155)
at javax.faces.validator.BeanValidator.validate(BeanValidator.java:301)
at javax.faces.component.UIInput.validateValue(UIInput.java:1142)
at javax.faces.component.UIInput.validate(UIInput.java:960)
at javax.faces.component.UIInput.executeValidate(UIInput.java:1204)
at javax.faces.component.UIInput.processValidators(UIInput.java:693)
at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1081)
at javax.faces.component.UIForm.processValidators(UIForm.java:240)
at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1081)
at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1081)
at javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:1159)
at
com.sun.faces.lifecycle.ProcessValidationsPhase.execute(ProcessValidationsPhase.java:72)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:97)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:114)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:308)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:324)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242)
at
org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:67)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242)
at
org.jboss.seam.servlet.exception.CatchExceptionFilter.doFilter(CatchExceptionFilter.java:75)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242)
at
org.jboss.seam.servlet.event.ServletEventBridgeFilter.doFilter(ServletEventBridgeFilter.java:79)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242)
at com.ocpsoft.pretty.PrettyFilter.doFilter(PrettyFilter.java:112)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:181)
at
org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.event(CatalinaContext.java:285)
at
org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.invoke(CatalinaContext.java:261)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:88)
at
org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:100)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:53)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:654)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:951)
at java.lang.Thread.run(Thread.java:619)
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira