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 215232 - groovy.transform leads to ClassNotFoundException: javax.servlet.ServletException
Summary: groovy.transform leads to ClassNotFoundException: javax.servlet.ServletException
Status: REOPENED
Alias: None
Product: groovy
Classification: Unclassified
Component: Code (show other bugs)
Version: 7.2
Hardware: All All
: P3 normal with 1 vote (vote)
Assignee: Martin Janicek
URL:
Keywords:
: 208591 226466 226931 227630 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-07-06 15:59 UTC by Jesse Glick
Modified: 2013-08-22 18:46 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 190492


Attachments
stacktrace (5.16 KB, text/plain)
2012-07-06 15:59 UTC, Jesse Glick
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2012-07-06 15:59:36 UTC
Build: NetBeans IDE 7.2 RC1 (Build 201206272359)
VM: Java HotSpot(TM) Client VM, 23.1-b03, Java(TM) SE Runtime Environment, 1.7.0_05-b05
OS: Linux

User Comments:
jglick: Opening LoadMonitor.groovy from Jenkins sources.




Stacktrace: 
java.lang.ClassNotFoundException: javax.servlet.ServletException
   at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
   at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
   at java.security.AccessController.doPrivileged(AccessController.java:0)
   at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
   at groovy.lang.GroovyClassLoader.loadClass(GroovyClassLoader.java:696)
Comment 1 Jesse Glick 2012-07-06 15:59:39 UTC
Created attachment 121790 [details]
stacktrace
Comment 2 Martin Janicek 2012-10-15 16:24:00 UTC
Closing as INCOMPLETE. Can't do anything without reproducible test case or more information and it has only one report
Comment 3 Martin Janicek 2013-03-14 14:25:18 UTC
*** Bug 226466 has been marked as a duplicate of this bug. ***
Comment 4 Jesse Glick 2013-03-18 15:18:39 UTC
Still broken in development builds:

http://statistics.netbeans.org/analytics/detail.do?id=199703
Comment 5 Martin Janicek 2013-03-19 08:18:59 UTC
I'm aware of that, but as I have already mentioned in comment 3 the exception is coming from groovy compiler and I really can't do much without some additional information.
Comment 6 Jesse Glick 2013-03-19 19:37:29 UTC
What additional information are you looking for? I just had Jenkins sources (set of Maven projects) open, installed Groovy support, and when I restarted I got this exception during parsing.

By inspection of the stack trace it is obvious that the Groovy compiler is trying to load the user class org.kohsuke.stapler.CaptureParameterNameTransformation (since this is a @GroovyASTTransformation), but that the effective classpath of the class loader used to do this is incomplete. ASTTransformationVisitor catches Exception but not LinkageError, so the whole parsing process is interrupted. Clearly ASTTransformationVisitor ought to be reporting this via compilationUnit.errorCollector; until it does so in an official Groovy release it needs to be patched for use from an IDE.

In the meantime I will see if CaptureParameterNameTransformation can avoid making even indirect reference to the Servlet API.
Comment 8 Jesse Glick 2013-03-21 14:51:11 UTC
*** Bug 227630 has been marked as a duplicate of this bug. ***
Comment 9 Jesse Glick 2013-03-21 14:51:20 UTC
*** Bug 226931 has been marked as a duplicate of this bug. ***
Comment 10 Jesse Glick 2013-03-21 14:51:33 UTC
*** Bug 208591 has been marked as a duplicate of this bug. ***
Comment 11 Jesse Glick 2013-08-22 18:46:21 UTC
For the record: my fix to Stapler should be in Jenkins 1.520.