Announcement Announcement Module
Collapse
No announcement yet.
No validator for type Long???? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • No validator for type Long????

    Hi,

    I am getting the following error. I checked all my Constraint Annotations and they were annotated properly (i.e. @NotNull and @NotEmpty for strings and only @NotNull for numbers).

    javax.validation.UnexpectedTypeException: No validator could be found for type: java.lang.Long

    This error did not surface the 1st time I ran the project. It happened from the 2nd time onwards.

    Quite strange (to me).

    Any help will be much appreciated.

  • #2
    RE: No validator for type Long????

    Problem solved. Its my bad.

    There was indeed one field that had the wrong annotation:

    @Size=1
    private long <Field>

    I took out "@Size=1" and it worked.

    Thanks

    Comment


    • #3
      Thanks

      That was my problem, too. Thought I got rid of it when I changed the type from String to Long, but I was wrong.

      Thanks. You saved me some time looking down wrong avenues.

      Comment

      Working...
      X