0 Replies Latest reply on Jul 29, 2011 3:41 PM by mittelbrinker

    package javax.validation does not exist

    mittelbrinker

      Hi Seam-Community!


      I'm new to Seam and really like it, but now I've ran into a serious problem:


      I've tried to create my own constraint, following the procedure from Chapter 3. Creating custom constraints of the Hibernate-Reference.


      My attempt looks like this:


      import java.lang.annotation.Retention;
      import java.lang.annotation.RetentionPolicy;
      import javax.validation.Constraint;
      
      @Retention(RetentionPolicy.RUNTIME)
      @Constraint(validatedBy = PasswordValidator.class)
      public @interface  Password {
          
      }
      



      At this point, my NetBeans tells me that "package javax.validation does not exist".


      I have generated my project using seam-gen, so the hibernate-validator.jar iside the project's lib-directory and the classpath.


      After some googling, I replaced the "old" Validator with the hibernate-validator-4.2.0.Final.jar. But I've still got the same problem.


      My setup is:



      • Seam 2.2.2

      • JBoss AS 6.0.0

      • NetBeans 7.0

      • Mac OS 10.6.8



      Since I wasn't able to find any useful solution for my problem in the internet (including this forum), I hope that somebody here can help me!


      Regarts Michael


      PS: Please excuse my bad english, it is not my first language ;).