Can't instantiate validator

Hi,

I wanted to add some new elaborate validation on my Booking class.

@Table(name = "FIRSTTEST_BOOKING")
@Entity(name = "firsttest_Booking")
public class Booking extends StandardEntity {
    private static final long serialVersionUID = -1188087073749863852L;

    @OnDelete(DeletePolicy.UNLINK)
    @OneToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "SELLER_ID")
    protected @NotNull Client seller;

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "SELLER_ROOM_ID")
    protected @NotNull Room sellerRoom;

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "CUSTOMER_ID")
    protected @NotNull Customer customer;

    @Column(name = "BOOKING_DATE_START")
    @Valid
    protected @NotNull @Future LocalDateTime bookingDateStart;

    @Column(name = "BOOKING_DATE_END")
    @Valid
    protected @Future @NotNull LocalDateTime bookingDateEnd;

    @Column(name = "IS_TEMP")
    protected @NotNull Boolean isTemp;

    /* GETTER - SETTER */ 

So i’ve tried this given solution in the Cuba doc:

https://doc.cuba-platform.com/manual-latest/bean_validation_constraints.html

I don’t paste validation classes here cause there are literally the same (expect names: CheckTaskFeasibility to CheckBookingFeasibility and TaskFeasibilityValidator to BookingValidator) than in doc.
I put this two classes in global module like written in doc.
And I add annotation in my booking class.

When i post new entity to validate, there is the exception:

javax.validation.ValidationException: HV000064: Unable to instantiate ConstraintValidator: com.io_labs.firsttest.annotation.BookingValidator.

I also tried to call it in another place, like in services following this example:

https://github.com/cuba-platform/sample-user-registration/blob/master/modules/global/src/com/company/sample/

And i have same error (here with trace):

