posts - 9, comments - 8, trackbacks - 0, articles - 3
            BlogJava :: 首頁 :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理

          Resin 3.0.x和Spring 2.0 xsd 配置問題解決

          Posted on 2007-01-03 17:53 Dr.Water 閱讀(1484) 評論(1)  編輯  收藏 所屬分類: Java 隨手貼

          Spring 官方已經提到這個錯誤了

          http://www.springframework.org/docs/reference/xsd-config.html#xsd-config-integration-resin

          A.3.3.1. XML parsing errors in the Resin v.3 application server


          If you are using the XSD-style for Spring 2.0 XML configuration and deploying to v.3 of Caucho's Resin application server, you will need to set some configuration options prior to startup so that an XSD-aware parser is available to Spring.
          Please do read this resource


          而resin給出來的參考就是他默認不是使用xerces和xalan作為xml和xslt的默認解析器

          正是由于他默認不是采用以上作為xml,xstl的解析器,導致了在resin下面 使用spring 2.0 新xsd配置方式會報錯誤

          (主要就是xml中的attribute和propertie 他取不到)

          解決的方法就是讓resin使用xerces和xalan作為xml和xslt的默認解析器

          配置:

          在resin.conf的<web-app>或者<server>節(jié)點下添加

          <!-- xml -->
          <system-property javax.xml.parsers.DocumentBuilderFactory=
          ???????????? "org.apache.xerces.jaxp.DocumentBuilderFactoryImpl"/>
          <system-property javax.xml.parsers.SAXParserFactory=
          ???????????? "org.apache.xerces.jaxp.SAXParserFactoryImpl"/>
          ??
          ??? <!--? xslt -->
          <system-property javax.xml.transform.TransformerFactory=
          ???????????? "org.apache.xalan.processor.TransformerFactoryImpl"/>


          然后把相應的jar加入%RESIN_HOME%/lib 目錄,這里需要說明的是我在測試activemq的時候

          加入xerces和xalan后,他包其他class無法找到,感覺好像是默認的web-app目錄下的jar無效了,我暫時直接加入系統(tǒng)classpath解決的

          這點不知道是不是我自己的平臺問題。


          經過測試 resin 3.0.22+spring 2.0+activemq xsd配置方式ok了,


          ps. ^.^ 以前的resin下面項目沒有用2.0配置,自己也學習到了新東西


          評論

          # re: Resin 3.0.x和Spring 2.0 xsd 配置問題解決[未登錄]  回復  更多評論   

          2009-12-23 10:12 by
          我現(xiàn)在遇到一個問題,resin和activemq不知如何配置,請指教。能不能把你的配置文件發(fā)出來,謝謝了。
          主站蜘蛛池模板: 扎鲁特旗| 积石山| 武平县| 兴义市| 邵东县| 方正县| 綦江县| 泌阳县| 通渭县| 北票市| 庆安县| 洪泽县| 分宜县| 永和县| 冀州市| 拜城县| 普格县| 鄂州市| 崇明县| 宁河县| 贺州市| 苍南县| 达日县| 焦作市| 收藏| 乐昌市| 九台市| 格尔木市| 宁南县| 丰县| 始兴县| 长阳| 阿城市| 利津县| 来宾市| 鹿泉市| 贵溪市| 石门县| 鹤庆县| 思南县| 玉门市|