netbeans – Error package javax.validation.constraints does not exist

I’ve just upgraded to netbeans 8.2. I imported my previous settings from 8.1 when it asked me to do so. When I opened a previous project it throw me an error at compilation time complaining that I have missing the package javax.validation, at first I thought I had to reconfigure the jdk default home for netbeans (file [netbeans_dir]/etc/netbeans.conf) since it was choosing my os default open-jdk. But it had nothing to do with this.

You need to install the EJB and EAR plugin for it to work properly.

If you happened to have the plugin installed and still got the error above, it could be the application server you are using. In my case i configured the project to run on payara 173 which renamed the file bean-validator.jar to validation-api.jar to follow conventions, but netbeans 8.2 didn’t update the library path. A quick solution is to copy the file validation-api.jar in {payara-home}/glassfish/modules and name it bean-validator.jar.




Introduce tus datos o haz clic en un icono para iniciar sesión:

Logo de

Estás comentando usando tu cuenta de Cerrar sesión /  Cambiar )

Google photo

Estás comentando usando tu cuenta de Google. Cerrar sesión /  Cambiar )

Imagen de Twitter

Estás comentando usando tu cuenta de Twitter. Cerrar sesión /  Cambiar )

Foto de Facebook

Estás comentando usando tu cuenta de Facebook. Cerrar sesión /  Cambiar )

Conectando a %s