[
https://issues.jboss.org/browse/JBIDE-8563?page=com.atlassian.jira.plugin...
]
Viacheslav Kabanovich commented on JBIDE-8563:
----------------------------------------------
Validator for beans.xml reads class name and asks CDI model for bean with that Java type.
Actually, the validator uses DOM model, but it could use XModel, it is not important. CDI
model does not return bean object for valid type name, and bean objects are loaded by
builder using JDT, so that XModel has nothing to do with it.
Since this issue takes place in newly imported Maven projects, I think it happens as
follows.
1. Project is imported. It still has no CDI nature.
2. Full Build started.
3. In a separate job, concurring with build, CDI nature and builder are added to the
project.
4. Build proceeds to validation, and since project already has CDI nature, CDI validation
runs, but CDI model is not built yet. ' Ctrl+space don´t bring the class too' -
confirms that there is no bean in CDI model.
Alternative being not being recognized as so.
---------------------------------------------
Key: JBIDE-8563
URL:
https://issues.jboss.org/browse/JBIDE-8563
Project: Tools (JBoss Tools)
Issue Type: Bug
Components: cdi (jsr-299)
Affects Versions: 3.2.0.Final
Reporter: José Freitas
Assignee: Viacheslav Kabanovich
Labels: alternative, cdi
Fix For: 3.3.0.M1
the problem occurs on
booking example:
https://github.com/seam/examples/
declaring on WEB-INF/beans.xml
{code}
<alternatives>
<class>org.jboss.seam.examples.booking.bootstrap.ApplicationInitializer</class>
</alternatives>
{code}
gives me the error check:
{code}
<class> element must specify the name of an alternative bean class [JSR-299
§5.1.1]
{code}
but the class is declared as an Alternative
{code}
@Alternative
public class ApplicationInitializer{
...
{code}
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira