Skip to content
Advertisement

Error in Java Import statement “The import javax.validation.constraints.NotNull cannot be resolved”

After developing Spring roo project, I found following errors in class:

The import javax.validation.constraints.NotNull cannot be resolved

NotNull cannot be resolved to a type

I am using STS 3.1.0.RELEASE

How can this be rectified?

Advertisement

Answer

The jar containing this class must be added to the build path of your project: http://mvnrepository.com/artifact/javax.validation/validation-api/1.0.0.GA

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement