Bug 225950 - Adding Groovy class to Web App Project messes up compilation class path
Adding Groovy class to Web App Project messes up compilation class path
Status: VERIFIED FIXED
Product: groovy
Classification: Unclassified
Component: Code
7.3
PC Windows 7
: P1 (vote)
: 7.3
Assigned To: Martin Janicek
issues@groovy
: 73_HR_FIX
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-02-10 10:40 UTC by eddelplus
Modified: 2013-02-14 12:15 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description eddelplus 2013-02-10 10:40:56 UTC
Steps to reproduce:

- Create web application project
- Use a Tomcat server
- Add a Servlet (java)
- Clean and Build -> no problem
- Add some Groovy Class to the same package
- Clean and Build -> lots of errors about not finding javax.servlet.http.*
Comment 1 Martin Janicek 2013-02-11 08:16:04 UTC
Reproducible, thanks for the report. Not sure what could be the problem, I'm going to take a look at it..
Comment 2 Martin Janicek 2013-02-11 08:47:33 UTC
Same happens in EJB project (e.g. with session bean). Also GF or other application server doesn't make any difference. Most probably the problem lies in groovy compiler configuration. We are wrapping it over the javac (groovy-build.xml file)..
Comment 3 Martin Janicek 2013-02-11 09:19:55 UTC
Fixed in: web-main #ca9f1603c52a
Comment 4 Martin Janicek 2013-02-11 09:24:08 UTC
CCing Marian and Vlada.. guys could we include this to the 7.3 ? Do not know if it's formally P1 or P2, but in any case it's breaking the whole "Groovy in Web apps" feature. And I think the fix is pretty safe..
Comment 5 Vladimir Riha 2013-02-11 10:07:19 UTC
If the fix is safe, I'd vote for it but I'm not sure, if it's not too late for 7.3
Comment 6 Martin Janicek 2013-02-11 10:58:30 UTC
CCing MartinF.. Martine, could you please review the fix?

I don't know about anyone who could be a meaningful reviewer so just choosing you as the best pokemon I have :)
Comment 7 Martin Fousek 2013-02-11 11:09:25 UTC
(In reply to comment #6)
> CCing MartinF.. Martine, could you please review the fix?

The change seems safe to me. Just please ensure that the classpath extensions are on all necessary places.
 
> I don't know about anyone who could be a meaningful reviewer so just choosing
> you as the best pokemon I have :)
Comment 8 Martin Janicek 2013-02-11 11:14:40 UTC
Thanks for the catch Martin, don't know how I missed it..
Additional fix in: web-main #9c9f46f5de19
Comment 9 Martin Fousek 2013-02-11 12:11:43 UTC
(In reply to comment #8)
> Thanks for the catch Martin, don't know how I missed it..
> Additional fix in: web-main #9c9f46f5de19

Looks well, thanks.
Comment 10 Vladimir Riha 2013-02-11 15:02:04 UTC
verified in trunk. I tried both servlet and session bean in java web/ejb and clean & build finished successfully 


Product Version: NetBeans IDE Dev (Build web-main-9855-on-20130211)
Java: 1.7.0_15; Java HotSpot(TM) Client VM 23.7-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_15-b01
System: Linux version 3.2.0-35-generic-pae running on i386; UTF-8; en_US (nb)
Comment 11 Martin Janicek 2013-02-11 15:37:00 UTC
I've transplanted both changsets into the release73 branch:

http://hg.netbeans.org/releases/rev/92009cc2f642
http://hg.netbeans.org/releases/rev/93e87decaddf

Thanks Vlado and Martine for a quick cooperation and thanks a lot (!!) Jochen for the report. If you wouldn't report this issue it would go into the NetBeans 7.3 final release possibly breaking compilation of a lot of Web apps with groovy files.
Comment 12 eddelplus 2013-02-11 17:55:16 UTC
You're welcome, Martin. The fix certainly fits the symptoms, with the servlet api coming from the J2EE server libraries. I've manually changed the groovy-build.xml that is generated via that XSL and things startet working.

BTW, there is a very nice little Groovy framework called Gaelyk available for the Google App Engine. However, I was stalled with the GAE Plugin in 7.2.1 and have raised bug #225383 here, which nobody has paid any attention too. You seem to know most of the organisation well, so maybe you can get somebody to look at it. I suspect that it's just falling over a minor change from 7.1 to 7.2 on the NetBeans side, probably with some advanced Ant scripts involved as well. I'd probably intensify my NetBeans usage with Groovy, if I could publish my Groovy results on GAE via NetBeans, giving you more bug reports (or not if all runs smoothly). My regular homepage hoster only runs the PHP stack.
Comment 13 Quality Engineering 2013-02-12 01:41:22 UTC
Integrated into 'main-golden', will be available in build *201302112300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/ca9f1603c52a
User: Martin Janicek <mjanicek@netbeans.org>
Log: #225950 - Adding Groovy class to Web App Project messes up compilation class path
Comment 14 Martin Janicek 2013-02-12 08:05:32 UTC
(In reply to comment #12)
> BTW, there is a very nice little Groovy framework called Gaelyk available for
> the Google App Engine. However, I was stalled with the GAE Plugin in 7.2.1 and
> have raised bug #225383 here, which nobody has paid any attention too. 

The problem is we are not maintaining GAE Plugin anymore (don't know the reason maybe PetrJ know more). I can take a look at the plugin sources but given the fact I have never seen the source code before I have similar chances for fixing the problem as you would have ;)

> You seem to know most of the organisation well, so maybe you can get somebody > to look at it.

Ye, I'll ask few guys from core team (they were working on Kenai support etc.) and maybe they will know more about it..
Comment 15 Quality Engineering 2013-02-14 01:06:21 UTC
Integrated into 'releases', will be available in build *201302132200* or newer. Wait for official and publicly available build.
Changeset: http://hg.netbeans.org/releases/rev/92009cc2f642
User: Martin Janicek <mjanicek@netbeans.org>
Log: #225950 - Adding Groovy class to Web App Project messes up compilation class path
Comment 16 Vladimir Riha 2013-02-14 12:15:37 UTC
Verified in 7.3


Product Version: NetBeans IDE 7.3 (Build 201302132200)
Java: 1.7.0_15; Java HotSpot(TM) Client VM 23.7-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_15-b02
System: Linux version 3.2.0-35-generic-pae running on i386; UTF-8; en_US (nb)


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