Fix WELD-001408 unsatisfied dependencies for type error when deploying to GlassFish
Posted on January 24, 2015 • 1 minutes • 47 words
Took me half an hour today to figure this out when deploying to production servers. Apparently, the CDI extension loaded from a JAR in a WAR, thus different classloader, makes it uninjectable.
The problem can be fixed by simply disable implicit CDI on GlassFish
${GLASSFISH_HOME}/bin/asadmin set configs.config.server-config.cdi-service.enable-implicit-cdi=false