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.
Finding Participant wrote the EJB injection code manually in Servlet (to inject the bean interface). He didn't realize that the EJB module wasn't on classpath. Severity 1 participant used Fix Imports dialog which said that no imports were found for the bean interface. He decided to fix it by writing the import manually. 3 participants wrote the FQN manually which didn't fix the problem. 1 participant tried to write import manually with code completion which didn't work. Recommendation Consider providing a "Call EJB" kind of contextual action that generates the injection code and adds the EJB module to classpath. Consider providing an editor hint for adding the EJB module to classpath. We have to scan all open projects (and required projects) anyway. So if we find the proper type in a project that isn't on classpath, we can offer to add it to classpath. Consider adding the EJB module to classpath of web module if created from the enterprise application wizard. Fix the wording in the information wording dialog. It says: "No imports found for the following types:". It should say something like "The following types are not present on project classpath:".
*** Issue 73323 has been marked as a duplicate of this issue. ***
Fixed Call EJB part. Reassigning for hints and EAR part. /cvs/web/core/src/org/netbeans/modules/web/core/Attic/WebInjectionTargetQueryImplementation.java,v <-- WebInjectionTargetQueryImplementation.java new revision: 1.1.2.1; previous revision: 1.1 /cvs/ide/golden/friend-packages.txt,v <-- friend-packages.txt new revision: 1.15.4.1.2.61; previous revision: 1.15.4.1.2.60 /cvs/ide/golden/deps.txt,v <-- deps.txt new revision: 1.175.2.4.2.70; previous revision: 1.175.2.4.2.69 /cvs/web/core/nbproject/project.xml,v <-- project.xml new revision: 1.11.4.2.2.4; previous revision: 1.11.4.2.2.3 /cvs/web/core/src/META-INF/services/Attic/org.netbeans.modules.j2ee.common.queries.spi.InjectionTargetQueryImplementation,v web/core/src/META-INF/services/org.netbeans.modules.j2ee.common.queries.spi.InjectionTargetQueryImplementation; /cvs/web/core/src/META-INF/services/Attic/org.netbeans.modules.j2ee.common.queries.spi.InjectionTargetQueryImplementation,v <-- org.netbeans.modules.j2ee.common.queries.spi.InjectionTargetQueryImplementation new revision: 1.1.2.1; previous revision: 1.
*** Issue 74482 has been marked as a duplicate of this issue. ***
I would like to extract the hint part from this bug and make it an independent issue. I don't think this is EJB module specific thing. If there is unresolved type and it could be resolved by adding another (already opened) project to the class path, there should be a hint for it. There is such a feature in Eclipse and I was finding it very useful when working with it. I suggest not including the new issue in the beta-release stoppers list. It is definitely not a bug, but a piece of new functionality and the original problem has been already fixed in a large part. I am re-assigning it to issues@j2ee for your consideration and for fixing the bad-wording-in-a-dialog thing.
issues@j2ee ?
I filed a separate issue (enhancement) #75426 against java/hints for providing a hint for adding another opened project to the class path to fix unresolved types. Closing this one.