My Oracle Support Banner

Weblogic 12c Does Not Call Postconstruct Methods Of Jsf 2.0 Managed Beans (Doc ID 1414700.1)

Last updated on MARCH 01, 2019

Applies to:

Oracle WebLogic Server - Version to [Release 12c]
Information in this document applies to any platform.


WebLogic 12c (12.1.1) does not call the PostConstruct method for beans annotated with @ManagedBean when there is a beans.xml file in the project.  As soon as the beans.xml file is removed, the PostConstruct method is invoked.

However, this means that WebLogic 12c does not support projects that have both ManagedBeans and CDI beans (even if they never reference eachother).

Sample code snippets -

package sample.test.web;

import javax.annotation.PostConstruct;
import javax.faces.bean.ManagedBean;

public class WebPageBean {

  public WebPageBean() {

  public void setup() {
    System.out.println("setup");  // this does not get called when beans.xml exists in project

  public String getProp() {
     return "Hello";





To view full details, sign in with your My Oracle Support account.

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

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.