09:35:15.276 ERROR c.h.cuba.core.sys.ServiceInterceptor    - Exception: 
javax.validation.ValidationException: HV000064: Unable to instantiate ConstraintValidator: com.io_labs.firsttest.annotation.BookingValidator.
	at org.hibernate.validator.internal.util.privilegedactions.NewInstance.run(NewInstance.java:44) ~[hibernate-validator-6.1.1.Final.jar:6.1.1.Final]
	at org.hibernate.validator.internal.engine.constraintvalidation.ConstraintValidatorFactoryImpl.run(ConstraintValidatorFactoryImpl.java:43) ~[hibernate-validator-6.1.1.Final.jar:6.1.1.Final]
	at org.hibernate.validator.internal.engine.constraintvalidation.ConstraintValidatorFactoryImpl.getInstance(ConstraintValidatorFactoryImpl.java:28) ~[hibernate-validator-6.1.1.Final.jar:6.1.1.Final]
	at org.hibernate.validator.internal.engine.constraintvalidation.ClassBasedValidatorDescriptor.newInstance(ClassBasedValidatorDescriptor.java:75) ~[hibernate-validator-6.1.1.Final.jar:6.1.1.Final]
	at org.hibernate.validator.internal.engine.constraintvalidation.AbstractConstraintValidatorManagerImpl.createAndInitializeValidator(AbstractConstraintValidatorManagerImpl.java:89) ~[hibernate-validator-6.1.1.Final.jar:6.1.1.Final]
	at org.hibernate.validator.internal.engine.constraintvalidation.ConstraintValidatorManagerImpl.getInitializedValidator(ConstraintValidatorManagerImpl.java:117) ~[hibernate-validator-6.1.1.Final.jar:6.1.1.Final]
	at org.hibernate.validator.internal.engine.constraintvalidation.ConstraintTree.getInitializedConstraintValidator(ConstraintTree.java:136) ~[hibernate-validator-6.1.1.Final.jar:6.1.1.Final]
	at org.hibernate.validator.internal.engine.constraintvalidation.SimpleConstraintTree.validateConstraints(SimpleConstraintTree.java:54) ~[hibernate-validator-6.1.1.Final.jar:6.1.1.Final]
	at org.hibernate.validator.internal.engine.constraintvalidation.ConstraintTree.validateConstraints(ConstraintTree.java:75) ~[hibernate-validator-6.1.1.Final.jar:6.1.1.Final]
	at org.hibernate.validator.internal.metadata.core.MetaConstraint.doValidateConstraint(MetaConstraint.java:130) ~[hibernate-validator-6.1.1.Final.jar:6.1.1.Final]
	at org.hibernate.validator.internal.metadata.core.MetaConstraint.validateConstraint(MetaConstraint.java:123) ~[hibernate-validator-6.1.1.Final.jar:6.1.1.Final]
	at org.hibernate.validator.internal.engine.ValidatorImpl.validateMetaConstraint(ValidatorImpl.java:555) ~[hibernate-validator-6.1.1.Final.jar:6.1.1.Final]
	at org.hibernate.validator.internal.engine.ValidatorImpl.validateMetaConstraints(ValidatorImpl.java:537) ~[hibernate-validator-6.1.1.Final.jar:6.1.1.Final]
	at org.hibernate.validator.internal.engine.ValidatorImpl.validateParametersForSingleGroup(ValidatorImpl.java:991) ~[hibernate-validator-6.1.1.Final.jar:6.1.1.Final]
	at org.hibernate.validator.internal.engine.ValidatorImpl.validateParametersForGroup(ValidatorImpl.java:932) ~[hibernate-validator-6.1.1.Final.jar:6.1.1.Final]
	at org.hibernate.validator.internal.engine.ValidatorImpl.validateParametersInContext(ValidatorImpl.java:863) ~[hibernate-validator-6.1.1.Final.jar:6.1.1.Final]
	at org.hibernate.validator.internal.engine.ValidatorImpl.validateParameters(ValidatorImpl.java:283) ~[hibernate-validator-6.1.1.Final.jar:6.1.1.Final]
	at org.hibernate.validator.internal.engine.ValidatorImpl.validateParameters(ValidatorImpl.java:235) ~[hibernate-validator-6.1.1.Final.jar:6.1.1.Final]
	at com.haulmont.cuba.core.sys.aop.CubaMethodValidationInterceptor.invoke(CubaMethodValidationInterceptor.java:60) ~[cuba-core-7.2.4.jar:7.2.4]
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) [spring-aop-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:88) ~[spring-aop-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at com.haulmont.cuba.core.sys.ServiceInterceptor.aroundInvoke(ServiceInterceptor.java:90) ~[cuba-core-7.2.4.jar:7.2.4]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_251]
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_251]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_251]
	at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.8.0_251]
	at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:644) [spring-aop-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:633) [spring-aop-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:70) [spring-aop-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175) [spring-aop-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:95) [spring-aop-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) [spring-aop-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212) [spring-aop-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at com.sun.proxy.$Proxy265.testBooking(Unknown Source) [na:na]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_251]
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_251]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_251]
	at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.8.0_251]
	at com.haulmont.cuba.core.sys.remoting.LocalServiceInvokerImpl.invoke(LocalServiceInvokerImpl.java:94) [cuba-core-7.2.4.jar:7.2.4]
	at com.haulmont.cuba.web.sys.remoting.LocalServiceProxy$LocalServiceInvocationHandler.invoke(LocalServiceProxy.java:159) [cuba-web-7.2.4.jar:7.2.4]
	at com.sun.proxy.$Proxy67.testBooking(Unknown Source) [na:na]
	at com.io_labs.firsttest.web.screens.booking.BookingAddEvent.onValidation(BookingAddEvent.java:46) [app-web-0.1-SNAPSHOT.jar:na]
	at com.haulmont.bali.events.EventHub.publish(EventHub.java:170) ~[cuba-global-7.2.4.jar:7.2.4]
	at com.haulmont.cuba.gui.screen.Screen.fireEvent(Screen.java:128) ~[cuba-gui-7.2.4.jar:7.2.4]
	at com.haulmont.cuba.gui.screen.StandardEditor.validateAdditionalRules(StandardEditor.java:543) ~[cuba-gui-7.2.4.jar:7.2.4]
	at com.haulmont.cuba.gui.screen.StandardEditor.validateScreen(StandardEditor.java:517) ~[cuba-gui-7.2.4.jar:7.2.4]
	at com.haulmont.cuba.gui.screen.StandardEditor.commitChanges(StandardEditor.java:414) ~[cuba-gui-7.2.4.jar:7.2.4]
	at com.haulmont.cuba.gui.screen.StandardEditor.closeWithCommit(StandardEditor.java:587) ~[cuba-gui-7.2.4.jar:7.2.4]
	at com.haulmont.cuba.gui.screen.StandardEditor.commitAndClose(StandardEditor.java:553) ~[cuba-gui-7.2.4.jar:7.2.4]
	at com.haulmont.bali.events.EventHub.publish(EventHub.java:170) ~[cuba-global-7.2.4.jar:7.2.4]
	at com.haulmont.cuba.gui.components.actions.BaseAction.actionPerform(BaseAction.java:222) ~[cuba-gui-7.2.4.jar:7.2.4]
	at com.haulmont.cuba.web.gui.components.WebButton.buttonClicked(WebButton.java:67) ~[cuba-web-7.2.4.jar:7.2.4]
	at com.haulmont.cuba.web.widgets.CubaButton.fireClick(CubaButton.java:76) ~[cuba-web-widgets-7.2.4.jar:na]
	at com.vaadin.ui.Button$1.click(Button.java:57) ~[vaadin-server-8.9.2-6-cuba.jar:8.9.2-6-cuba]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_251]
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_251]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_251]
	at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.8.0_251]
	at com.vaadin.server.ServerRpcManager.applyInvocation(ServerRpcManager.java:153) ~[vaadin-server-8.9.2-6-cuba.jar:8.9.2-6-cuba]
	at com.vaadin.server.ServerRpcManager.applyInvocation(ServerRpcManager.java:115) ~[vaadin-server-8.9.2-6-cuba.jar:8.9.2-6-cuba]
	at com.vaadin.server.communication.ServerRpcHandler.handleInvocation(ServerRpcHandler.java:431) ~[vaadin-server-8.9.2-6-cuba.jar:8.9.2-6-cuba]
	at com.vaadin.server.communication.ServerRpcHandler.handleInvocations(ServerRpcHandler.java:396) ~[vaadin-server-8.9.2-6-cuba.jar:8.9.2-6-cuba]
	at com.vaadin.server.communication.ServerRpcHandler.handleRpc(ServerRpcHandler.java:260) ~[vaadin-server-8.9.2-6-cuba.jar:8.9.2-6-cuba]
	at com.vaadin.server.communication.UidlRequestHandler.synchronizedHandleRequest(UidlRequestHandler.java:82) ~[vaadin-server-8.9.2-6-cuba.jar:8.9.2-6-cuba]
	at com.vaadin.server.SynchronizedRequestHandler.handleRequest(SynchronizedRequestHandler.java:40) ~[vaadin-server-8.9.2-6-cuba.jar:8.9.2-6-cuba]
	at com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1578) ~[vaadin-server-8.9.2-6-cuba.jar:8.9.2-6-cuba]
	at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:425) ~[vaadin-server-8.9.2-6-cuba.jar:8.9.2-6-cuba]
	at com.haulmont.cuba.web.sys.CubaApplicationServlet.serviceAppRequest(CubaApplicationServlet.java:329) ~[cuba-web-7.2.4.jar:7.2.4]
	at com.haulmont.cuba.web.sys.CubaApplicationServlet.service(CubaApplicationServlet.java:215) ~[cuba-web-7.2.4.jar:7.2.4]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:741) ~[servlet-api.jar:na]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) ~[catalina.jar:9.0.27]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[catalina.jar:9.0.27]
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) ~[tomcat-websocket.jar:9.0.27]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[catalina.jar:9.0.27]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[catalina.jar:9.0.27]
	at org.springframework.web.filter.CompositeFilter$VirtualFilterChain.doFilter(CompositeFilter.java:108) ~[spring-web-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.springframework.web.filter.CompositeFilter.doFilter(CompositeFilter.java:74) ~[spring-web-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at com.haulmont.cuba.web.sys.CubaHttpFilter.doFilter(CubaHttpFilter.java:93) ~[cuba-web-7.2.4.jar:7.2.4]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[catalina.jar:9.0.27]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[catalina.jar:9.0.27]
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202) ~[catalina.jar:9.0.27]
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) ~[catalina.jar:9.0.27]
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:526) ~[catalina.jar:9.0.27]
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139) ~[catalina.jar:9.0.27]
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) ~[catalina.jar:9.0.27]
	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:678) ~[catalina.jar:9.0.27]
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) ~[catalina.jar:9.0.27]
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) ~[catalina.jar:9.0.27]
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408) ~[tomcat-coyote.jar:9.0.27]
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) ~[tomcat-coyote.jar:9.0.27]
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:861) ~[tomcat-coyote.jar:9.0.27]
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1579) ~[tomcat-coyote.jar:9.0.27]
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) ~[tomcat-coyote.jar:9.0.27]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) ~[na:1.8.0_251]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) ~[na:1.8.0_251]
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) ~[tomcat-util.jar:9.0.27]
	at java.lang.Thread.run(Unknown Source) ~[na:1.8.0_251]
