Xerces JAR on GAE project's classpath leads to “SAXParserFactoryImpl not found”

為{幸葍}努か 提交于 2019-12-08 02:17:10

问题


I'm using the Eclipse plugin for Google App Engine and I'm having a strange issue with a Xerces dependency. On of my classes depends on the Apache Xerces JAR which I have added to the project's classpath. This however, triggers an error when starting the Jetty app server:

WARNING: failed 
com.google.apphosting.utils.jetty.DevAppEngineWebAppContext@6efde050 
{/,/Users/lenni/dev/gate/war} 
javax.xml.parsers.FactoryConfigurationError: Provider 
org.apache.xerces.jaxp.SAXParserFactoryImpl not found 

When I remove the xercesImpl.jar from my classpath jetty starts fine, however then my classes don't compile anymore since the dependency is missing.

This very much sound like this issue, however I tried switching to JRE 1.6 and still no joy.


回答1:


This appears to relate to Issue 1367 in the GAE/J buglist. Comments 15, 16, and 17 seem to indicate a workaround.




回答2:


Take a look at Trouble with Selenium (XercesImpl) and Google App Engine. I had a similar problem with GAE (SAXParserFactoyImpl not found) and solved it by;

  1. Importing the jar to war/WEB-INF/lib
  2. Adding the jar to the build path


来源:https://stackoverflow.com/questions/1200637/xerces-jar-on-gae-projects-classpath-leads-to-saxparserfactoryimpl-not-found

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!