- This topic has 24 replies, 8 voices, and was last updated 13 years, 5 months ago by support-swapna.
-
AuthorPosts
-
christweekieMemberHi
I posted this by mistake in the MyEclipse – Blue area by mistake. So I am posting here again.
This is something I have had problems with before but I have never posted the issues.
I have a lot of javascript resources and myeclipse just seems to want to validate all of them. I have tried the following
1. right click on the folder or individual JS resource and do MyEclipse -> Exclude from validation
2. Preferences -> MyEclipse -> Files and Editors -> Validation, toggle suspend all validators and don’t allow projects to override the setting.When I do 2, a full build is started at wioch point, Myeclipse throws a NPE
“org.eclipse.core.internal.resources.ResourceException: Errors occurred during the build.
Errors occurred during the build.
Errors running builder ‘JavaScript Validator’ on project ‘xxx”.
java.lang.NullPointerException”At the end of all this, I still see red bobs next to my JS files. Also, the whole thing takes ages because I have a local install of something called DOJO which has lots of JS files.
Thanks
Chris
support-swapnaModeratorchristweekie,
Sorry that you ran into issues.
1) Can you share your installation details with us from MyEclipse > Installation Summary > Installation Details ? Please paste it here for me to replicate this issue.
2) Start MyEclipse with – clean as argument. Here is how it can be done :
https://www.genuitec.com/forums/topic/troubleshoot-using-the-clean-command-line-argument/3) Switch to a new workspace. Create a new web project,put some error in the index.jsp and check if the issue persists.
Let me know how this works for you.
christweekieMemberHi
1. I am on Myeclipse 9.1M2 but javascript validation is something I have had problems with on previous versions. I’ve always had difficulty excluding resources (not just JS).
*** Date:
Wednesday, 16 March 2011 11:34:05 o’clock GMT** System properties:
OS=WindowsXP
OS version=5.1.0
Java version=1.6.0_13*** MyEclipse details:
MyEclipse Enterprise Workbench
Version: 9.0M2
Build id: 9.0M2-20110121*** Eclipse details:
MyEclipse Enterprise WorkbenchVersion: 9.0M2
Build id: 9.0M2-20110121Eclipse startup command=-os
win32
-ws
win32
-arch
x86
-showsplash
-launcher
C:\Program Files\MyEclipse\MyEclipse 9.0 M2\myeclipse.exe
-name
Myeclipse
–launcher.library
C:\Program Files\MyEclipse\MyEclipse 9.0 M2\../Common/plugins/org.eclipse.equinox.launcher.i18n.win32.win32.x86_3.2.0.v201012131400\eclipse_3210.dll
-startup
C:\Program Files\MyEclipse\MyEclipse 9.0 M2\../Common/plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar
-install
C:\Program Files\MyEclipse\MyEclipse 9.0 M2
-configuration
C:\Program Files\MyEclipse\MyEclipse 9.0 M2\configuration
-vm
C:\Program Files\MyEclipse\Common\binary\com.sun.java.jdk.win32.x86_1.6.0.013\jre\bin\client\jvm.dll2. Yes – tried that but it doesn’t help.
3. It wasn’t a JSP file, it is a mass of javascript files – (.js extension).
So I created a new workspace, suspended all the validators, imported the project with all the JS files and yes, the error came back. I see loads of red blobs next to my JS files and the same NPE popping up in the dialog.I pay for MyEclipse but right now, it is completely unusable.
Thanks
Chris
support-swapnaModeratorchristweekie,
We already have a PR raised on this issue and the fix will be available along with MyEclipse 9.0 GA release.
Sorry for the inconvenience caused.
Florian FischerMemberI installed the latest 9.0 release, and it is not fixed.
What is the “GA” release?
PS: so far, the only way I found to disable javascript validation is to remove *.js from the include group of the Javascript file type.
– go to Project > Properties > MyEclipse > Validation
– click the […] button of the JavaScript validator
– remove file extension .js from the Include Group.
support-swapnaModeratorflorianfj,
1) A Generally Available (GA) release is a production release which is stable.
2) Share your build id from Help > About MyEclipse Enterprise Workbench. Paste it here for me.
1. right click on the folder or individual JS resource and do MyEclipse -> Exclude from validation
Once you select the Exclude from Validation, you need to make a change and then save the js file to remove the errors. Ex : Hit space and then save it.
2. Preferences -> MyEclipse -> Files and Editors -> Validation, toggle suspend all validators and don’t allow projects to override the setting.
I tried to replicate it at my end and I did not see the NPE nor any errors logged in the error view. Do you see any errors in the Error Log tab?
3) Switch to a new workspace, create a simple web project with a js file and check if the issue persists. Also please list out the steps you followed for me to check at my end.
Florian FischerMemberHello,
I came here searching for “disable javascript validation”.
Actually in my case it doesn’t crash. It is just that MyEclipse ignores all my efforts to disable validation of JavaScripts. It could be related, I guess.
I could open a new topic for this specific symptom if you prefer.
Anyway: I downloaded MyEclipse yesterday. Build id: 9.0-20110318.
What I do is:
– open MyEclipse 9 in a fresh workspace,
– create a new Web project,
– create a script.js file under WebRoot, with a single line:
var swfobject=function(){var A=0};
This file generates a warning. None of the following removed the warning.
– right-click script.js, exclude from validation,
– disable the Javascript validator (in Preference > MyEclipse > Validation)
– suspend all validators
Even if I clean the project afterwards.
christweekieMemberHi
I downloaded the latest release and despite your promise, this clearly isn’t fixed. Worse, MyEclipse is now giving me memory warnings. Given that these are new, I strongly suspect that these are related to the fact that it is repeatedly validating, failing and re-validating files that it shouldn’t even be looking at. I have turned off validation on JS files everywhere possible. I have restarted with -clean and all to no avail.
This is bad. MyEclipse is unusable for me right now.
Chris
support-swapnaModeratorflorianfj,
Here are the steps to exclude your js file from validation :
1) Right click on project > Properties > MyEclipse > Validation > Excluded Resources.
2) Select your js file here to exclude from validation. Apply the changes. This will revalidate the resources.Attached is the screenshot of the property page.
Let me know how it works for you.
Attachments:
You must be logged in to view attached files.
Florian FischerMemberFunnily, that works.
I tried right-click scripts.js > MyEclipse > Remove from validation. That didn’t work, but it appears that a clean project or run validation clear the warnings. So it works properly.
That definitely didn’t work in my actual project. I cleaned and ran validation with no result.
I tried your solution on my actual project. Now, whenever I clean the project, it validates it twice. The first time It validates all the excluded JS files and displays 100+ errors. The second time, it validates properly and removes these warnings. It is better, but still annoying.
And it remains a mystery to me why you cannot disable JS validation altogether:
– Project properties > MyEclipse > Validation > uncheck JavaScript validator
or
– Project properties > MyEclipse > Validation > check Suspend all validationsAnyway, for time being I excluded *.js files from JS validation and don’t want to loose too much time on that.
support-swapnaModeratorflorianfj,
I could replicate the issue at my end. I will file a PR for the dev team to work on it.
Sorry for the inconvenience caused.
david.wadeMemberJust clean installed 9 GA. Created new workspace. Added project in new workspace. Suspended all Validators. Excluded entire project from validation.
Yet still, Javascript validation runs, gives bogus errors and project gets this during a rebuild.
Errors occurred during the build.
Errors running builder ‘JavaScript Validator’ on project ‘vbook-bau-may’.
java.lang.ArrayIndexOutOfBoundsExceptionHowever, I then closed the project, deleted the project in myeclipse, but left disk contents. I then deleted .project, .classpath & .settings. Then I recreated the project… now the validators don’t run.
However, if I now try to manage the exclusions, there is utter and total lockup.
support-swapnaModeratordavid.wade,
Excluded entire project from validation.
How did you exclude the project? Is it using project > Properties > MyEclipse > Validation > Excluded Resources ? If not, can you try excluding the project through the property page instead of suspending all validators?
We already have a PR filed for Suspend All Validators in ME 9.0.However, if I now try to manage the exclusions, there is utter and total lockup.
What exact behavior do you see?
Charlie RocheMemberI have a clean install on MacOSX Snow Leopard (latest update) and I’m experiencing the same thing. I’ve tried every possible combination and nothing works. It’s impossible to remove validation.
One thing I should bring your attention to is this: why are people disabling validation? Maybe because it doesn’t work. I’m seeing errors in publicly available libraries that work fine and don’t give errors. However, the MyEclipse javascript validation thinks they are full of errors. They’re not.
I’ve been a paying customer for the last 5 or 6 years now – paid either by my company (where I advocated they buy licences) or by myself. Personally, this bug is really annoying me, primarily because I’m paying for a product where this problem was not present. I upgrade only to have errors all over my code.
Do us a favor and fix the root cause, or else remove validation altogether, it apparently does not work.
p.s. please don’t waste my time asking me for my installation details – I’ve already wasted enough time. You don’t need them anyway. You guys know perfectly well what the problem is.
Yours, hopefully
Charlie
Brian FernandesModeratorCharlie,
To disable validation, you should be able to go to Project Properties > MyEclipse > Validation > Excluded Resources and check the tree you wish to exclude.
The version of MyEclipse you are using does matter because the JavaScript implementation in 8.6.x vastly differed from the implementations in other versions. We tried a custom in-house solution which, in 8.6.1 was very performant but had to be withdrawn in 9.0 due to compatibility reasons. I realize you have been facing this issue for some time, but giving us the version does help when we try to replicate specific issues.
Given the nature of JS, it is difficult to validate but we have tried to continually improve in this area. Having said that, I realize there are some cases where we are going to be wrong and cases where it can be irritating and useless where a developer doesn’t really care about JS, but just happens to have it in his project.
We are making changes in MyEclipse 9.0.1 where you will be able to simply turn advanced JS capabilities off and also allow validation to be easily turned off globally (I know some of the global settings do not currently work as expected). At the same time, we continue to improve our JS support.
Sorry for the inconvenience caused, I know this is a problem and we are working on it.
-
AuthorPosts