Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [atf-dev] java.lang.ClassCastException: org.mozilla.javascript.NativeString


There has been some changes to JSLint that are causing problems when running in ATF.  The ATF runtime uses Rhino as the _javascript_ engine to run JSLint. It could be argued that the latest version of JSLint is relying on a behavior based on implementation of certain _javascript_ syntax. It ends up that Rhino has a implemented this syntax differently and doesn't provide the same behavior. The ATF team is working on resolving the problem. Manoj it would be helpful if you could attach your version of JSLint to bug 186156.

If JSLint is not configured, the ATF runtime will disable the JSLint validator. The ATF runtime will pop-up a warning dialog that JSLint is not configured the first time the JSLint validator tries to run and then disable the JSLint validator. The JSLint validator looks for a variety of coding structures that are considered to be bad practice in _javascript_. Checking for illegal _javascript_ syntax is done by a different validator, so syntax validation is done independently of whether JSLint is configured. All other functionality of ATF will work without having JSLint configured.

The ATF teams long term plans are to replace JSLint validation with a different implementation, but this isn't available yet.

I will post another messaged when the ATF team has a solution to the problem.

   Thanks
     Bob


Robert Goodman
IBM Emerging Technologies
goodmanr@xxxxxxxxxx
512-838-8824    T.L. 678-8824



Manoj.Chavda@xxxxxxxxxxxx
Sent by: atf-dev-bounces@xxxxxxxxxxx

05/25/2007 05:13 AM

Please respond to
AJAX Toolkit Framework discussion <atf-dev@xxxxxxxxxxx>

To
atf-dev@xxxxxxxxxxx
cc
Subject
[atf-dev]         java.lang.ClassCastException: org.mozilla._javascript_.NativeString





Hello all,
 
I’ve followed the instructions on http://www.eclipse.org/atf/downloads/index_build.php?plat=all&buildID=0.2.1-v200704051500&XULPlugin=true
 
I installed eclipse WTP 1.5.2 (fresh install), then installed ATF (atf-0.2.1-v200704051500.zip).  In Windows | Preferences | ATF | _javascript_ Validation, I set the “JSLint Location” value to the location of my jslint.js file.
 
When I save a JSP page (with _javascript_), I get the a popup with the title “_javascript_ JSLint Validator” and text “org.mozilla._javascript_.NativeString”.  The trace below appears in my .metadata/.log file.
 
Does anyone have any ideas on how to fix this?
 
Thanks,
Manoj
 
 
!SESSION 2007-05-25 12:12:02.227 -----------------------------------------------
eclipse.buildId=M20060921-0945
java.version=1.5.0_11
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_ZA
Command-line arguments:  -os win32 -ws win32 -arch x86
 
!ENTRY org.eclipse.atf._javascript_.validator 4 4 2007-05-25 12:12:18.064
!MESSAGE org.mozilla._javascript_.NativeString
!STACK 0
java.lang.ClassCastException: org.mozilla._javascript_.NativeString
      at org.eclipse.atf._javascript_.internal.validation.jslint.JSLintError.<init>(Unknown Source)
      at org.eclipse.atf._javascript_.internal.validation.jslint.JSLint.lint(Unknown Source)
      at org.eclipse.atf._javascript_.internal.validation.JSLintValidator.validateString(Unknown Source)
      at org.eclipse.atf._javascript_.internal.validation.JSAbstractValidator.validateDOM(Unknown Source)
      at org.eclipse.atf._javascript_.internal.validation.JSAbstractValidator.validateFile(Unknown Source)
      at org.eclipse.atf._javascript_.internal.validation.JSAbstractValidator.validateDelta(Unknown Source)
      at org.eclipse.atf._javascript_.internal.validation.JSAbstractValidator.validate(Unknown Source)
      at org.eclipse.atf._javascript_.internal.validation.JSAbstractValidator.validateInJob(Unknown Source)
      at org.eclipse.wst.validation.internal.operations.ValidatorJob.run(ValidatorJob.java:70)
      at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)
 
 _______________________________________________
atf-dev mailing list
atf-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/atf-dev


Back to the top