This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 231433

Summary: Erroneous error "CDI artifact is found but there is no beans.xml file."
Product: javaee Reporter: mccomber <mccomber>
Component: CDIAssignee: Sergey Petrov <sj-nb>
Status: RESOLVED DUPLICATE    
Severity: normal CC: arturo_serrano, zeratul2k
Priority: P3    
Version: 7.3   
Hardware: PC   
OS: Windows 7   
Issue Type: DEFECT Exception Reporter:
Attachments: IDE log

Description mccomber 2013-06-18 11:46:40 UTC
Product Version = NetBeans IDE 7.3 (Build 201306052037)
Operating System = Windows 7 version 6.1 running on x86
Java; VM; Vendor = 1.7.0_17
Runtime = Java HotSpot(TM) Client VM 23.7-b01

After updating the IDE and plugins I noticed all my beans in the project I had open where red underlined with "CDI artifact is found but there is no beans.xml file."  beans.xml already exists in WEB-INF.  Clicking the hint "create beans.xml" does nothing.  I deleted beans.xml by hand (outside of the IDE) and then clicked the hint to create it.  The file was created yet the error exists still in all the beans.
Comment 1 mccomber 2013-06-18 11:46:45 UTC
Created attachment 135960 [details]
IDE log
Comment 2 chrisjr 2013-06-19 08:58:22 UTC
I am also seeing this bug with NB 7.3.1. I have just upgraded from NetBeans 7.2 in order to try and resolve [this other bug|http://stackoverflow.com/questions/10757793/netbeans-warning-on-event-injection], but this new bug is even worse!

I'm going to try downgrading to NB 7.2.1 instead.

For the record: I have a WAR project, and my beans.xml file is in my WEB-INF directory.
Comment 3 zeratul2k 2013-06-24 13:22:30 UTC
I can confirm this behaviour after updating a Netbeans 7.3. It's very distracting to have false-positive red lines on files I'm working on.
Comment 4 Sergey Petrov 2013-06-27 11:17:47 UTC
For 7.3.1 it may have sense to try to create meta-inf folder with beans.xml just to avoid this warning, but I don't know if it may or nor broke any functionality.

*** This bug has been marked as a duplicate of bug 230730 ***
Comment 5 cstreeting 2013-08-08 20:14:54 UTC
As a temporary fix, copy (or move) the build.xml file from /WEB-INF/build.xml directly into the root.

My old setup:

Web Pages
   WEB-INF
      beans.xml
      faces-config.xml
      web.xml
(does not work)

New setup:

Web Pages
   WEB-INF
      faces-config.xml
      web.xml
   beans.xml
(works - beans.xml has the same hierarchy as WEB-INF)