-->
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.  [ 4 posts ] 
Author Message
 Post subject: UnexpectedTypeException: No validator could be found ...enum
PostPosted: Fri Aug 05, 2011 4:46 am 
Newbie

Joined: Fri Aug 05, 2011 3:01 am
Posts: 3
I have an entity class for which one of the fields is set up as an enum:

Code:
   @Enumerated( EnumType.STRING )
   @Column( name = "seeded_flag" )
   private BaseYesNo seededFlag;


The enum is as follows:

Code:
public enum BaseYesNo {
   Y( "Y" ),
   N( "N" );

   private String yesNoVal;

   private static Map< String, BaseYesNo > stringToEnum = new HashMap< String, BaseYesNo >();

   static {
                for ( BaseYesNo byn : BaseYesNo.values() ) {
         BaseYesNo.stringToEnum.put( byn.toString(), byn );
      }
   }

   BaseYesNo( String yesNoVal ) {
      this.yesNoVal = yesNoVal;
   }

   public static BaseYesNo fromString( String dbValue ) {
      return BaseYesNo.stringToEnum.get( dbValue );
   }
}


The problem is that I am getting the following exception:

Code:
javax.validation.UnexpectedTypeException: No validator could be found for type: base.model.schema.BaseYesNo


Any clue why I am getting this exception? I have also tried defining a custom validator to handle BaseYesNo, but it didn't make a difference.

Thanks in advance!,
Kurz


Top
 Profile  
 
 Post subject: Re: UnexpectedTypeException: No validator could be found ...enum
PostPosted: Fri Aug 05, 2011 2:34 pm 
Hibernate Team
Hibernate Team

Joined: Sat Jan 24, 2009 12:46 pm
Posts: 388
Hi,

welcome to the Hibernate forum.

At which point are you getting this exception? Could you post a complete stacktrace? Have you defined a custom constraint and validator for the BaseYesNo type? Telling from your code Bean Validation seems not really to be involved at all. How are you triggering validation of constraints in your application?

--Gunnar

_________________
Visit my blog at http://musingsofaprogrammingaddict.blogspot.com/


Top
 Profile  
 
 Post subject: Re: UnexpectedTypeException: No validator could be found ...enum
PostPosted: Sat Aug 06, 2011 3:21 am 
Newbie

Joined: Fri Aug 05, 2011 3:01 am
Posts: 3
After getting this exception, I tried to make a custom constraint and validator to see if the exception would stop, but it did not. It still throws the exception below. The only constraints I am using (on other fields) are the standard ones like @NotNull and @Size. They are attached to the fields of entity beans.

Here is the entire stack trace:

Code:
javax.ejb.EJBException
   at com.sun.ejb.containers.BaseContainer.processSystemException(BaseContainer.java:5194)
   at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:5092)
   at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:4880)
   at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:2039)
   at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1990)
   at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:222)
   at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:88)
   at $Proxy193.save(Unknown Source)
   at base.model.api.__EJB31_Generated__BaseViewFacade__Intf____Bean__.save(Unknown Source)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:305)
   at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:54)
   at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:163)
   at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:299)
   at org.jboss.weld.bean.proxy.EnterpriseBeanProxyMethodHandler.invoke(EnterpriseBeanProxyMethodHandler.java:126)
   at org.jboss.weld.bean.proxy.EnterpriseTargetBeanInstance.invoke(EnterpriseTargetBeanInstance.java:62)
   at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:125)
   at base.model.api.org$jboss$weld$bean-web-SessionBean-BaseViewFacade_$$_WeldProxy.save(org$jboss$weld$bean-web-SessionBean-BaseViewFacade_$$_WeldProxy.java)
   at BackingBean.saveUser(BackingBean.java:78)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at com.sun.el.parser.AstValue.invoke(AstValue.java:234)
   at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:297)
   at org.jboss.weld.util.el.ForwardingMethodExpression.invoke(ForwardingMethodExpression.java:43)
   at org.jboss.weld.el.WeldMethodExpression.invoke(WeldMethodExpression.java:56)
   at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105)
   at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)
   at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
   at javax.faces.component.UICommand.broadcast(UICommand.java:315)
   at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:794)
   at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1259)
   at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81)
   at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
   at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
   at javax.faces.webapp.FacesServlet.service(FacesServlet.java:409)
   at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1534)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:281)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
   at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
   at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
   at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:98)
   at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:91)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:162)
   at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:326)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:227)
   at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:170)
   at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:822)
   at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:719)
   at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1013)
   at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
   at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
   at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
   at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
   at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
   at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
   at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
   at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
   at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
   at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
   at java.lang.Thread.run(Thread.java:680)
