IBM Support

PI46218: DeploymentException occurs if different web modules in an enterprise application have CDI beans with the same name

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • Having a CDI-bean in a jar contained in /WEB-INF/lib in
    different web modules in one EAR, throws an error.
    

Local fix

  • N/A
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:  IBM WebSphere Application Server Liberty    *
    *                  users of JavaServer Faces (JSF) 2.2 and     *
    *                  Contexts and Dependency Injection (CDI)     *
    *                  1.2                                         *
    ****************************************************************
    * PROBLEM DESCRIPTION: A DeploymentException will occur if     *
    *                      different web modules in an enterprise  *
    *                      application have CDI beans with the     *
    *                      same name.                              *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    An org.jboss.weld.exceptions.DeploymentException will occur if
    different web modules in an enterprise application have CDI
    beans with the same name. For example, having a CDI bean named
    'myBean' in two different web modules in an enterprise
    application will result in a DeploymentException.
    
    An error message similar to the following will be written to the
    logs:
    [ERROR   ] CWWKZ0002E: An exception occurred while starting the
    application <application>. The exception message was:
    com.ibm.ws.container.service.state.StateChangeException:
    org.jboss.weld.exceptions.DeploymentException:
    WELD-001414: Bean name is ambiguous. Name myBean resolves to
    beans: [Managed Bean [class <class-1>] with qualifiers
    [<qualifiers-1>], Managed Bean [class <class-2>] with qualifiers
    [<qualifiers-2>]]
    

Problem conclusion

  • The JSF MyFaces 2.2 code was updated so that CDI beans can have
    the same name if they are in different web modules.
    
    The fix for this APAR is currently targeted for inclusion in fix
    pack 8.5.5.9.  Please refer to the Recommended Updates page for
    delivery information:
    http://www.ibm.com/support/docview.wss?rs=180&uid=swg27004980
    

Temporary fix

  • Change the CDI bean names so they are unique across all of the
    web modules inside the enterprise application.
    

Comments

APAR Information

  • APAR number

    PI46218

  • Reported component name

    LIBERTY PROFILE

  • Reported component ID

    5724J0814

  • Reported release

    850

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2015-08-04

  • Closed date

    2016-01-27

  • Last modified date

    2017-07-27

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    LIBERTY PROFILE

  • Fixed component ID

    5724J0814

Applicable component levels

  • R850 PSY

       UP

[{"Business Unit":{"code":"BU053","label":"Cloud \u0026 Data Platform"},"Product":{"code":"SSEQTP","label":"WebSphere Application Server"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"850","Line of Business":{"code":"LOB36","label":"IBM Automation"}}]

Document Information

Modified date:
15 October 2021