I've an standard web project built in Eclipse. My project makes uses of weld and my beans.xml is placed at the following location: build/classes/META-INF/beans.xml When I try to start Tomcat, the following exception is thrown:java.lang.IllegalStateException: WELD-ENV-000033: Invalid bean archive scanning result - found multiple results with the same reference: /home/openbravo/src/weld/pi-weld-upgrade/build/classes (Attached you can find the complete stack trace) The problem is caused because the WebAppBeanArchiveScanner is finding my beans.xml file twice: 1) When invoking the scan method of the parent DefaultBeanArchiveScanner class when looking for the META-INF/beans.xml 2) By the WebAppBeanArchiveScanner itself when looking for the /WEB-INF/classes/META-INF/beans.xml. See here. This is causing that Tomcat can not be started using Eclipse. This problem can be reproduced using Tomcat 8, 8.5 and 9. Note that with this the same project structure and location of the beans.xml file, and using and older version of weld (I've tried with 1.1.24) Tomcat 8, 8.5 and 9 start without trouble. |