发布我的webapp的时候遇到了下面的错误信息。
org.xml.sax.SAXNotRecognizedException: http://xml.org/sax/features/validation
查找资料http://www.google.com/search?hl=zh-CN&inlang=zh-CN&newwindow=1&q=resin+org.xml.sax.SAXNotRecognizedException&lr=,(参考:http://www.slamb.org/svn/repos/projects/axamol/sax-pipeline/README)
需要新建一个 jaxp.properties, 内容如下:
javax.xml.parsers.SAXParserFactory: org.apache.xerces.jaxp.SAXParserFactoryImpl
保存文件到$JAVA_HOME/jre/lib/下面
接下来可能会出现下面的错误信息:
javax.xml.parsers.FactoryConfigurationError: Provider org.apache.xerces.jaxp.SAX
ParserFactoryImpl could not be instantiated: java.lang.NullPointerException
因此还需要把xercesImpl.jar复制到D:\jdk1.5.0_01\jre\lib\endorsed下面(没有这个目录就创建这个目录)
重新启动resin,我的webapp启动成功了。
访问 http://lizongbo.myresintest.com/mywebapp/,页面正常出现。
b.另外一种更简单的解决方法,不需要修改jdk的配置
((此方法没有测试过,请参考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>


希望对你有所启发
详细地址:
http://dev.csdn.net/article/62/62171.shtm
posted on 2006-10-23 17:40 pear 阅读(2482) 评论(0)  编辑  收藏

只有注册用户登录后才能发表评论。


网站导航: