-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Hibernate Validator + EJB 3 + JSF
PostPosted: Fri Feb 05, 2010 4:10 am 
Newbie

Joined: Fri Aug 15, 2008 3:33 am
Posts: 17
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


Top
 Profile  
 
 Post subject: Re: Hibernate Validator + EJB 3 + JSF
PostPosted: Fri Feb 05, 2010 10:48 am 
Hibernate Team
Hibernate Team

Joined: Thu Apr 05, 2007 5:52 am
Posts: 1689
Location: Sweden
Seems this code is relying on Hibernate 3.x. For a new project I would not use Hibernate Validator 3.x anymore, but rather Hibernate Validator 4.x which is the Bean Validation reference implementation. Of course the integration will have to change. I don't know exactly what the code you are referring to does. Have you debugged it?

--Hardy


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.