0

我正在使用 WildFly 8,并且由于一些 WebSocket 的东西,我正在将我的 Java EE6 项目迁移到 Java EE7。

在 Maven 中,我使用以下 BOM...

  • org.wildfly.bom:jboss-javaee-7.0-with-tools:8.0.0.Final
  • org.wildfly.bom:jboss-javaee-7.0-with-hibernate:8.0.0.Final
  • org.jboss.seam:seam-bom:3.1.0.Final

我在部署时收到以下异常:

org.jboss.weld.exceptions.IllegalArgumentException: WELD-000818: Event type class org.jboss.solder.config.xml.bootstrap.ProcessAnnotatedTypeImpl is not allowed  
4

1 回答 1

0

您可以尝试为焊接启用“传统模式”,以便更轻松地进行验证。打开standalone.xml 并将焊接子系统配置编辑为:

<subsystem xmlns="urn:jboss:domain:weld:2.0" require-bean-descriptor="true" non-portable-mode="true" />

从文档中这意味着什么:

<xs:attribute name="require-bean-descriptor" type="xs:boolean" default="false">
    <xs:annotation>
        <xs:documentation>If true then implicit bean archives without bean descriptor file (beans.xml) are ignored by Weld</xs:documentation>
    </xs:annotation>
</xs:attribute>
<xs:attribute name="non-portable-mode" type="xs:boolean" default="false">
    <xs:annotation>
        <xs:documentation>If true then the non-portable mode is enabled. The non-portable mode is suggested by the specification to overcome problems with legacy applications that do not use CDI SPI properly and may be rejected by more strict validation in CDI 1.1.</xs:documentation>
    </xs:annotation>
</xs:attribute>
于 2014-02-24T23:01:35.727 回答