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 57160 - Fail to build a J2EE project if it is created from a different machine.
Summary: Fail to build a J2EE project if it is created from a different machine.
Status: CLOSED INVALID
Alias: None
Product: javaee
Classification: Unclassified
Component: Code (show other bugs)
Version: 4.x
Hardware: All All
: P1 blocker (vote)
Assignee: Marek Fukala
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-29 23:33 UTC by _ hong_lin
Modified: 2013-11-16 04:30 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
This is the app that I used. It can be built on the machine that I create it, but fails on other machines (84.88 KB, application/octet-stream)
2005-03-29 23:36 UTC, _ hong_lin
Details
The upgraded hello world applicartion (54.50 KB, application/x-compressed)
2005-03-30 08:43 UTC, Marek Fukala
Details
screenhot #1 (103.97 KB, image/png)
2005-04-12 09:45 UTC, Marek Fukala
Details
screenhot #2 (broken ref. dialog) (103.97 KB, image/png)
2005-04-12 09:45 UTC, Marek Fukala
Details
screenhot #2 (resolved and working) (98.11 KB, image/png)
2005-04-12 09:46 UTC, Marek Fukala
Details

Note You need to log in before you can comment on or make changes to this bug.
Description _ hong_lin 2005-03-29 23:33:29 UTC
BUILD: Buzz build 4 (base on netbeans 4.1)

To reproduce this bug:

1. Build a J2ee project with Buzz build 4 on a machine(see attachment).
2. Select the project node in the Project tab, right click, select "Build
Project" item from the contextual menu. 
3. Will see "BUILD SUCCESSFUL".
4. zip the project and copy it to another machine. 
5. unzip it. Start Buzz build 4 IDE from the second machine.
6. Load the project.
7. Repeat step 2.

Will get the following error:

 pre-init:
