Mark Struberg created TOMEE-791:
-----------------------------------

             Summary: beans.xml merging creates duplicate alternatives when 
started from an IDE
                 Key: TOMEE-791
                 URL: https://issues.apache.org/jira/browse/TOMEE-791
             Project: TomEE
          Issue Type: Bug
    Affects Versions: 1.5.1, 1.6.0
            Reporter: Mark Struberg


When starting TomEE from Intellij IDEA I get a nasty Exception complaining that 
my <alternatives> is registered twice.

Caused by: org.apache.webbeans.exception.WebBeansConfigurationException: Given 
class : at.sozvers.zepta.util.ZeptaLocaleResolver is already added as 
@Alternative
        at 
org.apache.webbeans.inject.AlternativesManager.addClazzAlternative(AlternativesManager.java:90)
        at org.apache.openejb.cdi.CdiScanner.init(CdiScanner.java:159)
        at 
org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:200)


In fact I only have exactly 1 beans.xml with the Alternative enabled, but it 
seems that due to starting TomEE 'inplace' the same beans.xml is in there twice 
on the classpath (source folder + target/classes + whatever).

TomEE currently merges all the beans.xml together, right? Imo it would be 
pretty easy to just do a 'distinct' while merging and removing all the 
duplicated values.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to