Announcement Announcement Module
Collapse
No announcement yet.
Issue with Hibernate validation Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Issue with Hibernate validation

    Hi all,
    I'm attempting to use a hibernate validation annotation inside one of the generated service layer classes. I added the hibernate validation jar to my build path but still come up with errors based inside my package declaration. Attached is a screenshot of the errors I receive. What could be a way to fix this?

    Also is it a good idea to place hibernate validator annotations in my generated classes? Are there other annotations that would be better/easier to use inside any class in the service layers? (ie spring validator annotations)

    Any help is appreciated, thanks.

    CODE SNIPPET****
    package com.securitypage.domain; <---error thrown here

    import java.io.Serializable;

    .........
    import org.hibernate.validator.constraints.Range;.

    ..........
    @Range(min=1, max=50)
    public Integer getAccessCode() {
    return this.accessCode;
    }
    ..............
Working...
X