1

I changed my IDE from Eclipse Java EE Edition to IntelliJ IDEA. Currently I am developing a JSF project. The project can be deployed without errors, but my Bean Validators defined by annotation like e.g. this:

@Size(max = 8, message = "abc")
private String  username;

are never invoked. Any suggestions where the problem could be? In Eclipse everything worked correct and the Bean-Validation-Toolbar of IntelliJ also detects the validation constraints correctly.

I am using JSF Mojarra 2.2.8, Hibernate Validator 5.1.3 Final, Eclipse Luna and IntelliJ 14.

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
micha
  • 65
  • 11
  • This is not dependent on IDE, but on webapp configuration and server. Tell a bit more about server make/version used and any validation-related settings in web.xml. – BalusC Jul 17 '15 at 08:09
  • Tried this: http://stackoverflow.com/questions/7545231/bean-validation-notnull-notblank-and-notempty-does-not-work-in-jsftomcat – Kukeltje Jul 24 '15 at 14:18

1 Answers1

-1

I don't had any special configuration in web.xml, Server: Apache Tomcat 8.0.22

I downgraded now to JSF Mojarra 2.2.1 and Hibernate Validator 5.0.1 and everything works fine.

micha
  • 65
  • 11
  • 1
    This is not a very good answer. It is in fact a very bad one. There should be **no need** to downgrade both like this. Downgrading one of them a little could be needed, but that could easily be found out. If you actually need to downgrade like this, there is a more fundamental problem (e.g. mismatch of an impl and api, but I'd expect errors then. I **cannot** believe it just does not work... – Kukeltje Jul 24 '15 at 14:14