Hi,
I am working on a project which uses these main technologies: Hibernate Validator, EJB 3 + JPA, JSF.
I tried to use the Hibernate Validator on my model using this method:
http://www.schmelzer.cc/content/view/38/38/If the model is situated in the war project and only the war project is deployed everything works fine.
But if the model is in a ejb.jar and this jar with the war is packed in a ear, the server throws an error when I try to insert some invalid information.
Is there any method to combine all these technologies?
The error is:
executePhase(PROCESS_VALIDATIONS 3,com.icesoft.faces.context.BridgeFacesContext@14664e4) threw exception
javax.faces.FacesException
at com.sun.faces.lifecycle.ProcessValidationsPhase.execute(ProcessValidationsPhase.java:108)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
at com.icesoft.faces.webapp.http.core.JsfLifecycleExecutor.apply(JsfLifecycleExecutor.java:18)
at com.icesoft.faces.webapp.http.core.ReceiveSendUpdates.renderCycle(ReceiveSendUpdates.java:132)
at com.icesoft.faces.webapp.http.core.ReceiveSendUpdates.service(ReceiveSendUpdates.java:74)
at com.icesoft.faces.webapp.http.core.RequestVerifier.service(RequestVerifier.java:31)
at com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer.service(PathDispatcherServer.java:24)
at com.icesoft.faces.webapp.http.servlet.BasicAdaptingServlet.service(BasicAdaptingServlet.java:16)
at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:23)
at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:53)
at com.icesoft.faces.webapp.http.servlet.SessionVerifier.service(SessionVerifier.java:26)
at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:23)
at com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:131)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
at com.icesoft.faces.webapp.xmlhttp.BlockingServlet.service(BlockingServlet.java:56)
at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:427)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:315)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:287)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:218)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:98)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:222)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1096)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:166)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1096)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:288)
at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:647)
at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:579)
at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:831)
at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
Caused by: java.lang.NullPointerException
at com.test.HibernateClassValidatorJSF.validate(HibernateClassValidatorJSF.java:42)
at javax.faces.component.UIInput.validateValue(UIInput.java:1013)
at javax.faces.component.UIInput.validate(UIInput.java:867)
at com.icesoft.faces.component.selectinputdate.SelectInputDate.validate(SelectInputDate.java:1229)
at javax.faces.component.UIInput.executeValidate(UIInput.java:1065)
at javax.faces.component.UIInput.processValidators(UIInput.java:666)
at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1033)
at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1033)
at com.icesoft.faces.component.panelcollapsible.PanelCollapsible.processValidators(PanelCollapsible.java:234)
at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1033)
at com.icesoft.faces.component.paneltabset.PanelTabSet.applyPhase(PanelTabSet.java:187)
at com.icesoft.faces.component.paneltabset.PanelTabSet.applyPhase(PanelTabSet.java:166)
at com.icesoft.faces.component.paneltabset.PanelTabSet.processValidators(PanelTabSet.java:231)
at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1033)
at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1033)
at javax.faces.component.UIForm.processValidators(UIForm.java:229)
at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1033)
at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1033)
at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1033)
at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1033)
at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1033)
at javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:662)
at com.sun.faces.lifecycle.ProcessValidationsPhase.execute(ProcessValidationsPhase.java:100)
... 42 more