现在的位置: 首页 > 综合 > 正文

关于在resin下配置cocoon

2014年09月05日 ⁄ 综合 ⁄ 共 1189字 ⁄ 字号 评论关闭
1.不要 include resin 的以下几个包

  • jaxp.jar
  • dom.jar
  • sax.jar

    用这两个包替代:xerces-XXX.jar and xml-apis.jar

  • 2.如果解析 xsp 文件出现以下错误
    org.apache.cocoon.ProcessingException: Failed to generate program code (this may happen if you use Xalan in incremental processing mode). Please check log file and/or console for errors.
    at org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.generateResource(ProgramGeneratorImpl.java:395)
    at org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.createResource(ProgramGeneratorImpl.java:353)
    at org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.load(ProgramGeneratorImpl.java:312)
    at org.apache.cocoon.sitemap.Handler.run(Handler.java:267)
    at java.lang.Thread.run(Thread.java:536)

    在 resin 的配置文件 resin.conf 中加入以下几行
    <caucho.com>
        <system-property java.awt.headless="true"/>
        <system-property javax.xml.parsers.DocumentBuilderFactory="org.apache.xerces.jaxp.DocumentBuilderFactoryImpl"/>
        <system-property javax.xml.parsers.SAXParserFactory="org.apache.xerces.jaxp.SAXParserFactoryImpl"/>
        <system-property javax.xml.transform.TransformerFactory="org.apache.xalan.processor.TransformerFactoryImpl"/>
        <system-property org.xml.sax.driver="org.apache.xerces.parsers.SAXParser"/>

     

    抱歉!评论已关闭.