Package javax.enterprise.context missing in glassfish 4.1

mpunktw picture mpunktw · Sep 23, 2014 · Viewed 12.1k times · Source

In the new Glassfish 4.1 the package javax.enterprise.context containing annotation SessionScoped for instance is missing.

Answer

Hussan Ghunaim picture Hussan Ghunaim · Feb 25, 2015

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.