In the new Glassfish 4.1 the package javax.enterprise.context containing annotation SessionScoped for instance is missing.
add cdi-api.jar to the project by right-clicking on Libraries, selecting Add JAR/Folder, and selecting cdi-api.jar from the modules folder of glassfish installation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With