Caused by: javax.validation.UnexpectedTypeException: No validator could be found for type: base.model.schema.BaseYesNo
   at org.hibernate.validator.engine.ConstraintTree.verifyResolveWasUnique(ConstraintTree.java:244)
   at org.hibernate.validator.engine.ConstraintTree.findMatchingValidatorClass(ConstraintTree.java:227)
   at org.hibernate.validator.engine.ConstraintTree.getInitializedValidator(ConstraintTree.java:179)
   at org.hibernate.validator.engine.ConstraintTree.validateConstraints(ConstraintTree.java:135)
   at org.hibernate.validator.metadata.MetaConstraint.validateConstraint(MetaConstraint.java:121)
   at org.hibernate.validator.engine.ValidatorImpl.validateConstraint(ValidatorImpl.java:327)
   at org.hibernate.validator.engine.ValidatorImpl.validateConstraintsForRedefinedDefaultGroup(ValidatorImpl.java:273)
   at org.hibernate.validator.engine.ValidatorImpl.validateConstraintsForCurrentGroup(ValidatorImpl.java:256)
   at org.hibernate.validator.engine.ValidatorImpl.validateInContext(ValidatorImpl.java:210)
   at org.hibernate.validator.engine.ValidatorImpl.validate(ValidatorImpl.java:119)
   at org.eclipse.persistence.internal.jpa.metadata.listeners.BeanValidationListener.validateOnCallbackEvent(BeanValidationListener.java:84)
   at org.eclipse.persistence.internal.jpa.metadata.listeners.BeanValidationListener.prePersist(BeanValidationListener.java:62)
   at org.eclipse.persistence.descriptors.DescriptorEventManager.notifyListener(DescriptorEventManager.java:698)
   at org.eclipse.persistence.descriptors.DescriptorEventManager.notifyEJB30Listeners(DescriptorEventManager.java:641)
   at org.eclipse.persistence.descriptors.DescriptorEventManager.executeEvent(DescriptorEventManager.java:200)
   at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.registerNewObjectClone(UnitOfWorkImpl.java:4216)
   at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.registerNotRegisteredNewObjectForPersist(UnitOfWorkImpl.java:4193)
   at org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.registerNotRegisteredNewObjectForPersist(RepeatableWriteUnitOfWork.java:493)
   at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.registerNewObjectForPersist(UnitOfWorkImpl.java:4135)
   at org.eclipse.persistence.internal.jpa.EntityManagerImpl.persist(EntityManagerImpl.java:406)
   at com.sun.enterprise.container.common.impl.EntityManagerWrapper.persist(EntityManagerWrapper.java:269)
   at base.common.model.api.AbstractFacade.create(AbstractFacade.java:40)
   at base.common.model.api.AbstractFacade.save(AbstractFacade.java:35)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1052)
   at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1124)
   at com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:5367)
   at com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:619)
   at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:801)
   at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:571)
   at base.common.model.api.AbstractFacade.handleException(AbstractFacade.java:83)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at com.sun.ejb.containers.interceptors.BeanAroundInvokeInterceptor.intercept(InterceptorManager.java:903)
   at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:801)
   at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:571)
   at org.jboss.weld.ejb.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:46)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:862)
   at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:801)
   at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:571)
   at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doAround(SystemInterceptorProxy.java:162)
   at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.aroundInvoke(SystemInterceptorProxy.java:144)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:862)
   at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:801)
   at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:371)
   at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:5339)
   at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:5327)
   at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:214)
   ... 59 more

