Org.apache.xerces.jaxp.SAXParserFactoryImpl not found when importing the Gears API into GWT

I created a GWT project using Eclipse that worked perfectly (I was able to run it in both Hosted mode and the Google Engine application) until I tried to import the Gears API for the Google Web Toolkit . After adding the following line to the java source file:

import com.google.gwt.gears.client.geolocation.Geolocation; 

When trying to compile the following error:

 19-Jun-2009 3:36:09 AM com.google.apphosting.utils.jetty.JettyLogger warn WARNING: failed com.google.apphosting.utils.jetty.DevAppEngineWebAppContext@1c7d682{/,C:\Documents and Settings\Geoff Denning\workspace\TaskPath\war} javax.xml.parsers.FactoryConfigurationError: Provider org.apache.xerces.jaxp.SAXParserFactoryImpl not found 

I already added the gwt-gears.jar file to the \ war \ WEB-INF \ lib directory, and I referenced it in Eclipse as follows:

Java build path in Eclipse http://i41.tinypic.com/148klk4.png

I even opened the gwt-gears.jar file and confirmed that org / apache / xerces / jaxp / SAXParserFactoryImpl.class exists. Can someone give me any guidance as to why I am getting the above error?

+7
java gwt xerces
source share
6 answers

Apparently this is a bug in 1.5. I was able to solve the problem by switching the standard JRE in Eclipse from 1.5.0_06 to 1.6.0_03, as shown below:

Eclipse Installed JRE http://i40.tinypic.com/15fktvd.png

Thanks to Jon and Rahul for pointing me in the right direction.

+2
source share

Make sure Xerces exists in:

 $JAVA_HOME/lib/endorsed 

Sounds like a Java 5 issue. Also check the Java system property for:

 javax.xml.parsers.SAXParserFactory 

It should be:

 org.apache.xerces.jaxp.SAXParserFactoryImpl 

If not, make sure you set the system property.

+5
source share

It happened to me. I had conflicting JARs in my workspace. I deleted one and earned. The message did not lend itself very well to the root of the error.

+1
source share

My SAXParserFactoryImpl problem was caused by gwt-gadgets.jar. I had in my path to the loading class. Removing this JAR from the load class path solved the problem for me. Basically you should remove any JAR containing the SAXParserFactoryImpl class from your build path (user libraries) .

+1
source share

Delete the file $ JAVA_HOME / jre / lib / jaxp.properties, fixing the problem.

0
source share

Take a look at Problems with Selenium (XercesImpl) and the Google App Engine . I had a similar problem with GWT / GAE (SAXParserFactoyImpl not found) and solved it:

  • Import banks into the war / WEB -INF / lib
  • Adding a can to the build path
0
source share

All Articles