15

I am using eclipse juno.. when i opening javascript file in eclipse it returns the error

java.lang.NoClassDefFoundError: org/w3c/dom/ElementTraversal
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:791)

how can i overcome this..

8
  • do you have web tools platform installed? Commented Dec 12, 2012 at 13:40
  • ya when i opening first time it returns that error ....after the continuous opening opens the file in black letters(that means there is no difference coloring and all elements in black color) Commented Dec 12, 2012 at 13:43
  • have you tried with a clean install of Eclipse? Commented Dec 12, 2012 at 13:52
  • are you sure you have javascript developer tools (for sure) in and/or are not missing any library? Commented Dec 12, 2012 at 14:08
  • here is a related question on the eclipse forum, maybe it will help:eclipse.org/forums/index.php/m/889148 Commented Dec 12, 2012 at 14:12

2 Answers 2

55

I had an issue when I tried using version 2.0.2, but found that when I reverted back to version 1.4.01 and everything worked again.

If you're using Maven:

<dependency> 
    <groupId>xml-apis</groupId>
    <artifactId>xml-apis</artifactId>
    <version>1.4.01</version>
</dependency>
Sign up to request clarification or add additional context in comments.

3 Comments

i agree. but does anyone know what the problem is going forward?
1.4.01 is the newest version for this lib. As it can be noticed here, 2.0.2 is prior to 1.0.b2
I am coming across this error, i am using selenium webdriver with junit and maven. I have added the dependency but the problem persists. Any suggestions?
2

You need xml-apis. Have a look at this:http://www.coderanch.com/t/534171/XML/org-dom-ElementTraversal

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.