My Oracle Support Banner

WELD-001303 Exception When CDI Managed Bean Is Accessed From Facelets Error Page (Doc ID 1604350.1)

Last updated on APRIL 12, 2018

Applies to:

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


A Web / JSF application is deployed into 12.1.1 WLS server.
This application  has a facelet page (error.xhtml) configured in web.xml descriptor  as error page :

<web-app ..>


This error page  (error.xhtml) is using a CDI bean (sessionScopedBean)  :

        <h1>You are now on the error page</h1>
        Current milliseconds: #{sessionScopedBean.milliseconds}


The SessionScopedBean bean  is defined as the following :

public class SessionScopedBean implements Serializable {

    public long getMilliseconds() {
        return System.currentTimeMillis();


The issue is that when invoking this error page ,
the cdi bean cannot be used , the following exception is thrown :

javax.servlet.ServletException: WELD-001303 No active contexts for scope type javax.enterprise.context.SessionScoped
  at javax.faces.webapp.FacesServlet.service(
  at weblogic.servlet.internal.StubSecurityHelper$
  at weblogic.servlet.internal.StubSecurityHelper$
  at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(
  at weblogic.servlet.internal.ServletStubImpl.execute(
  Truncated. see log file for complete stacktrace
Caused By: org.jboss.weld.context.ContextNotActiveException: WELD-001303 No active contexts for scope type javax.enterprise.context.SessionScoped
  at org.jboss.weld.manager.BeanManagerImpl.getContext(
  at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(
  at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(
  at nl.rensvanleeuwen.bean.SessionScopedBean$Proxy$_$$_WeldClientProxy.getMilliseconds(SessionScopedBean$Proxy$_$$
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  Truncated. see log file for complete stacktrace



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.