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.
[ BUILD # : RC2 ] [ JDK VERSION : 1.6.0_02 ] Hi, I just noticed the blazingly fast performance of the clean/build action on my JavaEE project... and while running it over and over again, I noticed that the WAR and EJB projects are not cleaned and build anymore. Opening the project's properties I found that there is no more a dependency between the Enterprise project and the EJB and WAR projects embedded in it. Nothing changed after adding these two projects again as a dependency in the libraries of the Enterprise project. The only thing I did was opening the projects in RC2. In RC1 it all worked fine I believe. I need to find out what had changed while opening the projects in RC2. Iwan
That's weird because there are not many changes between RC 1 and RC 2 - I cannot think about any change that could be related to your problem. Anyway, are you able to attach your project please (the original one)? It would be very helpful, thanks.
Created attachment 53506 [details] The build-impl file of the JavaEE project that works.
Created attachment 53507 [details] The build-impl file of the JavaEE project that doesn't work. I didn't change this, all changes were done by NB. I'm not sure that RC1 worked, but the other attached file did work
Could you attach also corresponding project.xml? If you open project properties of your EnterpriseApp and go to Packaging panel can you see there EJBs/WARs your ear app is composed of?
The proper projects are listed, my client, ejb and war project. Iwan
Is it possible to attach your project? If not in which NB version have you created it? Thanks.
Created attachment 53629 [details] All project related files of the project that works correctly
Created attachment 53630 [details] All project related files of the project that doesn't work correctly
Created attachment 53631 [details] All project related files of the project that works correctly
Please ignore attachment "Wed Nov 28 22:54:00 +0000 2007: IFFServer.zip" as it has the wrong mime type.
This is duplicate of your issue 120154. Unfortunately it was too late to fix that one for NB6. *** This issue has been marked as a duplicate of 120154 ***
I am not entirely satisfied by this final answer. Especially since it used to work and all of a sudden NB breaks my build file and it doesn't work any more. When I restore a backup of my build-impl.xml files, all works fine. NB should break build files. The build file as it is right now, does NOT build my JavaEE project, irrespective of the JavaME library that is in there. It used to do that. To me that means a showstopper. Hence the re-open and the P1 and the target to NB6. Iwan
The two issues are about the same underlying problem. Once you add a J2ME project to a J2EE project the J2EE project's tag <references> in project.xml is upgraded to 'http://www.netbeans.org/ns/ant-project-references/2' namespace. And the underlying problem is that this namespace is not properly handled by J2EE projects. This defect was there always and needs to be fixed. Once the project is upgraded it will not build required projects regardless of their type, e.g. removing J2ME and adding J2EE will result into the same problem. Is this really showstopper for NB6? The scenario to reproduce it is to add J2ME project to J2EE. How common is this? IMO this is P2. The workaround (till the issue is resolved) is to override for example 'pre-compile' target in build.xml and build required projects, e.g.: <target name="pre-compile"> <ant antfile="${project.EnterpriseApplication5-ejb}/build.xml" inheritall="false" target="dist-ear"> <property location="${build.dir}" name="dist.ear.dir"/> </ant> </target> If your project is not using J2ME libs anymore you can downgrade <references> tag back to ant-project-references/1 and it should start working again.
Hi Iwan, I agree this is serious and should be fixed in a patch on the update center shortly after the release. Since there is a workaround, I don't think this is a showstopper for NetBeans 6. We plan to release 6.0 FCS *really soon* now.
There is no workaround for this issue, unless you have a working backup of the project and keep on restoring it. Furthermore, as soon as I want to change the JavaEE client from the WAR project to a Swing project, which I have to test my webservices, the build-impl.xml file is crippled. I have tried to work for a while to keep remembering rebuilding all the relevant projects myself, but that turned out to be a non-workable solution, as I think I've lost about 50% of my productivity if not more. On part of the reference to the J2ME library issue (issue 120154), it used to work with that reference being the only one not being rebuild. Only since shortly (noticed with RC2) none of the references are being rebuild. Mind that the original project was a regular run of the mill JavaEE project. Iwan
Iwan, I'm going to start working on the fix. The question remains whether this should be fixed for NB6 or not. To your claim that this is regression I must (unfortunately) say that none of the J2EE projects (web, ejb, ear, appclient) ever supported (since NB 4.1) having dependency on a project which provides 'extended' artifact (I just checked the source code). As far as I know only J2ME and (optionally) freeform projects provides them at the moment. The testcase you provided demonstrates J2EE project having dependency on J2ME project, for example (correct me please if I'm wrong) IFFSharedLib J2ME library is required by IFFServer-ejb J2EE project. This is one of the scenarios where the problem manifests. My reasoning for downgrading this to P2 and fix it after NB6 (update center; 6.0.x release) is: not a regression; not a common scenario (the problem exists since 4.1). I'm going to close your issue 120154 as duplicate of this one - it is the same problem. I have also a question. What is the scenario behind using J2ME project in Enterprise App? I'm not familiar with J2ME and at the moment I cannot see any usefulness in doing so. Running such J2EE app in application server would require J2ME platform be included as well, right? I must be missing something here. Thanks for clarification. Re. "There is no workaround for this issue" - there is always a workaround, it just may not be trivial or nice. In your case for example for already mentioned IFFServer-ejb it would mean (off the top of my head; I cannot test it) adding to build.xml: <target name="-pre-compile"> <ant antfile="${project.BouncyCastleME}/build.xml" inheritall="false" target="jar"> <property location="" name="config.active"/> </ant> <ant antfile="${project.IFFSharedLib}/build.xml" inheritall="false" target="jar"> <property location="" name="config.active"/> </ant> </target> <target name="-post-clean"> <ant antfile="${project.BouncyCastleME}/build.xml" inheritall="false" target="clear"> <property location="" name="config.active"/> </ant> <ant antfile="${project.IFFSharedLib}/build.xml" inheritall="false" target="clean"> <property location="" name="config.active"/> </ant> </target> That should resolve your building problem. Changing required projects will always require some hand work here. It is just workaround.
*** Issue 120154 has been marked as a duplicate of this issue. ***
Well you are right in that my project depends on a J2ME project. But it used to work without problems, well not for the J2ME project, hence the 120154 issue. But until recently the problem only existed for the J2ME project. Since that only contains data structures that I use in both the mobile application and the web application it connects to, it doesn't change that much. My apologies on the subject that there is no workaround, your suggestion to put the 'right code' into build.xml is actually a good workaround. Again, I apologize and can't wait until the fix is out. Iwan
Just to clarify the use case a bit further: J2ME has obviously more limitations on supported data structures as J2SE (or J2EE). In order to be sure that the Enterprise Application returns on the web services interface J2ME supported objects, I create these types in a J2ME project, have NB verify that the types are supported on the J2ME platform, but since it is just Java, I can use these JARs in my J2EE project as well. And I am sure that the interface is compatible. Iwan
tmysik, please review the fix. thx. iwan, we would appreciate if you could download tomorrow's daily build and test this - just opening project in IDE should regenerate build-impl.xml. thx. Fixed in: Checking in j2ee/archiveproject/src/org/netbeans/modules/j2ee/archive/project/resources/build-impl.xsl; new revision: 1.5; previous revision: 1.4 Checking in j2ee/clientproject/src/org/netbeans/modules/j2ee/clientproject/resources/build-impl.xsl; new revision: 1.27; previous revision: 1.26 Checking in j2ee/earproject/src/org/netbeans/modules/j2ee/earproject/resources/build-impl.xsl; new revision: 1.33; previous revision: 1.32 Checking in j2ee/ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/resources/build-impl.xsl; new revision: 1.82; previous revision: 1.81 Checking in web/project/src/org/netbeans/modules/web/project/resources/build-impl.xsl; new revision: 1.169; previous revision: 1.168
Seems to be ok. Product Version: NetBeans IDE Dev (Build 071211) Java: 1.6.0_03; Java HotSpot(TM) Client VM 1.6.0_03-b05 System: Linux version 2.6.23-gentoo-r3 running on i386; UTF-8; cs_CZ (nb) Reporter, could you please verify that everything is ok now? Thanks.
I am currently on vacation until December 19th, so than I will check and respond. Apologies for the delay. Iwan
Yes it works. Iwan
Thanks Iwan. -D
Verified
The fixes have been ported into the release601_fixes branch. Checking in build-impl.xsl; /cvs/j2ee/archiveproject/src/org/netbeans/modules/j2ee/archive/project/resources/Attic/build-impl.xsl,v <-- build-impl.xsl new revision: 1.4.8.1; previous revision: 1.4 done Checking in build-impl.xsl; /cvs/j2ee/clientproject/src/org/netbeans/modules/j2ee/clientproject/resources/Attic/build-impl.xsl,v <-- build-impl.xsl new revision: 1.25.2.1.4.1; previous revision: 1.25.2.1 done Checking in build-impl.xsl; /cvs/j2ee/earproject/src/org/netbeans/modules/j2ee/earproject/resources/Attic/build-impl.xsl,v <-- build-impl.xsl new revision: 1.32.6.1; previous revision: 1.32 done Checking in build-impl.xsl; /cvs/j2ee/ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/resources/Attic/build-impl.xsl,v <-- build-impl.xsl new revision: 1.80.2.1.4.1; previous revision: 1.80.2.1 done Checking in build-impl.xsl; /cvs/web/project/src/org/netbeans/modules/web/project/resources/Attic/build-impl.xsl,v <-- build-impl.xsl new revision: 1.166.2.2.4.1; previous revision: 1.166.2.2 done