1 Reply Latest reply on Nov 4, 2014 2:14 AM by Tomas Remes

    Descriptor in Beans.xml

    Congmin Min Newbie

      Hello, in WildFly 8 QuickStart examples, I received a problem for the Beans.xml, which is usually as simple as:

      <?xml version="1.0" encoding="UTF-8"?>
      <!-- Marker file indicating CDI should be enabled -->
      <beans xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

      <!-- Uncomment this alternative to see EJB declarative transactions in
      <!-- <alternatives> -->
      <!-- <class>org.jboss.as.quickstarts.greeter.domain.EJBUserDao</class> -->
      <!-- </alternatives> -->

      It basically contains nothing. But I always got this error message "cvc-complex-type.4: Attribute 'bean-discovery-mode' must appear on element 'beans'." indicated for the line "http://xmlns.jcp.org/xml/ns/javaee/beans_1_1.xsd" in JBoss Developer Studio.

      What does this message mean? I googled but found nothing. What might cause this?

      Then I have to manually add "version="1.1" bean-discovery-mode="all"" to <beans ...> </beans> to get rid of the message. I suppose these example projects are designed for working with WildFly 8 by default and I shouldn't manually change anything.

      Any idea of what's causing this? Thanks.