IBM Support

Web services resource injection fails intermittently when cdi-1.2 is enabled

Troubleshooting


Problem

When cdi-1.2 is enabled, resource injection into a WebServices (jaxws-2.2) class might intermittently fail, if that class is contained within a CDI implicit bean archive. An implicit bean archive is an archive that does not contain a beans.xml file, but does contain one or more bean classes with a bean defining annotation, or one or more session beans. If the failure occurs, a warning message is displayed in the logs; for example: "WELD-000834: Unable to inject resource....".

Resolving The Problem

  • If CDI is not used, disable the implicit bean archive files for CDI. Set the system property, com.ibm.ws.cdi.enableImplicitBeanArchives, to false.
  • If CDI is enabled, use explicit bean archives by adding the beans.xml file in META-INF directory for normal .jar files, and use the WEB-INF directory for .war files.

[{"Product":{"code":"SSEQTP","label":"WebSphere Application Server"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Not Applicable","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF012","label":"IBM i"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"},{"code":"PF035","label":"z\/OS"}],"Version":"16.0.0.3","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}},{"Product":{"code":"SSD28V","label":"WebSphere Application Server Liberty Core"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":" ","Platform":[{"code":"","label":""}],"Version":"","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
15 June 2018

UID

swg21990313