It is not possible to run or debug application client project which calls EJB.
It is thrown NullPointerException because bean is not instantionized. If you run
it from Java Web Start it works fine. To reproduce:
- open new Enterprise project wizard
- check the flag Create Application Client Module and finish the wizard
- create a session bean in the EJB Module
- add a bussines method in it
- edit the Main class in the Application Client Module (call action 'Enterprise
Resources|Call Enterprise Bean' in editor and add
'newSessionBean.businessMethod();' to the main method)
- deploy the Enterprise Application
- call Run Project action on the Application Client project node but it fails
Build 20060728-1106, JDK1.5.0_06, WindowsXP.
Created attachment 32293 [details]
What's about run J2EE application. This should work.
If called bean does not have remote interface then described behaviour is
correct (in sync with EJB specification), because you are trying to run
appclient as a standalone module and it tries to find remote interface of
referenced bean which seems to not exist.
If you want run appclient within enterprise application (in this case EJB with
local interface is enough) then you have to invoke "Run project" on enterprise
application project (which its sub-module should be run can be configured in ear
This is the same behaviour as in case of ear with web module thus this part is
debugging was not planned (=> p3), but will try look at it...
Fixed for standalone appclient. Jirko, can I ask you (or anyone else) to check
whether it works as expected, so we can apply similar changes to ear project?
IDE: [8/18/06 12:07 PM] Committing Files started
Checking in AppClientActionProvider.java;
new revision: 220.127.116.11; previous revision: 18.104.22.168
Checking in resources/build-impl.xsl;
new revision: 22.214.171.124; previous revision: 126.96.36.199
IDE: [8/18/06 12:07 PM] Committing Files finished
Debugging hopefully finally fixed also in ear project, some minor corrections
were made in appclient part.
Just few notes:
- if there will be something wrong, file new issue for it
- server must not be running in debug mode otherwise debugger will connect to
the server instead of to the appclient (see issue 83055 and issue 83056) and
debug session must be closed manually; currently dialog is shown to the user
before debugging starts
- simultaneous debugging of client side and server side components is not
correctly supported yet - see issue 83057
IDE: [8/20/06 1:33 AM] Committing 2 Projects started
new revision: 188.8.131.52; previous revision: 184.108.40.206
new revision: 220.127.116.11; previous revision: 18.104.22.168
new revision: 22.214.171.124; previous revision: 126.96.36.199
new revision: 188.8.131.52.2.10; previous revision: 184.108.40.206.2.9
Checking in earproject/src/org/netbeans/modules/j2ee/earproject/Bundle.properties;
new revision: 220.127.116.11; previous revision: 18.104.22.168
new revision: 22.214.171.124; previous revision: 126.96.36.199
IDE: [8/20/06 1:33 AM] Committing 2 Projects finished
As said Run Project action works only on Enterprise Application project. Debug
Project action works both for standalone and embedded application client.