WARNING: ${PageBean.saveUser}: javax.ejb.EJBException
javax.faces.FacesException: ${PageBean.saveUser}: javax.ejb.EJBException
   at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:118)
   at javax.faces.component.UICommand.broadcast(UICommand.java:315)
   at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:794)
   at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1259)
   at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81)
   at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
   at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
   at javax.faces.webapp.FacesServlet.service(FacesServlet.java:409)
   at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1534)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:281)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
   at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
   at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
   at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:98)
   at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:91)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:162)
   at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:326)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:227)
   at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:170)
   at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:822)
   at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:719)
   at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1013)
   at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
   at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
   at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
   at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
   at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
   at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
   at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
   at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
   at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
   at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
   at java.lang.Thread.run(Thread.java:680)
Caused by: javax.faces.el.EvaluationException: javax.ejb.EJBException
   at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:102)
   at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
   ... 32 more
Caused by: javax.ejb.EJBException
   at com.sun.ejb.containers.BaseContainer.processSystemException(BaseContainer.java:5194)
   at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:5092)
   at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:4880)
   at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:2039)
   at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1990)
   at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:222)
   at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:88)
   at $Proxy193.save(Unknown Source)
   at base.model.api.__EJB31_Generated__BaseViewFacade__Intf____Bean__.save(Unknown Source)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:305)
   at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:54)
   at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:163)
   at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:299)
   at org.jboss.weld.bean.proxy.EnterpriseBeanProxyMethodHandler.invoke(EnterpriseBeanProxyMethodHandler.java:126)
   at org.jboss.weld.bean.proxy.EnterpriseTargetBeanInstance.invoke(EnterpriseTargetBeanInstance.java:62)
   at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:125)
   at base.model.api.org$jboss$weld$bean-web-SessionBean-BaseViewFacade_$$_WeldProxy.save(org$jboss$weld$bean-web-SessionBean-BaseViewFacade_$$_WeldProxy.java)
   at BackingBean.saveUser(BackingBean.java:78)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at com.sun.el.parser.AstValue.invoke(AstValue.java:234)
   at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:297)
   at org.jboss.weld.util.el.ForwardingMethodExpression.invoke(ForwardingMethodExpression.java:43)
   at org.jboss.weld.el.WeldMethodExpression.invoke(WeldMethodExpression.java:56)
   at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105)
   at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)
   ... 33 more