Caused by: java.lang.NoSuchMethodException: com.io_labs.firsttest.annotation.BookingValidator.<init>()
	at java.lang.Class.getConstructor0(Unknown Source) ~[na:1.8.0_251]
	at java.lang.Class.getConstructor(Unknown Source) ~[na:1.8.0_251]
	at org.hibernate.validator.internal.util.privilegedactions.NewInstance.run(NewInstance.java:41) ~[hibernate-validator-6.1.1.Final.jar:6.1.1.Final]
	... 96 common frames omitted
09:35:15.321 ERROR com.haulmont.cuba.web.log.AppLog        - Exception in com.haulmont.cuba.web.widgets.CubaButton: 
com.vaadin.server.ServerRpcManager$RpcInvocationException: Unable to invoke method click in com.vaadin.shared.ui.button.ButtonServerRpc
	at com.vaadin.server.ServerRpcManager.applyInvocation(ServerRpcManager.java:157) ~[vaadin-server-8.9.2-6-cuba.jar:8.9.2-6-cuba]
	at com.vaadin.server.ServerRpcManager.applyInvocation(ServerRpcManager.java:115) ~[vaadin-server-8.9.2-6-cuba.jar:8.9.2-6-cuba]
	at com.vaadin.server.communication.ServerRpcHandler.handleInvocation(ServerRpcHandler.java:431) [vaadin-server-8.9.2-6-cuba.jar:8.9.2-6-cuba]
	at com.vaadin.server.communication.ServerRpcHandler.handleInvocations(ServerRpcHandler.java:396) [vaadin-server-8.9.2-6-cuba.jar:8.9.2-6-cuba]
	at com.vaadin.server.communication.ServerRpcHandler.handleRpc(ServerRpcHandler.java:260) [vaadin-server-8.9.2-6-cuba.jar:8.9.2-6-cuba]
	at com.vaadin.server.communication.UidlRequestHandler.synchronizedHandleRequest(UidlRequestHandler.java:82) [vaadin-server-8.9.2-6-cuba.jar:8.9.2-6-cuba]
	at com.vaadin.server.SynchronizedRequestHandler.handleRequest(SynchronizedRequestHandler.java:40) [vaadin-server-8.9.2-6-cuba.jar:8.9.2-6-cuba]
	at com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1578) [vaadin-server-8.9.2-6-cuba.jar:8.9.2-6-cuba]
	at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:425) [vaadin-server-8.9.2-6-cuba.jar:8.9.2-6-cuba]
	at com.haulmont.cuba.web.sys.CubaApplicationServlet.serviceAppRequest(CubaApplicationServlet.java:329) [cuba-web-7.2.4.jar:7.2.4]
	at com.haulmont.cuba.web.sys.CubaApplicationServlet.service(CubaApplicationServlet.java:215) [cuba-web-7.2.4.jar:7.2.4]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:741) [servlet-api.jar:na]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) [catalina.jar:9.0.27]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina.jar:9.0.27]
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) [tomcat-websocket.jar:9.0.27]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [catalina.jar:9.0.27]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina.jar:9.0.27]
	at org.springframework.web.filter.CompositeFilter$VirtualFilterChain.doFilter(CompositeFilter.java:108) [spring-web-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.springframework.web.filter.CompositeFilter.doFilter(CompositeFilter.java:74) [spring-web-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at com.haulmont.cuba.web.sys.CubaHttpFilter.doFilter(CubaHttpFilter.java:93) [cuba-web-7.2.4.jar:7.2.4]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [catalina.jar:9.0.27]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina.jar:9.0.27]
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202) [catalina.jar:9.0.27]
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) [catalina.jar:9.0.27]
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:526) [catalina.jar:9.0.27]
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139) [catalina.jar:9.0.27]
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) [catalina.jar:9.0.27]
	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:678) [catalina.jar:9.0.27]
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) [catalina.jar:9.0.27]
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) [catalina.jar:9.0.27]
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408) [tomcat-coyote.jar:9.0.27]
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) [tomcat-coyote.jar:9.0.27]
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:861) [tomcat-coyote.jar:9.0.27]
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1579) [tomcat-coyote.jar:9.0.27]
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-coyote.jar:9.0.27]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [na:1.8.0_251]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [na:1.8.0_251]
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-util.jar:9.0.27]
	at java.lang.Thread.run(Unknown Source) [na:1.8.0_251]
