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 74690 - [EE-4] EJB module isn't on classpath of Web module
Summary: [EE-4] EJB module isn't on classpath of Web module
Status: RESOLVED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: EJB (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: Tomasz Slota
URL: http://ui.netbeans.org/nonav/usabilit...
Keywords:
: 73323 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-04-10 14:57 UTC by jrojcek
Modified: 2006-06-04 23:17 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 jrojcek 2006-04-10 14:57:55 UTC
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:".
Comment 1 Jan Horvath 2006-04-11 12:46:46 UTC
*** Issue 73323 has been marked as a duplicate of this issue. ***
Comment 2 Martin Adamek 2006-04-18 10:10:33 UTC
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.
Comment 3 Tomasz Slota 2006-04-18 14:42:20 UTC
*** Issue 74482 has been marked as a duplicate of this issue. ***
Comment 4 Tomasz Slota 2006-04-20 16:13:39 UTC
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.
Comment 5 Martin Adamek 2006-04-20 16:20:03 UTC
issues@j2ee ?
Comment 6 Tomasz Slota 2006-04-24 16:16:39 UTC
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.