Question

I'm using MacOsX 10.6.4.

Some time ago I run into problems with Eclipse (it wouldn't start anymore - I opened a question here and followed all the suggestion but with no luck). Then I also run into very similar problems with other java applications, of which the last one is the android sdk. All these problems seem to be related with xerces/xml, as the following exception shows (just running tools/android and clicking on the "available updates" button):

Exception in thread "Loading Source" java.lang.AbstractMethodError: org.apache.xerces.dom.DeferredElementNSImpl.getTextContent()Ljava/lang/String;

Is there any way to repair the java installation (reinstalling the OS is out of the question)?

thanks a lot

Nicola Montecchio

Was it helpful?

Solution

Some things to try:

  1. Look for adventitious xerces JARs that may have been inadvertently left in one of the directories of the System property java.ext.dirs.

    /Users/*/Library/Java/Extensions
    /Library/Java/Extensions
    /System/Library/Java/Extensions
    /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/ext
    
  2. Use spotlight to search for extraneous xerces JARs outside of Eclipse.

  3. Remove /Applications/eclipse and ~/.eclipse; reinstall Eclipse.

  4. Reinstall Java from the the installer DVD: /Volumes/Mac OS X Install DVD/Optional Installs/Xcode Tools/Packages/JavaSDK.pkg.

  5. Check Software update.

OTHER TIPS

Thanks Trashgod,

Have a Huginn on me.

That not only solved my Eclipse/Android issue (Same as Nicola's) but also the failure of the Netbeans updater (Every version from 6.5 to 7.2) to work properly.

I found my little xerces bomb lurking in /User//Library/Java/Extensions and everything in there was from 2003/4 (Before I bought the Mac. Hmm...). Anyhow, being a cautious type I just renamed the offender to xerces.jar.old. That doesn't work. Netbeans still had it open when I interrogated the task today. So, I moved the entire Java folder to Previous_Java eh voila!

Machine behaves normally, java runs (7 from Oracle not 6.x from Apple and SDK), Android does stuff, Eclipse does stuff, Netbeans starts without bombing or going into a death spiral re-start loop.

A note for any Netbeans users with this problem... It can be amazingly frustrating trying to track it down.

regs

Tim

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top