Le schéma OpenWebBeans pour le fichier beans.xml n'est pas pris en charge dans l'implémentation Liberty CDI 1.2. La fonction Liberty CDI 1.2 est basée sur l'implémentation Weld, qui respecte la spécification Contexts and Dependency Injection for the Java Platform, Enterprise Edition (Java EE) pour beans.xml.
L'exemple suivant illustre un fichier beans.xml signalé par cette règle.
<WebBeans xmlns="urn:java:ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:java:ee http://java.sun.com/jee/beans-1.0.xsd">
...
</WebBeans>
L'exemple suivant illustre un fichier beans.xml correctement défini d'après la spécification CDI 1.2.
<beans xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/beans_1_1.xsd"> </beans>
La correction automatisée fournie par cette règle remplace le schéma OpenWebBeans dans vos fichiers beans.xml par le schéma CDI standard. Copiez la configuration personnalisée vers votre fichier de génération d'application pour activer l'automatisation des correctifs.
Si vous envisagez d'utiliser la fonction CDI 1.2 fournie avec Java EE 7, voir Changements de comportement dans Contexts and Dependency Injection d'une édition à l'autre.