Package javax.enterprise.context is missing in glassfish 4.1

The new Glassfish 4.1 does not have the javax.enterprise.context package containing the SessionScoped annotation, for example.

+7
cdi glassfish-4
source share
3 answers

add cdi-api.jar to the project by right-clicking on the libraries, selecting "Add JAR / Folder" and selecting cdi-api.jar from the installation modules folder in the glass shawl.

+9
source share

See my answer here https://stackoverflow.com/a/166185/ and the comment below, it should solve your problem.

0
source share

easy, right-click the project and select properties , then to Libraries + Add Jar / Folder to x: \ Program Files \ glassfish ..

0
source share

All Articles