Worklight 适配器SAX2 driver not found异常

今天在windows server 2003+jdk7.0环境下部署Worklight项目时,发现一个诡异的异常:

通过http适配器解析soap时,解析失败,服务器抛出异常:

org.xml.sax.SAXException: SAX2 driver class org.apache.xerces.parsers.SAXParser not found

java.lang.ClassNotFoundException:org.apache.xerces.parsers.SAXParser

Causedby:org.xml.sax.SAXException:SAX2driverclassorg.apache.xerces.parsers.SAXParsernotfound

java.lang.ClassNotFoundException: org.apache.xerces.parsers.SAXParser

研究了半天发现,org.apache.xerces.parsers.SAXParser在jdk7.0里不存在,倒是有个

com.sun.org.apache.xerces.internal.parsers.SAXParser

于是在Eclipse启动配置文件eclipse.ini中加入一行

-Dorg.xml.sax.driver=com.sun.org.apache.xerces.internal.parsers.SAXParser

重启Eclipse,搞定

相关推荐