Caused by: javax.validation.UnexpectedTypeException: No validator could be found for type: base.model.schema.BaseYesNo
   at org.hibernate.validator.engine.ConstraintTree.verifyResolveWasUnique(ConstraintTree.java:244)
   at org.hibernate.validator.engine.ConstraintTree.findMatchingValidatorClass(ConstraintTree.java:227)
   at org.hibernate.validator.engine.ConstraintTree.getInitializedValidator(ConstraintTree.java:179)
   at org.hibernate.validator.engine.ConstraintTree.validateConstraints(ConstraintTree.java:135)
   at org.hibernate.validator.metadata.MetaConstraint.validateConstraint(MetaConstraint.java:121)
   at org.hibernate.validator.engine.ValidatorImpl.validateConstraint(ValidatorImpl.java:327)
   at org.hibernate.validator.engine.ValidatorImpl.validateConstraintsForRedefinedDefaultGroup(ValidatorImpl.java:273)
   at org.hibernate.validator.engine.ValidatorImpl.validateConstraintsForCurrentGroup(ValidatorImpl.java:256)
   at org.hibernate.validator.engine.ValidatorImpl.validateInContext(ValidatorImpl.java:210)
   at org.hibernate.validator.engine.ValidatorImpl.validate(ValidatorImpl.java:119)
   at org.eclipse.persistence.internal.jpa.metadata.listeners.BeanValidationListener.validateOnCallbackEvent(BeanValidationListener.java:84)
   at org.eclipse.persistence.internal.jpa.metadata.listeners.BeanValidationListener.prePersist(BeanValidationListener.java:62)
   at org.eclipse.persistence.descriptors.DescriptorEventManager.notifyListener(DescriptorEventManager.java:698)
   at org.eclipse.persistence.descriptors.DescriptorEventManager.notifyEJB30Listeners(DescriptorEventManager.java:641)
   at org.eclipse.persistence.descriptors.DescriptorEventManager.executeEvent(DescriptorEventManager.java:200)
   at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.registerNewObjectClone(UnitOfWorkImpl.java:4216)
   at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.registerNotRegisteredNewObjectForPersist(UnitOfWorkImpl.java:4193)
   at org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.registerNotRegisteredNewObjectForPersist(RepeatableWriteUnitOfWork.java:493)
   at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.registerNewObjectForPersist(UnitOfWorkImpl.java:4135)
   at org.eclipse.persistence.internal.jpa.EntityManagerImpl.persist(EntityManagerImpl.java:406)
   at com.sun.enterprise.container.common.impl.EntityManagerWrapper.persist(EntityManagerWrapper.java:269)
   at base.common.model.api.AbstractFacade.create(AbstractFacade.java:40)
   at base.common.model.api.AbstractFacade.save(AbstractFacade.java:35)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1052)
   at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1124)
   at com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:5367)
   at com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:619)
   at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:801)
   at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:571)
   at base.common.model.api.AbstractFacade.handleException(AbstractFacade.java:83)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at com.sun.ejb.containers.interceptors.BeanAroundInvokeInterceptor.intercept(InterceptorManager.java:903)
   at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:801)
   at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:571)
   at org.jboss.weld.ejb.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:46)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:862)
   at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:801)
   at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:571)
   at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doAround(SystemInterceptorProxy.java:162)
   at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.aroundInvoke(SystemInterceptorProxy.java:144)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:862)
   at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:801)
   at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:371)
   at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:5339)
   at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:5327)
   at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:214)
   ... 59 more

WARNING: StandardWrapperValve[Faces Servlet]: PWC1406: Servlet.service() for servlet Faces Servlet threw exception
javax.faces.el.EvaluationException: javax.ejb.EJBException
   at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:102)
   at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
   at javax.faces.component.UICommand.broadcast(UICommand.java:315)
   at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:794)
   at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1259)
   at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81)
   at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
   at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
   at javax.faces.webapp.FacesServlet.service(FacesServlet.java:409)
   at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1534)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:281)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
   at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
   at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
   at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:98)
   at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:91)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:162)
   at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:326)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:227)
   at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:170)
   at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:822)
   at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:719)
   at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1013)
   at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
   at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
   at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
   at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
   at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
   at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
   at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
   at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
   at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
   at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
   at java.lang.Thread.run(Thread.java:680)
Caused by: javax.ejb.EJBException
   at com.sun.ejb.containers.BaseContainer.processSystemException(BaseContainer.java:5194)
   at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:5092)
   at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:4880)
   at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:2039)
   at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1990)
   at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:222)
   at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:88)
   at $Proxy193.save(Unknown Source)
   at base.model.api.__EJB31_Generated__BaseViewFacade__Intf____Bean__.save(Unknown Source)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:305)
   at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:54)
   at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:163)
   at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:299)
   at org.jboss.weld.bean.proxy.EnterpriseBeanProxyMethodHandler.invoke(EnterpriseBeanProxyMethodHandler.java:126)
   at org.jboss.weld.bean.proxy.EnterpriseTargetBeanInstance.invoke(EnterpriseTargetBeanInstance.java:62)
   at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:125)
   at base.model.api.org$jboss$weld$bean-web-SessionBean-BaseViewFacade_$$_WeldProxy.save(org$jboss$weld$bean-web-SessionBean-BaseViewFacade_$$_WeldProxy.java)
   at BackingBean.saveUser(BackingBean.java:78)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at com.sun.el.parser.AstValue.invoke(AstValue.java:234)
   at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:297)
   at org.jboss.weld.util.el.ForwardingMethodExpression.invoke(ForwardingMethodExpression.java:43)
   at org.jboss.weld.el.WeldMethodExpression.invoke(WeldMethodExpression.java:56)
   at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105)
   at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)
   ... 33 more
