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.
Steps to reproduce 1. create an ant-based web app project. 2. create a servlet in that web app project 3. Create an ejb jar project 4. create a session bean in the EJB jar project 5. add a business method to that session bean (like echo(String s)) 6. Add the ejb jar project to the web app project's Libraries [use Add Project] 7. Go to the servlet and try to Insert Code... Call Enterprise Bean the ejb jar project appears and the web module appears in the 'Call Enterprise Bean' dialog You cannot select the ejb if you expand the ejb module project's node. There is a warning that the bean is not in the same module or EAR There are no bean 'sub nodes' of the web app project
In step 6 of your test case do you expect that: #1) EJB jar will be deployed inside WebApplication's WEB-INF/lib and EJBs will be deployed; or #2) EJB jar will be added to project's classpath for compilation but will be excluded from packaging into WEB-INF/lib. In first case (if it is a valid case in terms of EJB specification) Call EJB should let you use the EJBs. But in second case it is valid warning that you cannot reference EJB via local interface unless it is in the same EAR. Would you agree with this Vince?
good point. My assumption was #1. After I 'Add Project' with the EJB module, the Package checkbox is selected in the Project Properties dialog; Libraries category; Compile-time libraries list. When I create the war file, I have the following foo.war + META-INF + WEB-INF + classes + lib + BarEjb.jar So, it looks like the web app project also makes assumption #1.
(In reply to comment #2) > So, it looks like the web app project also makes assumption #1. It is results of EE6 changes. EJB jar should not have been include in WEB-INF/lib prior to EE6 but it had not caused any problems as EJBs were not loaded from there so nobody complained about it.
here is a summary post about EJB 3.1 spec changes... http://java.sun.com/developer/technicalArticles/JavaEE/JavaEE6Overview_Part3.html search for 'simplified packaging' or just 'WEB-INF/lib'
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