[
https://issues.apache.org/jira/browse/TOMEE-791?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13600271#comment-13600271
]
Mark Struberg commented on TOMEE-791:
-------------------------------------
Yes and no. Of course we can play the blame-game with the IDE. But that would
not help the users and it would be much better to just fix it.
> 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.someproject.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