Caused by: javax.validation.UnexpectedTypeException: No validator could be found for type: base.model.schema.BaseYesNo
   at org.hibernate.validator.engine.ConstraintTree.verifyResolveWasUnique(ConstraintTree.java:244)
   at org.hibernate.validator.engine.ConstraintTree.findMatchingValidatorClass(ConstraintTree.java:227)
   at org.hibernate.validator.engine.ConstraintTree.getInitializedValidator(ConstraintTree.java:179)
   at org.hibernate.validator.engine.ConstraintTree.validateConstraints(ConstraintTree.java:135)
   at org.hibernate.validator.metadata.MetaConstraint.validateConstraint(MetaConstraint.java:121)
   at org.hibernate.validator.engine.ValidatorImpl.validateConstraint(ValidatorImpl.java:327)
   at org.hibernate.validator.engine.ValidatorImpl.validateConstraintsForRedefinedDefaultGroup(ValidatorImpl.java:273)
   at org.hibernate.validator.engine.ValidatorImpl.validateConstraintsForCurrentGroup(ValidatorImpl.java:256)
   at org.hibernate.validator.engine.ValidatorImpl.validateInContext(ValidatorImpl.java:210)
   at org.hibernate.validator.engine.ValidatorImpl.validate(ValidatorImpl.java:119)
   at org.eclipse.persistence.internal.jpa.metadata.listeners.BeanValidationListener.validateOnCallbackEvent(BeanValidationListener.java:84)
   at org.eclipse.persistence.internal.jpa.metadata.listeners.BeanValidationListener.prePersist(BeanValidationListener.java:62)
   at org.eclipse.persistence.descriptors.DescriptorEventManager.notifyListener(DescriptorEventManager.java:698)
   at org.eclipse.persistence.descriptors.DescriptorEventManager.notifyEJB30Listeners(DescriptorEventManager.java:641)
   at org.eclipse.persistence.descriptors.DescriptorEventManager.executeEvent(DescriptorEventManager.java:200)
   at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.registerNewObjectClone(UnitOfWorkImpl.java:4216)
   at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.registerNotRegisteredNewObjectForPersist(UnitOfWorkImpl.java:4193)
   at org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.registerNotRegisteredNewObjectForPersist(RepeatableWriteUnitOfWork.java:493)
   at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.registerNewObjectForPersist(UnitOfWorkImpl.java:4135)
   at org.eclipse.persistence.internal.jpa.EntityManagerImpl.persist(EntityManagerImpl.java:406)
   at com.sun.enterprise.container.common.impl.EntityManagerWrapper.persist(EntityManagerWrapper.java:269)
   at base.common.model.api.AbstractFacade.create(AbstractFacade.java:40)
   at base.common.model.api.AbstractFacade.save(AbstractFacade.java:35)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1052)
   at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1124)
   at com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:5367)
   at com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:619)
   at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:801)
   at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:571)
   at base.common.model.api.AbstractFacade.handleException(AbstractFacade.java:83)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at com.sun.ejb.containers.interceptors.BeanAroundInvokeInterceptor.intercept(InterceptorManager.java:903)
   at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:801)
   at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:571)
   at org.jboss.weld.ejb.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:46)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:862)
   at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:801)
   at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:571)
   at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doAround(SystemInterceptorProxy.java:162)
   at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.aroundInvoke(SystemInterceptorProxy.java:144)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:862)
   at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:801)
   at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:371)
   at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:5339)
   at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:5327)
   at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:214)
   ... 59 more



Top
 Profile  
 
 Post subject: Re: UnexpectedTypeException: No validator could be found ...enum
PostPosted: Sat Aug 06, 2011 5:14 am 
Newbie

Joined: Fri Aug 05, 2011 3:01 am
Posts: 3
I discovered a problem in my backing bean, and it seems that the error was originating from there. Problem solved. Thanks for your response though.

Kurz


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.