BeanManager Cannot Be Found When A Class Is Annotated With @WebService And @Stateless (Doc ID 1900995.1)

Last updated on JUNE 09, 2016

Applies to:

Oracle WebLogic Server - Version 12.1.2.0.0 and later
Information in this document applies to any platform.

Symptoms

In a simple application having an EJB Web Service, the class is annotated with @Stateless and @WebService. This work fine. However when there is a custom JSF lifecycle factory, it will complain that the BeanManager cannot be found. This will only happen when annotating a class with both @Stateless and @WebService, not with only one of them.

Requirement is to have an EJB WebService because the transaction is needed.

The application will be in active state, but the error is thrown.

Error stack :
----------------


<Error> <javax.enterprise.resource.webcontainer.jsf.config> <MKUNCHI-LAP> <AdminServer> <[ACTIVE] ExecuteThread: '14' for queue: 'weblogic.kernel.Default (self-tuning)'> <weblogic> <> <> <1399369462293> <BEA-000000> <Critical error during deployment: com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! Unable to find BeanManager. Please ensure that you configured the CDI implementation of your choice properly.
at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:376)
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:216)
at weblogic.servlet.internal.EventsManager$FireContextListenerAction.run(EventsManager.java:661)
....
.........
Caused By: java.lang.IllegalStateException: Unable to find BeanManager.
Please ensure that you configured the CDI implementation of your choice properly.
at org.apache.myfaces.extensions.cdi.core.api.provider.BeanManagerProvider.getBeanManager(BeanManagerProvider.java:136)
at org.apache.myfaces.extensions.cdi.core.impl.util.CodiUtils.getContextualReferenceByClass(CodiUtils.java:124)

 

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms