Saturday, December 31, 2005

Eclipse Startup Issue: java.lang.ClassNotFoundException: javax.xml.parsers.SAXParserFactory

Today when I started my Eclipse, it simply refused to!!! It simply flashed an alert asking to look into log file. And log file simply said:


!SESSION Dec 31, 2005 10:50:19.810 ---------------------------------------------
eclipse.buildId=I200406251208
java.version=1.3.1_01
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US

!ENTRY org.eclipse.osgi Dec 31, 2005 10:50:19.810
!MESSAGE Error registering XML parser services.
!STACK 0
java.lang.ClassNotFoundException: javax.xml.parsers.SAXParserFactory
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 java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at org.eclipse.core.runtime.adaptor.EclipseAdaptor.registerEndorsedXMLParser(EclipseAdaptor.java:272)
at org.eclipse.core.runtime.adaptor.EclipseAdaptor.frameworkStart(EclipseAdaptor.java:253)
at org.eclipse.osgi.framework.internal.core.SystemBundleActivator.start(SystemBundleActivator.java:61)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:958)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:954)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:937)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:553)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:477)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:273)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.launch(StartLevelManager.java:243)
at org.eclipse.osgi.framework.internal.core.SystemBundle.resume(SystemBundle.java:166)
at org.eclipse.osgi.framework.internal.core.Framework.launch(Framework.java:425)
at org.eclipse.osgi.framework.internal.core.OSGi.launch(OSGi.java:51)
at org.eclipse.core.runtime.adaptor.EclipseStarter.startup(EclipseStarter.java:216)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:127)
at java.lang.reflect.Method.invoke(Native Method)
at org.eclipse.core.launcher.Main.basicRun(Main.java:183)
at org.eclipse.core.launcher.Main.run(Main.java:644)
at org.eclipse.core.launcher.Main.main(Main.java:628)

!ENTRY org.eclipse.osgi Dec 31, 2005 10:50:19.852
!MESSAGE Startup error
!STACK 1
java.lang.NoClassDefFoundError: org/xml/sax/helpers/DefaultHandler
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
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 java.lang.ClassLoader.loadClassInternal(Unknown Source)
at org.eclipse.core.runtime.adaptor.PluginConverterImpl.parsePluginInfo(PluginConverterImpl.java:552)
at org.eclipse.core.runtime.adaptor.PluginConverterImpl.fillPluginInfo(PluginConverterImpl.java:111)
at org.eclipse.core.runtime.adaptor.PluginConverterImpl.convertManifest(PluginConverterImpl.java:655)
at org.eclipse.core.runtime.adaptor.EclipseBundleData.generateManifest(EclipseBundleData.java:219)
at org.eclipse.core.runtime.adaptor.EclipseBundleData.loadManifest(EclipseBundleData.java:177)
at org.eclipse.core.runtime.adaptor.EclipseBundleData.getManifest(EclipseBundleData.java:159)
at org.eclipse.core.runtime.adaptor.EclipseBundleData.loadFromManifest(EclipseBundleData.java:266)
at org.eclipse.osgi.framework.internal.defaultadaptor.DefaultBundleData.initializeNewBundle(DefaultBundleData.java:77)
at org.eclipse.osgi.framework.internal.defaultadaptor.DefaultAdaptor$1.begin(DefaultAdaptor.java:451)
at org.eclipse.osgi.framework.internal.core.Framework.installWorkerPrivileged(Framework.java:746)
at org.eclipse.osgi.framework.internal.core.Framework$2.run(Framework.java:664)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.framework.internal.core.Framework.installWorker(Framework.java:715)
at org.eclipse.osgi.framework.internal.core.Framework.installBundle(Framework.java:659)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.installBundle(BundleContextImpl.java:219)
at org.eclipse.core.runtime.adaptor.EclipseStarter.installBundles(EclipseStarter.java:800)
at org.eclipse.core.runtime.adaptor.EclipseStarter.loadBasicBundles(EclipseStarter.java:429)
at org.eclipse.core.runtime.adaptor.EclipseStarter.startup(EclipseStarter.java:222)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:127)
at java.lang.reflect.Method.invoke(Native Method)
at org.eclipse.core.launcher.Main.basicRun(Main.java:183)
at org.eclipse.core.launcher.Main.run(Main.java:644)
at org.eclipse.core.launcher.Main.main(Main.java:628)

!ENTRY org.eclipse.osgi Dec 31, 2005 10:50:19.863
!MESSAGE Bundle initial@reference:file:c:/eclipse0/plugins/org.eclipse.core.runtime_3.0.0/ [192] was not resolved.


I checked the classpath. Everything seemed same as before. So, what to do? I simply picked up the Eclipse from a collegue's machine and started it. and What?!!! It bombed again, saying the same old story. Then I checked that Eclipse was not working on his machine as well. So what to do now?
Then it occured to me that something else is interrupting Eclipse to start; something that is a new installed entity for both the machines. Both of us had installed Oracle 9i client a day before, it was the first time that the Eclipse was being restarted. So, I simply modified the 'path' entry - remove
C:\Program Files\Oracle\jre\1.3.1\bin;C:\Program Files\Oracle\jre\1.1.8\bin;
from the path, and restart Eclipse. It works again!

Wednesday, December 28, 2005

Useless Facts

  1. It is impossible to lick your elbow.
  2. A crocodile can’t stick it’s tongue out.
  3. A shrimp’s heart is in their head.
  4. A pregnant goldfish is called a twit.
  5. On average, a human being will have sex more than 3,000 times and spend two weeks kissing in their lifetime.
  6. Rats and horses can’t vomit.
  7. If you sneeze too hard, you can fracture a rib. If you try to suppress a sneeze, you can rupture a blood vessel in your head or neck and die. If you keep your eyes open by force, they can pop out.
  8. Rats multiply so quickly that in 18 months, two rats could have over million descendants.
  9. Wearing headphones for just an hour will increase the bacteria in your ear by 700 times.
  10. If the government has no knowledge of aliens, then why does Title 14, Section 1211 of the Code of Federal Regulations of US, implemented on July 16, 1969, make it illegal for U.S. citizens to have any contact with extraterrestrials or their vehicles?
  11. The cigarette lighter was invented before the match.
  12. Thirty-five percent of the people who use personal ads for dating are already married.
  13. A duck’s quack doesn’t echo, and no one knows why.
  14. Most lipstick contains fish scales.
  15. Cat’s urine glows under a black-light.
  16. Like fingerprints, everyone’s tongue print is different.

[Received in an email]

Wednesday, December 7, 2005

Remote Debugging with Eclipse

Levent Gurses has published an article on Remote Debugging with Eclipse. He has touched Weblogic, JBoss and Tomcat server.

toString() Generator plugin for Eclipse

While working in my latest project, I came across a situation where I needed a toString method for my TO (Transfer Object) classes. Instead of using reflection, I simply downloaded Eclipse Plugin for toString generation. Restart the Eclipse and it is ready to be used. For any class that require a toString(), switch to Package Explorer, and right click on the class name. Select 'Generate toString' from the context menu, select the fields, and the method is there in the class!

I had this plugin for quite some time, and had actually forgotton that its not the part of Eclipse. So, in my current project, when I failed to see 'toString generator', I realized it a plugin :)

Besides toString, if you like to see equals() and hashCode() methods as well, use Commonclipse plugin.

Total Pageviews

Reading List - 05-Mar-23

Talking to #AI may be the most important job skill of this century ( JohnGoodPasture ) Role of account management over the years. It’s a ro...