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 54661 - EJB module mapped into an "Enterprise Application" does not get its jar file included in the ear file!
Summary: EJB module mapped into an "Enterprise Application" does not get its jar file ...
Status: RESOLVED WORKSFORME
Alias: None
Product: javaee
Classification: Unclassified
Component: EJB Project (show other bugs)
Version: 4.x
Hardware: PC Windows ME/2000
: P3 blocker (vote)
Assignee: Andrei Badea
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-08 10:10 UTC by tomsve
Modified: 2006-06-03 17:50 UTC (History)
0 users

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 tomsve 2005-02-08 10:10:41 UTC
Did the following:
- Created an "Empty Enterprise Application".
- Created an "Enterprise Javabeans Module".
- Under "J2EE Modules" in EA project, "Add J2EE
Module" was done and the EJB module was added. It
is  then visible under the "J2EE Modules" node in
the tree. 

Doing build on the EA project, creating an ear
file does not include the EJB jar in the ear file!
War files from added web modules get automatically
included in the ear, but not ejb modules! The
resulting ear is not deployable since
application.xml references the ejb jar. 

Manually copying the ejb jar to the build catalog
of the EA project and then building again includes
it and the ear becomes deployable. But you have to
do this manually everytime the ejb jar is modified.
Comment 1 Andrei Badea 2005-02-09 15:52:46 UTC
Which build are you using? I can't reproduce it in the 050208 dev build.
Comment 2 tomsve 2005-02-09 16:09:37 UTC
Sorry, I forgott to specify that I'm running the early access 2
version with the integrated application server, not the dev version. 

I could find no other reports of this, so I decided to report it. But
if the problem no longer exist in the latest dev I guess it has been
solved. 

I will get the latest dev version and test it. 
Comment 3 Vince Kraemer 2005-02-09 18:06:43 UTC
this has been "working" AFAIK since before EA1.

Please describe you situation with a bit more detail.  What error
message are you getting?  Is there anything suspect in the IDE log?
The console window?
Comment 4 tomsve 2005-02-10 14:55:54 UTC
I get no error messages at all. The build of the J2EE project runs
fine without any errors or warnings of any kind. Ends with "BUILD
SUCCESSFUL". The war file from the web module gets copied to the build
catalog of the J2EE project and gets included in the ear. The jar file
of the ejb Module does not. The first error occurs at deploy, but that
is becuase the ejb jar is missing from the ear file.

Could it be a memory problem ? The machine only got 512MB of ram! The
ejb jar however gets built, and it should not be memory intensive to
copy it to the j2ee project.

Sorry, I can't provide any more info. Maybee it is a local problem. 
I've just downloaded the latest dev version, so I have not had time 
to test it yet.

Since this is not an official release yet I'm not using it for 
anything serious, so it is OK to close this with WORKS_FOR_ME.

I will file a new report if it still happens after release. Right now
I'm guessing on a local glitch. Maybee I should simply try uninstall
and then reistall the EA2 to start with! I have never had such 
problems with netbeans before though. IBMs WSAD based on eclipse
had to be uninstalled and reinstalled twice in a year since it 
simply stopped working after a while, which is one of the reasons
I stick with Netbeans whenever I have the choice.
Comment 5 Andrei Badea 2005-02-10 17:27:31 UTC
Instead of reinstalling EA2, you could try removing your userdir (if
that's not a problem), which is located in ./netbeans/4.1ea2 in your
home directory.

If this doesn't work, please try the dev build. And if not even the
dev build works, could you please attach the contents of the Output
window after building the J2EE app?

If this really is a bug, we'd be glad to fix it before the release.
I'll be grateful if you could test the dev build. Thanks!
Comment 6 tomsve 2005-02-11 09:18:46 UTC
I got the latest dev build (20050209) and made a simple test J2EE
project. One thing I noticed was that when createing the J2EE project
you could now select to have an ejb and a web project created at
the same time. I selected this, and then created a simple session bean,
and a simple servlet that calls it. Did build, and then deploy. 

Everything worked perfectly! The ejb jar got included as it should. 

I then tried creating a new J2EE project without creating the sub
modules, and then adding them manually as I did before. It still
worked as expected. 

What happend before seem to be an unexplainable glitch that is not
reproducable with the latest dev version. I did not try the EA2 again.

Comment 7 Andrei Badea 2005-02-11 13:41:05 UTC
Thanks for testing! Since the dev build seems to work, I'm closing the
issue.