JavaScript validator throws NullPointerException in Eclipse - 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.

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/

Project->Properties->Builders then disable 'Javascript Validator
http://blindcoder.wordpress.com/2011/03/04/javascript-validator-problem-in-eclipse/

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

I am using the Spring Source Tool Suit IDE and i have fixed this issue by following the below steps :
select the Project and choose the properties option.
Select JavaScript > Include Path option and then choose the Source tab.
Click on Edit button and Click Add button.
Now enter the value for Inclusion Pattern as *.js then click on Ok button and Finish.
I have solved my problem in this way. Please let me know if any one have any other way to solve this problem.

Just go to Project -> Build Automatically and disable this option.. you won't need it anyway with PHP.. because there is nothing to be build.. but this solves the NPE thrown at each save or f5 action

For those of you who are having trouble with 'dynamic web projects', you may find that none of the other answers work.
I tried all the options stated here and found that disabling the 'Faceted Project Validation Builder' solved the problem..
right click project --> Builders --> uncheck the 'Faceted Project Validation Builder'

I ran into the same problem and the above suggestions would not resolved it completely unless until I came across to this post # How do I remove javascript validation from my eclipse project?
But even then after doing all (as given the other post url), had to manually removed the "Problems" tab statements like 'Errors' and 'warning' then only it goes away completely at least in Eclipse Juno.
Hope it helps someone.

This is a problem that has happened to me on some Web Dynamic projects. Every time the project is built, I get this error:
Errors occurred during the build.
Errors running builder ‘JavaScript Validator’ on project ‘some-project’.
java.lang.NullPointerException
At a first sight it seems that a Javascript validator is throwing a NullPointerException, so probably you will try to disable Client-side Javascript validation from Project->Properties->Validation… but I tell you that the problem is not there, you must go to
Project->Properties->Builders
then disable Javascript Validator.
Problem solved.

Project->Properties->Builders then disable 'Javascript Validator,
this fixed my problem:
Errors occurred during the build.
Errors running builder 'JavaScript Validator' on project 'xxx'.
29

This is a problem that has happened to me on some Web Dynamic projects. Every time the project is built, I get this error:
“Errors occurred during the build. Errors running builder ‘JavaScript
Validator’ on project ‘some-project’. java.lang.NullPointerException”
At a first sight it seems that a Javascript validator is throwing a NullPointerException, so probably you will try to disable ‘Client-side Javascript’ validation from Project->Properties->Validation… but I tell you that the problem is not there,
you must go to Project->Properties->Builders then disable ‘Javascript
Validator’.
Problem solved. Indeed is not a real problem, but the message is a bit annoying because it happens in every build

in my case, right clicking on project -> "Project->Properties->Builders then disable 'Validation" worked for me.

I had the same error. It happened after adding the D3 js libraries.
My solution to get rid of it:
-I moved the libraries to a server and the html page gets them from there.
-Removed the libraries from the project as they weren't needed there.
Problem solved for me.
Recommandation:
- remove the latest added libraries from your project and see if the error message disappears.
- get the libraries dynamically (in the html) from a server but do not have them in your project.
It doesn't solve the root of the problem but it does help to get rid of immediate frustrations.
Good luck.

Disabling ‘Javascript Validator’ is not the ideal solution. It is just hiding the problem.
What worked for me is this:
Switch to a new or a different workspace from File >Switch Workspace
and then import your existing project into this new workspace.
Problem solved.

Related

Symfony cache eclipse xDebug

I have a really frustrating problem with eclipse PDT. When I am debugging I am getting exceptions all the time(which should not be there) I suspect the eclipse cached some of the files and this is the reason why I am getting those exceptions. I am sure that the code is correct at least where eclipse is throwing the exceptions since when I look at the code in NetBeans I can step over it without getting any exceptions whatsoever. There's a checkbox for symfony in NetBeans which can ignore the symfony cache and I guess that's why I am able to debug in there. However I very much like eclipse and I'd like to use it as a debuging and coding tool.
P.S.
I have cleared the symfony cached via cmd and tried again but I had no luck.
I am open to any suggestions that'd fix my issue, thanks!
P.S.2
I am using ecliplse luna and symfony 1.2
I know that it is too late, but I am posting the answer for any who might still struggle with this issue. The problem in my case was that in the debug view in eclipse I have had some variables that could not be resolved in the context when I was debugging (for example old variables that I have watched in other debug sessions). And when they were miscalculated eclipse's debugger had stopped responding. So if you have a similar problem my suggestion would be: first clear all previous variables from the debug view.

Red code errors not showing up?

I am having trouble trying to activate(?) red error codes in MyEclipse Pro 2014 (I have the same problem in Eclipse Luna). I just downloaded it today and whenever I make an error, even on purpose like a misspelled keyword, MyEclipse won't show red marks on the side like how IDEs usually do. Is there any way I can fix this? Also, content assist doesn't work for me neither. Any help would be greatly appreciated!
Check that you have the Java editor configured in preferences, file associations, as the default editor for Java files. If you're using the text editor, then content assist won't be available although errors should show up after saving the file. However, if you have disabled or removed the Java builder (in the project's properties Builders page), then no marks will show up. Try a new project in a new workspace to check if the problem persists.

Unable to add breakpoint in eclipse

I have same problem as mentioned in this question.
Unable to install breakpoint in sample.java due to missing line number attribute. Modify compiler options to generate line number attributes.
Reason:
Absent line number information
But the interesting part is my preference has already have the setting suggested as the answer. Could anyone please tell me if we have any other working solution for that.
I had the same issue and couldnt find a solution.
I eventualy selected "Restore Defaults" button and selected "apply" button and my problem was solved.
Are you trying to set a breakpoint in the source file? Or did you open the Class file and trying to set the breakpoint? If the source file is in a different project and if you have added the compiled jar of that project in another project, you might get this error.
Check if those settings are different for your project, by right-clicking it on Project Explorer and selecting Properties.

Method listings when typing '.' after an object

Normally when you put the '.' after an object and wait you get a list of methods/fields/classes that one can access. My eclipse no longer does this for me. I spent 10-15 minutes searching for a way to turn it back on and I came up empty. How can I turn this back on?
You can try mucking around in
Preferences > Java > Editor > Content Assist
and see what you get. I've had this once before; eclipse got into a bad state and wouldn't code complete for a given project. Reverting changes in the project got rid of some errors and it started working again.
Assuming you're using Java you need to look at setting Java -> Editor -> Content Assist. You want to make sure that "Enable auto activation" is checked and the other options are set to your taste. The auto activation trigger should be the period.
It may not work if you have an error in your code.

Can we set a timeout for the Eclipse function hint list?

is it possible to set a timeout for the Eclipse function hint list?
Waiting for the full function list to load simply pisses me off...:(
First, you can trigger the content assist immediately by hitting Ctrl-Space.
Second, you can set the delay under Window->Preferences->Java->Editor->Content Assist->Auto-Activation. Non-Java editors may have separate settings. You can type search terms on top of the prefence window to see all related settings.
I would like to add on this by pointing out that I was facing the same kind of issue in Eclipse Mars Version 4.5.0 M1.
I got this error :
I managed to solve it by disabling the following setting "Code Recommenders proposals" from Window\preferences\Java\Editor\Content Assist\Advanced
Disable it from both Default proposal kind and Content cycling . Restart eclipse , and the error is gone.
I don't know why this happens, or what the addon does. Maybe someone can elaborate on it.