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

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

          Posted on 2007-01-03 17:53 Dr.Water 閱讀(1483) 評論(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>節點下添加

          <!-- 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無效了,我暫時直接加入系統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
          我現在遇到一個問題,resin和activemq不知如何配置,請指教。能不能把你的配置文件發出來,謝謝了。
          主站蜘蛛池模板: 天水市| 大足县| 绵竹市| 盐源县| 寿光市| 兰考县| 颍上县| 顺平县| 祁东县| 微山县| 大余县| 耒阳市| 铜梁县| 尼勒克县| 故城县| 廊坊市| 邢台县| 嘉定区| 洛南县| 班玛县| 峨山| 武夷山市| 安远县| 永泰县| 阿图什市| 璧山县| 仙游县| 甘谷县| 普宁市| 同江市| 华容县| 印江| 慈利县| 射阳县| 三江| 建宁县| 郯城县| 米易县| 伽师县| 霸州市| 榆社县|