需要新建一個(gè) jaxp.properties, 內(nèi)容如下:
javax.xml.parsers.SAXParserFactory: org.apache.xerces.jaxp.SAXParserFactoryImpl
保存文件到$JAVA_HOME/jre/lib/下面
接下來可能會(huì)出現(xiàn)下面的錯(cuò)誤信息:
javax.xml.parsers.FactoryConfigurationError: Provider org.apache.xerces.jaxp.SAX
ParserFactoryImpl could not be instantiated: java.lang.NullPointerException
因此還需要把xercesImpl.jar復(fù)制到D:\jdk1.5.0_01\jre\lib\endorsed下面(沒有這個(gè)目錄就創(chuàng)建這個(gè)目錄)
重新啟動(dòng)resin,我的webapp啟動(dòng)成功了。
訪問 http://lizongbo.myresintest.com/mywebapp/,頁面正常出現(xiàn)。
b.另外一種更簡單的解決方法,不需要修改jdk的配置
((此方法沒有測試過,請(qǐng)參考http://www-900.ibm.com/developerWorks/cn/webservices/ws-axisfaq/index.shtml和http://www.caucho.com/quercus/faq/question.xtp?question_id=295)):
<host id="lizongbo.myresintest.com" root-directory=".">
<web-app id='/' document-directory="webapps/ROOT"/>
<web-app id='/lizongbo' document-directory="E:/jb/oscachedemo/test">
<system-property javax.xml.transform.TransformerFactory="org.apache.xalan.processor.TransformerFactoryImpl"/>
<system-property javax.xml.parsers.DocumentBuilderFactory="org.apache.xerces.jaxp.DocumentBuilderFactoryImpl"/>
<system-property javax.xml.parsers.SAXParserFactory="org.apache.xerces.jaxp.SAXParserFactoryImpl"/>
<system-property org.xml.sax.driver="org.apache.xerces.parsers.SAXParser"/>
</web-app>
</host>
MSN:
