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 239864 - False warning about missed beans.xml
Summary: False warning about missed beans.xml
Status: RESOLVED WONTFIX
Alias: None
Product: javaee
Classification: Unclassified
Component: CDI (show other bugs)
Version: 7.4
Hardware: All All
: P3 normal (vote)
Assignee: Sergey Petrov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-30 01:44 UTC by kidnapper
Modified: 2016-07-07 08:56 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description kidnapper 2013-12-30 01:44:50 UTC
Steps to reproduce:
* create a Java EE 6 project
* add Guice to the project as a dependency and implement an AbstractModule
* try to use @Inject on a constructor with parameters bound correctly in your Guice module#configure

The following error message is shown:
"CDI artifact is found but there is no beans.xml file."

It is an error message and is marked with red line, which is quite confusing: I'm not using CDI, I'm using Guice, hence I don't need to have a beans.xml at all. In general this bug is quite similar to #230730 however the fix for this wasn't really handling non-CDI cases.

A preferred solution for this would be to turn this error into a warning (which can be even disabled), so it works for non-CDI use-cases.

Possible workaround:
use @com.google.inject.Inject instead of @javax.inject.Inject...
Comment 1 Sergey Petrov 2014-01-15 13:49:48 UTC
In my opinion Guice support issues may not deserve P2 status, but anyway cdi hints should be managed the same way as most others, i.e. should be possible to configure hint level warning/error and disable also
Comment 2 Sergey Petrov 2014-01-17 12:41:50 UTC
I may be wrong but it looks current cdi hints implementation is hard to change to hints api with enable/disable support it's comparable in complexity with task in jpa area, and I don't expect to implement it in current release. Guice recognition (and may be some other similar frameworks) is another option also.
Comment 3 Sergey Petrov 2014-03-21 14:52:40 UTC
I was a bit wrong about Guice, as I've found some support inside
Comment 4 mike1024 2015-04-28 09:15:49 UTC
I've also encountered this bug - no Guice here, I'm using HK2 (which is the foundation of Jersey 2) with Java 8 and Netbeans 8.

So this isn't a Guice-only problem, or a Java 6 only problem, or a Netbeans 7.4 only problem.

Any news on a fix? Or is there a plugin I can disable or something to make the error go away?
Comment 5 Martin Balin 2016-07-07 08:56:43 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss