在 GWT 中导入 Gears API 时找不到 org.apache.xerces.jaxp.SAXParserFactoryImpl [英] org.apache.xerces.jaxp.SAXParserFactoryImpl not found when importing Gears API in GWT

查看:21
本文介绍了在 GWT 中导入 Gears API 时找不到 org.apache.xerces.jaxp.SAXParserFactoryImpl的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 Eclipse 创建了一个

我什至打开了 gwt-gears.jar 文件并确认 org/apache/xerces/jaxp/SAXParserFactoryImpl.class 确实存在.谁能告诉我为什么会出现上述错误?

解决方案

显然这是 jre 1.5 中的一个错误.通过将 Eclipse 中的默认 JRE 从 1.5.0_06 切换到 1.6.0_03,我能够解决该问题,如下所示:

感谢 JonRahul 为我指明了正确的方向.

I've created a GWT project using Eclipse which was working perfectly (I was able to run it in both Hosted Mode and on Google App Engine) until I tried to import the Gears API for Google Web Toolkit. After adding the following line to my java source file:

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

I get the following error when I try to compile:

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 SettingsGeoff DenningworkspaceTaskPathwar}
javax.xml.parsers.FactoryConfigurationError: Provider org.apache.xerces.jaxp.SAXParserFactoryImpl not found

I've already added the gwt-gears.jar file to my warWEB-INFlib directory, and I've referenced it in Eclipse as follows:

I've even opened the gwt-gears.jar file and confirmed that org/apache/xerces/jaxp/SAXParserFactoryImpl.class does exist. Can anyone give me any pointers as to why I'm getting the above error?

解决方案

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

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

这篇关于在 GWT 中导入 Gears API 时找不到 org.apache.xerces.jaxp.SAXParserFactoryImpl的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