java.lang.IllegalStateException: Invalid target for Validator [com.exam.FooValidator@1e2c656]: Bar [title=null] trace is java.lang.IllegalStateException: Invalid target for Validator [com.exam.FooValidator@1e2c656]: Bar [title=null]

Stack Overflow | Crazy Coder | 1 year ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Custom Validator have multiple issues

    Stack Overflow | 1 year ago | Crazy Coder
    java.lang.IllegalStateException: Invalid target for Validator [com.exam.FooValidator@1e2c656]: Bar [title=null] trace is java.lang.IllegalStateException: Invalid target for Validator [com.exam.FooValidator@1e2c656]: Bar [title=null]

    1 unregistered visitors

    Root Cause Analysis

    1. java.lang.IllegalStateException

      Invalid target for Validator [com.exam.FooValidator@1e2c656]: Bar [title=null] trace is java.lang.IllegalStateException: Invalid target for Validator [com.exam.FooValidator@1e2c656]: Bar [title=null]

      at org.springframework.validation.DataBinder.assertValidators()
    2. Spring Context
      DataBinder.addValidators
      1. org.springframework.validation.DataBinder.assertValidators(DataBinder.java:516)
      2. org.springframework.validation.DataBinder.addValidators(DataBinder.java:527)
      2 frames
    3. com.eaxm
      FooController.initBinderOne
      1. com.eaxm.FooController.initBinderOne(FooController.java:36)
      1 frame
    4. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      4. java.lang.reflect.Method.invoke(Unknown Source)
      4 frames
    5. Spring
      ModelFactory.updateModel
      1. org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221)
      2. org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:137)
      3. org.springframework.web.method.annotation.InitBinderDataBinderFactory.initBinder(InitBinderDataBinderFactory.java:62)
      4. org.springframework.web.bind.support.DefaultDataBinderFactory.createBinder(DefaultDataBinderFactory.java:53)
      5. org.springframework.web.method.annotation.ModelFactory.updateBindingResult(ModelFactory.java:251)
      6. org.springframework.web.method.annotation.ModelFactory.updateModel(ModelFactory.java:235)
      6 frames
    6. Spring MVC
      FrameworkServlet.doGet
      1. org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.getModelAndView(RequestMappingHandlerAdapter.java:879)
      2. org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:782)
      3. org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:705)
      4. org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
      5. org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959)
      6. org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893)
      7. org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:966)
      8. org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:857)
      8 frames
    7. JavaServlet
      HttpServlet.service
      1. javax.servlet.http.HttpServlet.service(HttpServlet.java:624)
      1 frame
    8. Spring MVC
      FrameworkServlet.service
      1. org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:842)
      1 frame
    9. JavaServlet
      HttpServlet.service
      1. javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
      1 frame
    10. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      2 frames
    11. Tomcat WS
      WsFilter.doFilter
      1. org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
      1 frame
    12. Glassfish Core
      CoyoteAdapter.service
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      3. org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
      4. org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
      5. org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
      6. org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
      7. org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
      8. org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:957)
      9. org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
      10. org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423)
      10 frames
    13. Grizzly HTTP
      JIoEndpoint$SocketProcessor.run
      1. org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079)
      2. org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:620)
      3. org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
      3 frames
    14. Java RT
      ThreadPoolExecutor$Worker.run
      1. java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      2. java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      2 frames
    15. Tomcat Util
      TaskThread$WrappingRunnable.run
      1. org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
      1 frame
    16. Java RT
      Thread.run
      1. java.lang.Thread.run(Unknown Source)
      1 frame