init-private:
init-userdir:
init-user:
init-project:
do-init:
post-init:
init-check:
init-macrodef-javac:
init-macrodef-nbjpda:
init-macrodef-debug:
init-taskdefs:
init:
deps-jar:
deps-j2ee-archive:
init:
deps-jar:
compile:
library-inclusion-in-manifest:
dist-ear:
init:
deps-module-jar:
deps-ear-jar:
/root/temp/Buzz-Testing/HelloWorld/HelloWorldApplication/nbproject/build-impl.xml:146:
The following error occurred while executing this line:
/root/temp/Buzz-Testing/HelloWorld/HelloWorldApplication/HelloWorldApplication-war/nbproject/build-impl.xml:226:
The following error occurred while executing this line:
Target `dist-ear' does not exist in this project.
BUILD FAILED (total time: 0 seconds)


Note: 
1. The same bug can be reproduced on Netbeans 4.1 nightly build 050319
2. The problem cab be reproduced on Win XP, JDS and Solaris platforms.
hong.lin@sun.com 2005-03-24 01:06:14 GMT
Comment 1 _ hong_lin 2005-03-29 23:36:00 UTC
Created attachment 21211 [details]
This is the app that I used. It can be built on the machine that I create it, but fails on other machines
Comment 2 Marek Fukala 2005-03-30 08:42:52 UTC
I opened the attached EAR project in latest build, resolved web application
missing server problem, upgraded all projects (ejb, web and ear) and then did
'clean and build'. It works fine for me. 

Without upgrading the projects I cannot build since there is another already
fixed problem with multiple ant tasks definition.

I also tried to move the upgraded projects to another location and it works for
me as well.

We discussed the issue with QE j2ee lead Petr Blaha and his team also tried to
reproduce the problem withbout success. I am attaching the upgraded version of
HelloWorldApplication, so you can try to open it and use it.

Can you try a latest daily build? - there has been done a lots of changes in the
ear and ejb regarding the upgrade logic - I integrated them on March 21th.
Comment 3 Marek Fukala 2005-03-30 08:43:33 UTC
Created attachment 21214 [details]
The upgraded hello world applicartion
Comment 4 Petr Blaha 2005-03-30 08:59:35 UTC
Hi hong-lin, I imported and built Marek's project without any complications. It
seems that your testing project was broken by reason of many changes in ear and
ejb projects.
Comment 5 Marek Fukala 2005-03-30 09:26:42 UTC
I agreed with Petr Blaha to mark this issue as WORKSFORME. Please reopen if it
still do not work for you (latest build, upgrade project).
Comment 6 Petr Jiricka 2005-03-30 11:58:10 UTC
BTW, when filing bugs against NetBeans, it would be useful to specify the exact
NetBeans build number - we don't know which build of NetBeans is used by "Buzz
Build 4". Thanks.
Comment 7 _ hong_lin 2005-04-12 00:20:03 UTC
Hi All,

I can still reproduce the problem with Netbean build 200504060831.

I installed Netbean build 200504060831, installed Sun Java Sysyem Application
Server Platform Edition 8.1_01 2005Q1 FCS (sjsas_pe-8_1_01_2005Q1-windows.exe,
47.87MB) downloaded from java.sun.com.
(https://sdlcweb1c.sun.com/ECom/EComActionServlet/LegalPage:~:com.sun.sunit.sdlc.content.LegalWebPageInfo;jsessionid=3969F768883F2574AFD8847153B01626;jsessionid=3969F768883F2574AFD8847153B01626)

Tested with attached HelloWorldApplication.zip, still get the same error.


Comment 8 Nam Nguyen 2005-04-12 01:22:55 UTC
I can reproduce this with Build 050407 using Martin's attached project:  
The problem is storing of property
project.HelloWorldApplication-EJBModule=E:\\tests\\HelloWorldApplication\\HelloWorldApplication-ejb
in:
C:\TEMP\HelloWorldApplication\HelloWorldApplication-war\nbproject\private\private.properties:

This is a bug which will affect out-of-the box sample apps.

Comment 9 Marek Fukala 2005-04-12 09:45:02 UTC
I am sorry, but I still cannot reproduce your problem. These are my steps:

1) unzip the HelloWorldApplication.zip file somewhere - directory (A)
2) open the ear project from the directory (A)
=> web project has broken reference to the ejb project - this is correct.
=> in this state you cannot build the project since the
project.HelloWorldApplication-EJBModule property in
nbproject/private/private.properties points to a wrong directory
=> (see my attached screenshot #1)
3) resolve the broken reference -> select the EJB project from
(A)/HelloWorldApplication/HelloWorldApplication-ejb
=> the project.HelloWorldApplication-EJBModule points to 
=> (see screenshot #2)
4) build the ear
=> the build is OK (screenshot #3)

Now after writing such a nice and long letter to you, I think I know what is the
problem ;-). I assume you select wrong project when resolving the broken project
reference in web project. I assume you select the EAR project instead of the EJB
project. I have just tried to do so and it fails with the error you have in the
r screenshot from you email.

I am closing this issue as INVALID, please verify that the problem is what I assume.

I admit, that the broken references dialog could recognize the project types so
it wouldn't be possible to select for example web project when the broken
reference points to an ear or ejb project. But this is IMO P4 or less. Petre B.,
if you think this is a problem feel free to file a separate issue for this.

Regards,
Marek
Comment 10 Marek Fukala 2005-04-12 09:45:32 UTC
Created attachment 21564 [details]
screenhot #1
Comment 11 Marek Fukala 2005-04-12 09:45:52 UTC
Created attachment 21565 [details]
screenhot #2 (broken ref. dialog)
Comment 12 Marek Fukala 2005-04-12 09:46:08 UTC
Created attachment 21566 [details]
screenhot #2 (resolved and working)
Comment 13 Marek Fukala 2005-04-12 09:48:29 UTC
Just a little comment to Nam: It is obvious that our sample apps should not
contain broken references. It is bad to force users to resolve them after
creating a new sample project or opens a sample app. If you know about such
example, please fill an issue against.
Comment 14 Nam Nguyen 2005-04-12 17:22:28 UTC
Martin,  I realize that this reference is private and would not affect sample
project created through the wizard, only with those zipped up like this
testcase.  So my previous comment about affecting out-of-the-box sample apps is
invalid.

My complaint now really is that the broken reference error sign does not
propagate to the containing app project.  I missed the sign that the reference
in the HelloworldApplication-WebModule project is broken, so I went ahead and
built the HelloworldApplication to get into the error.  Imagine if someone who
could not decifer the ant output to figure out what is wrong.  If the App
contain a long list of subproject, users could very well not notice the one
broken dependent project.  

IMO, this non-propagation behavior is P2 and not show-stopper.  Hong, please
evaluate and do proper action.
Comment 15 _ hong_lin 2005-04-12 22:43:40 UTC
Marek,

Just like what you guessed. After the right project is picked, it is been built
without error any more. 

The bug is closed as INVALID. 

Thanks,

Hong