Caused by: java.lang.reflect.InvocationTargetException: null
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_251]
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_251]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_251]
	at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.8.0_251]
	at com.vaadin.server.ServerRpcManager.applyInvocation(ServerRpcManager.java:153) ~[vaadin-server-8.9.2-6-cuba.jar:8.9.2-6-cuba]
	... 38 common frames omitted
Caused by: com.haulmont.cuba.core.global.RemoteException: com.io_labs.firsttest.annotation.BookingValidator.<init>()
	at com.haulmont.cuba.core.sys.ServiceInterceptor.aroundInvoke(ServiceInterceptor.java:96) ~[na:na]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_251]
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_251]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_251]
	at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.8.0_251]
	at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:644) ~[spring-aop-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:633) ~[spring-aop-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:70) ~[spring-aop-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175) ~[spring-aop-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:95) ~[spring-aop-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212) ~[spring-aop-5.2.3.RELEASE.jar:5.2.3.RELEASE]
	at com.sun.proxy.$Proxy265.testBooking(Unknown Source) ~[na:na]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_251]
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_251]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_251]
	at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.8.0_251]
	at com.haulmont.cuba.core.sys.remoting.LocalServiceInvokerImpl.invoke(LocalServiceInvokerImpl.java:94) ~[na:na]
	at com.haulmont.cuba.web.sys.remoting.LocalServiceProxy$LocalServiceInvocationHandler.invoke(LocalServiceProxy.java:159) ~[cuba-web-7.2.4.jar:7.2.4]
	at com.sun.proxy.$Proxy67.testBooking(Unknown Source) ~[na:na]
	at com.io_labs.firsttest.web.screens.booking.BookingAddEvent.onValidation(BookingAddEvent.java:46) ~[app-web-0.1-SNAPSHOT.jar:na]
	at com.haulmont.bali.events.EventHub.publish(EventHub.java:170) ~[cuba-global-7.2.4.jar:7.2.4]
	at com.haulmont.cuba.gui.screen.Screen.fireEvent(Screen.java:128) ~[cuba-gui-7.2.4.jar:7.2.4]
	at com.haulmont.cuba.gui.screen.StandardEditor.validateAdditionalRules(StandardEditor.java:543) ~[cuba-gui-7.2.4.jar:7.2.4]
	at com.haulmont.cuba.gui.screen.StandardEditor.validateScreen(StandardEditor.java:517) ~[cuba-gui-7.2.4.jar:7.2.4]
	at com.haulmont.cuba.gui.screen.StandardEditor.commitChanges(StandardEditor.java:414) ~[cuba-gui-7.2.4.jar:7.2.4]
	at com.haulmont.cuba.gui.screen.StandardEditor.closeWithCommit(StandardEditor.java:587) ~[cuba-gui-7.2.4.jar:7.2.4]
	at com.haulmont.cuba.gui.screen.StandardEditor.commitAndClose(StandardEditor.java:553) ~[cuba-gui-7.2.4.jar:7.2.4]
	at com.haulmont.bali.events.EventHub.publish(EventHub.java:170) ~[cuba-global-7.2.4.jar:7.2.4]
	at com.haulmont.cuba.gui.components.actions.BaseAction.actionPerform(BaseAction.java:222) ~[cuba-gui-7.2.4.jar:7.2.4]
	at com.haulmont.cuba.web.gui.components.WebButton.buttonClicked(WebButton.java:67) ~[cuba-web-7.2.4.jar:7.2.4]
	at com.haulmont.cuba.web.widgets.CubaButton.fireClick(CubaButton.java:76) ~[cuba-web-widgets-7.2.4.jar:na]
	at com.vaadin.ui.Button$1.click(Button.java:57) ~[vaadin-server-8.9.2-6-cuba.jar:8.9.2-6-cuba]
	... 43 common frames omitted
09:35:17.581 INFO  c.h.c.s.a.AuthenticationManagerBean     - Logged in: 776c670f-3aca-a837-a739-6081ffe02908 [admin]

Hello!

Probably it cannot create an instance due to your bean validator does not have an empty constructor. I just followed the documentation and validation works fine. See attached demo: demo.zip (94.3 KB)

Thanks for demo,

I had exatly the same classes in my projet and i didn’t know how, but when i rewrite Validator class, this work sudendly for no related reason.

One more time thanks.