Closed pragyajyotishi closed 11 years ago
You should find the root cause in the Error Log view in Eclipse.
JsHint should probably not try to check JSP files, should it?
By Error Log view you mean the Problems tab in Eclipse right?
It is checking the JSP files as well but fails to check one of the JSP. Please see the attached error msg below and once this error is encountered it skips checking rest of the JSPs. And, since it fails to check the jsp file it does not generate the error log for that.
I checked the error log view and got the following exception stack trace but, still unable to make out what could be the problem:
java.lang.RuntimeException: Failed checking file /Frontend/src/main/webapp/jsp/button_permissions.jsp at com.eclipsesource.jshint.ui.internal.builder.JSHintBuilderVisitor.check(JSHintBuilderVisitor.java:112) at com.eclipsesource.jshint.ui.internal.builder.JSHintBuilderVisitor.visit(JSHintBuilderVisitor.java:74) at org.eclipse.core.internal.resources.Resource$2.visit(Resource.java:126) at org.eclipse.core.internal.resources.Resource$1.visitElement(Resource.java:85) at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:82) at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:86) at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:86) at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:86) at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:86) at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:86) at org.eclipse.core.internal.watson.ElementTreeIterator.iterate(ElementTreeIterator.java:127) at org.eclipse.core.internal.resources.Resource.accept(Resource.java:95) at org.eclipse.core.internal.resources.Resource.accept(Resource.java:52) at org.eclipse.core.internal.resources.Resource.accept(Resource.java:124) at org.eclipse.core.internal.resources.Resource.accept(Resource.java:108) at com.eclipsesource.jshint.ui.internal.builder.JSHintBuilder.fullBuild(JSHintBuilder.java:53) at com.eclipsesource.jshint.ui.internal.builder.JSHintBuilder.build(JSHintBuilder.java:34) 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) Caused by: java.lang.RuntimeException: JavaScript exception thrown by JSHint: TypeError: Cannot read property "id" from undefined (jshint library#5571) at com.eclipsesource.jshint.JSHint.checkCode(JSHint.java:195) at com.eclipsesource.jshint.JSHint.check(JSHint.java:152) at com.eclipsesource.jshint.ui.internal.builder.JSHintBuilderVisitor.check(JSHintBuilderVisitor.java:107) ... 28 more Caused by: org.mozilla.javascript.JavaScriptException: TypeError: Cannot read property "id" from undefined (jshint library#5571) at org.mozilla.javascript.gen.jshint_library_20._c_anonymous_218(jshint library:5571) at org.mozilla.javascript.gen.jshint_library_20.call(jshint library) at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:394) at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3091) at org.mozilla.javascript.gen.jshint_library_20.call(jshint library) at com.eclipsesource.jshint.JSHint.checkCode(JSHint.java:192) ... 30 more
The root cause is obviously an error in the jshint library, not in the Eclipse plug-in:
Caused by: org.mozilla.javascript.JavaScriptException: TypeError: Cannot read property "id" from undefined (jshint library#5571)
You should be able to reproduce it with jshint on the command line as well. However, for me the first question is why you're checking JSP (Java Server Pages) with jshint?
Hi,
I am encountering this error pop-up while I am building the project in eclipse. It fails checking one of the jsp files. The exact error msg says:
Building workspace encountered the problem
Errors occurred during the build.
Errors running builder 'JSHint Problem Checker' on project ......project name. Failed Checking file ......path of my jsp file.
Please let me know the root cause of this issue.
Thanks.
Regards, Pragya Jyotishi