Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 81331 - Cannot run application client with EJB
Cannot run application client with EJB
Status: VERIFIED FIXED
Product: javaee
Classification: Unclassified
Component: App Client
5.x
PC Windows XP
: P3 (vote)
: 5.x
Assigned To: Lukas Jungmann
issues@javaee
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-07-28 13:13 UTC by Jiri Skrivanek
Modified: 2006-08-24 11:10 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
:


Attachments
Stack trace (1.74 KB, text/plain)
2006-07-28 13:13 UTC, Jiri Skrivanek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Skrivanek 2006-07-28 13:13:15 UTC
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
with NPE.

Build 20060728-1106, JDK1.5.0_06, WindowsXP.
Comment 1 Jiri Skrivanek 2006-07-28 13:13:56 UTC
Created attachment 32293 [details]
Stack trace
Comment 2 Petr Blaha 2006-07-28 13:27:20 UTC
What's about run J2EE application. This should work.
Comment 3 Lukas Jungmann 2006-07-28 21:11:05 UTC
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
project's properties).

This is the same behaviour as in case of ear with web module thus this part is
invalid.
Comment 4 Lukas Jungmann 2006-08-17 18:15:49 UTC
debugging was not planned (=> p3), but will try look at it...
Comment 5 Lukas Jungmann 2006-08-18 11:19:18 UTC
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:-------------------------------------------------
IDE: [8/18/06 12:07 PM] Committing Files started
Checking in AppClientActionProvider.java;
/cvs/j2ee/clientproject/src/org/netbeans/modules/j2ee/clientproject/Attic/AppClientActionProvider.java,v
 <--  AppClientActionProvider.java
new revision: 1.1.4.8; previous revision: 1.1.4.7
done
Checking in resources/build-impl.xsl;
/cvs/j2ee/clientproject/src/org/netbeans/modules/j2ee/clientproject/resources/Attic/build-impl.xsl,v
 <--  build-impl.xsl
new revision: 1.1.4.21; previous revision: 1.1.4.20
done
IDE: [8/18/06 12:07 PM] Committing Files finished
Comment 6 Lukas Jungmann 2006-08-20 02:12:57 UTC
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:-------------------------------------------------
IDE: [8/20/06 1:33 AM] Committing 2 Projects started
Checking in
clientproject/src/org/netbeans/modules/j2ee/clientproject/AppClientActionProvider.java;
/cvs/j2ee/clientproject/src/org/netbeans/modules/j2ee/clientproject/Attic/AppClientActionProvider.java,v
 <--  AppClientActionProvider.java
new revision: 1.1.4.9; previous revision: 1.1.4.8
done
Checking in
clientproject/src/org/netbeans/modules/j2ee/clientproject/Bundle.properties;
/cvs/j2ee/clientproject/src/org/netbeans/modules/j2ee/clientproject/Attic/Bundle.properties,v
 <--  Bundle.properties
new revision: 1.1.4.7; previous revision: 1.1.4.6
done
Checking in
earproject/src/org/netbeans/modules/j2ee/earproject/resources/build-impl.xsl;
/cvs/j2ee/earproject/src/org/netbeans/modules/j2ee/earproject/resources/build-impl.xsl,v
 <--  build-impl.xsl
new revision: 1.19.36.21; previous revision: 1.19.36.20
done
Checking in
earproject/src/org/netbeans/modules/j2ee/earproject/EarActionProvider.java;
/cvs/j2ee/earproject/src/org/netbeans/modules/j2ee/earproject/EarActionProvider.java,v
 <--  EarActionProvider.java
new revision: 1.8.2.1.2.10; previous revision: 1.8.2.1.2.9
done
Checking in earproject/src/org/netbeans/modules/j2ee/earproject/Bundle.properties;
/cvs/j2ee/earproject/src/org/netbeans/modules/j2ee/earproject/Bundle.properties,v
 <--  Bundle.properties
new revision: 1.7.24.5; previous revision: 1.7.24.4
done
Checking in
clientproject/src/org/netbeans/modules/j2ee/clientproject/resources/build-impl.xsl;
/cvs/j2ee/clientproject/src/org/netbeans/modules/j2ee/clientproject/resources/Attic/build-impl.xsl,v
 <--  build-impl.xsl
new revision: 1.1.4.23; previous revision: 1.1.4.22
done
IDE: [8/20/06 1:33 AM] Committing 2 Projects finished
Comment 7 Jiri Skrivanek 2006-08-24 11:10:51 UTC
As said Run Project action works only on Enterprise Application project. Debug
Project action works both for standalone and embedded application client.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo