[jbosstools-issues] [JBoss JIRA] Created: (JBIDE-7269) beans.xml validator shows invalid errors

Lukas Jungmann (JIRA) jira-events at lists.jboss.org
Wed Oct 6 06:29:39 EDT 2010


beans.xml validator shows invalid errors
----------------------------------------

                 Key: JBIDE-7269
                 URL: https://jira.jboss.org/browse/JBIDE-7269
             Project: Tools (JBoss Tools)
          Issue Type: Bug
          Components: cdi (jsr-299)
    Affects Versions: 3.2.0.Beta1
            Reporter: Lukas Jungmann
            Assignee: Alexey Kazakov
            Priority: Critical


-create a dynamic web project with enabled CDI support
-create some CDI beans there (at least one with @Alternative)
-create beans.xml (File -> New -> Other -> xml)
-edit beans.xml so it contains:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://java.sun.com/xml/ns/javaee"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/beans.xsd">
 <alternatives>
 <class><!-- put @Alternative bean class name here--></class>
 </alternatives>
</beans>

-save file

=> content of the class element is underlined as error saying "..element must specify the name of an alternative bean class..", but the class is annotated with @Alternative

my exact steps were:
-create a dynamic web project with enabled CDI support
-copy org.jboss.jsr299.tck.tests.policy.broken.same.type.twice package from tck project to the one created in previous step
-create beans.xml with following content:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://java.sun.com/xml/ns/javaee"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/beans.xsd">
 <alternatives>
 <class>org.jboss.jsr299.tck.tests.policy.broken.same.type.twice.Cat</class>
 </alternatives>
</beans>

-save the beans.xml file

=> error says that the 'Cat' class is not @Alternative, but the class is @RequestScoped @Alternative class Cat { } and war deployment doesn't show any errors

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jbosstools-issues mailing list