Results 1 to 1 of 1

Thread: Issue with Hibernate validation

Threaded View

  1. #1
    Join Date
    Nov 2009
    Posts
    12

    Default 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;
    }
    ..............
    Attached Images Attached Images

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •