Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JavaScript validator throws NullPointerException in Eclipse

Tags:

eclipse

I'm coding some PHP files on Eclipse IDE, and I keep getting an error that says "Building Workspace has encountered a problem" -- Workspace is the name of my project area.

When I click on the "details" link I get this

Errors occurred during the build.
Errors running builder 'JavaScript Validator' on project 'Ullman'.
java.lang.NullPointerException

As mentioned, I'm working in PHP so I don't know why it's trying to set up JavaScript Validator. I can't figure out how to stop it from doing these things. Anyone know?

I'm not experienced, so please provide a detailed answer if you can.

like image 302
Leahcim Avatar asked Apr 12 '11 03:04

Leahcim


3 Answers

I just ran into this problem myself and the previous accepted answer was not helpful. The problem is not the validator, it is the build. To fix go to Project -> Properties -> Builders, then disable ‘JavaScript Validator’. Since you are working with PHP your build is getting confused when you try and validate a PHP file with a JavaScript validator.

The error message doesn't really do anything it just gets annoying really fast.

http://blindcoder.wordpress.com/2011/03/04/javascript-validator-problem-in-eclipse/

like image 127
Cleanshooter Avatar answered Oct 19 '22 01:10

Cleanshooter


Project->Properties->Builders then disable 'Javascript Validator

http://blindcoder.wordpress.com/2011/03/04/javascript-validator-problem-in-eclipse/

like image 76
Carlos Cardenas Avatar answered Oct 19 '22 00:10

Carlos Cardenas


UPDATE: Cleanshooter's answer is the better one for PHP-specific projects. I'm leaving this answer since it is useful for people who run across the error on JavaScript files because of crashes in the JavaScript parser.

You can disable part of the JavaScript validator with Eclipse -> Preferences -> JavaScript -> Validator -> Errors/Warnings and unchecking Enable JavaScript semantic validation

like image 9
Paul Beusterien Avatar answered Oct 18 '22 23:10

Paul Beusterien