Community
Participate
Working Groups
Build Identifier: 20110615-0604 It's not a bug with an obviously recreatable problem as it seems volume related. I created a new dynamic web project, and dumped code into it from our SCM system, so its a clean project. This is a large single monolithic J2EE project with almost 18,000 files in it. Added the user libraries and refreshed the project. After a while the build completed, and the Problems tab highlighted one error. Internal validation error | multiSelectionFiles.js | /AdaptV11.7/WebApp/controls/DocumentLibrary/js | line 0 | JavaScript Problem On clicking the error in the Problems tab, it takes me to a file. There are no obvious errors in the file (the red X appears on the first line which is just a comment) and right clicking and selecting "validate" also says there is nothing wrong with the file. If I empty the file and save it, I still get the error. If I actually delete the file from the project, the error moves on to the next file in the tree. If I delete that one too, that particular error disappears (but I get a lot of other build errors at that point). If I re-get the files from our SCM and do a clean. The error is back to the original file. Sorry its not much to go on but I dont have a better way of recreating it as it's not related to the contents of any particular file. Reproducible: Always Steps to Reproduce: I dont have a particular way to recreate it - I'm just getting a project from SCM and hitting refresh.
Created attachment 198821 [details] Stack trace from Problems tab
Thanks for the report. Unfortunately, without a reproducible scenario there is little we can do. These types of problems are often caused by something specific in the code. It most likely does have something to do with the file mentioned below. If you can provide us a small reproducible scenario (i.e. sample code) that would be great, otherwise, we'll probably end up closing this bug.
Similar stack reported in BUG350590: Build Identifier: Indigo SR0 Javascript package When importing an existing project, I get the following exception java.lang.ArrayIndexOutOfBoundsException: -4 at org.eclipse.wst.jsdt.internal.compiler.parser.Parser.consumeEmptyStatement(Parser.java:1915) at org.eclipse.wst.jsdt.internal.compiler.parser.Parser.consumeRule(Parser.java:2932) at org.eclipse.wst.jsdt.internal.compiler.parser.Parser.parse(Parser.java:5802) at org.eclipse.wst.jsdt.internal.compiler.parser.Parser.parse(Parser.java:6036) at org.eclipse.wst.jsdt.internal.compiler.parser.Parser.parse(Parser.java:5988) at org.eclipse.wst.jsdt.internal.compiler.SourceElementParser.parseCompilationUnit(SourceElementParser.java:1302) at org.eclipse.wst.jsdt.internal.core.CompilationUnit.buildStructure(CompilationUnit.java:192) at org.eclipse.wst.jsdt.internal.core.Openable.generateInfos(Openable.java:241) at org.eclipse.wst.jsdt.internal.core.JavaElement.openWhenClosed(JavaElement.java:538) at org.eclipse.wst.jsdt.internal.core.BecomeWorkingCopyOperation.executeOperation(BecomeWorkingCopyOperation.java:39) at org.eclipse.wst.jsdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:742) at org.eclipse.wst.jsdt.internal.core.JavaModelOperation.runOperation(JavaModelOperation.java:802) at org.eclipse.wst.jsdt.internal.core.CompilationUnit.getWorkingCopy(CompilationUnit.java:967) at org.eclipse.wst.jsdt.internal.core.CompilationUnit.getWorkingCopy(CompilationUnit.java:936) at org.eclipse.wst.jsdt.internal.ui.wizards.ClassPathDetector.visitCompilationUnit(ClassPathDetector.java:142) at org.eclipse.wst.jsdt.internal.ui.wizards.ClassPathDetector.visit(ClassPathDetector.java:227)
*** Bug 350590 has been marked as a duplicate of this bug. ***
I see this problem when I include the source for d3.js (http://mbostock.github.com/d3/) in the WebContent directory of my dynamic web project.
I see the same problem when I create a Dynamic Web project and import the code from the jQuery in Action book. (http://www.manning.com/bibeault2/jqia2.source.zip) into the WebContent folder. The error I get is: Internal validation error java.lang.ArrayIndexOutOfBoundsException: -3 at org.eclipse.wst.jsdt.internal.compiler.parser.Parser.consumeEmptyStatement(Parser.ja va:1915) at org.eclipse.wst.jsdt.internal.compiler.parser.Parser.consumeRule(Parser.java:2932) at org.eclipse.wst.jsdt.internal.compiler.parser.Parser.parse(Parser.java:5802) at org.eclipse.wst.jsdt.internal.compiler.parser.Parser.parse(Parser.java:6036) at org.eclipse.wst.jsdt.internal.compiler.parser.Parser.parse(Parser.java:5988) at org.eclipse.wst.jsdt.internal.compiler.parser.Parser.dietParse(Parser.java:4593) at org.eclipse.wst.jsdt.internal.compiler.Compiler.internalBeginToCompile(Compiler.jav a:549) at org.eclipse.wst.jsdt.internal.compiler.Compiler.beginToCompile(Compiler.java:319) at org.eclipse.wst.jsdt.internal.compiler.Compiler.compile(Compiler.java:333) at org.eclipse.wst.jsdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImag eBuilder.java:288) at org.eclipse.wst.jsdt.internal.core.builder.BatchImageBuilder.compile(BatchImageBuil der.java:86) at org.eclipse.wst.jsdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImag eBuilder.java:227) at org.eclipse.wst.jsdt.internal.core.builder.BatchImageBuilder.build(BatchImageBuilder. java:58) at org.eclipse.wst.jsdt.internal.core.builder.JavaBuilder.buildAll(JavaBuilder.java:291) at org.eclipse.wst.jsdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:199) at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:728) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:199) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:239) at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:292) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:295) at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java: 351) at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:374) at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:143) at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:241) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
I fixed the problem I was having by removing the jquery-1.6.2.js file I had copied into the scripts folder. That folder already had jquery-1.4.js.
On Eclipse Indigo SR1 For a simple project with just one JS file, everything works fine. For a large project with many JS files (including linked resources) I am getting this: Internal validation error java.lang.ArrayIndexOutOfBoundsException: -2 at org.eclipse.wst.jsdt.internal.compiler.parser.Parser.consumeEmptyStatement(Parser.java:1915) at org.eclipse.wst.jsdt.internal.compiler.parser.Parser.consumeRule(Parser.java:2932) at org.eclipse.wst.jsdt.internal.compiler.parser.Parser.parse(Parser.java:5802) at org.eclipse.wst.jsdt.internal.compiler.parser.Parser.parse(Parser.java:6036) at org.eclipse.wst.jsdt.internal.compiler.parser.Parser.parse(Parser.java:5988) at org.eclipse.wst.jsdt.internal.compiler.parser.Parser.dietParse(Parser.java:4593) at org.eclipse.wst.jsdt.internal.compiler.Compiler.internalBeginToCompile(Compiler.java:559) at org.eclipse.wst.jsdt.internal.compiler.Compiler.beginToCompile(Compiler.java:328) at org.eclipse.wst.jsdt.internal.compiler.Compiler.compile(Compiler.java:342) at org.eclipse.wst.jsdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:288) at org.eclipse.wst.jsdt.internal.core.builder.BatchImageBuilder.compile(BatchImageBuilder.java:86) at org.eclipse.wst.jsdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:227) at org.eclipse.wst.jsdt.internal.core.builder.BatchImageBuilder.build(BatchImageBuilder.java:58) at org.eclipse.wst.jsdt.internal.core.builder.JavaBuilder.buildAll(JavaBuilder.java:291) at org.eclipse.wst.jsdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:199) at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:728) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:199) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:239) at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:292) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:295) at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:351) at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:374) at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:143) at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:241) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
The patch proposed for the issue in https://bugs.eclipse.org/bugs/show_bug.cgi?id=356446 (which is a duplicate of this issue)
About the code to reproduce. I didn't search for a real and working code which makes this issue happen but you'll see the exceptions in Error log if you insert the following line at the very beginning of any JavaScript file: {code} f{} {code} Probably some jQuery minified scripts contain a constructions like this (not sure) but also this code is possible to be often typed manually by a developer, who's starting to type his own JavaScript.
Don't use "{code}" word while reproducing the issue. the only text between "{code}" words is to be used. It's just to divide the text of the comment from the text of JS-code. Sorry, forgot that formatting like "{code}" is not working here.
I am also running into the problem when trying to include the d3.js source in my web project as well. The problem is very reproducible. Just download http://d3js.org/d3.v2.js and stick it into the WebContent directory of any Dynamic Web Project. When you perform a build (or autobuild), the error occurs in the parser. (In reply to comment #5) > I see this problem when I include the source for d3.js > (http://mbostock.github.com/d3/) in the WebContent directory of my dynamic web > project.
*** Bug 380478 has been marked as a duplicate of this bug. ***
(In reply to comment #13) > *** Bug 380478 has been marked as a duplicate of this bug. *** Still seeing the same problem in Juno. Have got so used to running with the javascript validator turned off I had forgotten about it though.
Per this thread [1] vjet team was asked to look at this bug to see if it also applies to vjet. I am not able to reproduce this bug with VJET. The only validation module that JSDT and VJET share is the syntax validation. The semantic / flow validation that is done by VJET is done on the VJET Jst model not on the raw AST produced by JSDT parser. [1] http://dev.eclipse.org/mhonarc/lists/vjet-dev/msg00022.html
Marking as a dupe of bug 356446 (even though it is newer) because there is a patch attached there. *** This bug has been marked as a duplicate of bug 356446 ***
I'm still seeing the problem in Version: Juno Service Release 2 Build id: 20130225-0426. Was the patch applied for this version?