Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java lang ClassNotFoundException - com sun xml parser DocumentBuilderImpl

 
Hemang Thanki
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
/*A utility method to check that essential classes that are required for the Applet are visible to the VM.Checks that dependent class files are accessible by attempting to load the classes.
*/
When I run the applet which contains this method, gives the following error :
java.lang.ClassNotFoundException:com.sun.xml.parser.DocumentBuilderImpl
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at com....applet.MyApplet.checkJARExtensions(MyApplet.java:268)
at com....applet.MyApplet.init(MyApplet.java:65)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Method :



Applet: (Many dependent jars for xml parsing)



Note: All the jar files are being downloaded at local machine when applet runs. I tried loading another class from sun-parser.jar but same error. When I run applet locally, it runs fine.

Please help me out.

Thanks,
Hemang
[ January 24, 2007: Message edited by: Hemang Sthankiya ]
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All the jar files are being downloaded at local machine when applet runs.

How did you determine that - by looking at the web server logs and seeing a 200 response code?
 
Hemang Thanki
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

As applet runs on local JVM, it caches all the jars in the following path.
"c:\Documents and Settings\<<user>>\Application Data\Sun\Java\Deployment\cache\javapi\v1.0\jar"

Thanks,
Hemang
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hm... and the file is not currupted and contains the missing classes? Have you tried deleting it to see what happens then?
 
Hemang Thanki
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

When I put sun-parser.jar (same) file in "c:\Program Files\Java\j2re1.4.2_13\lib\ext" folder, it works fine.

But this is not the solution, coz we have to put this in everyone's machine who runs this applet.

Hemang
[ January 25, 2007: Message edited by: Hemang Sthankiya ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic