2017-07-25 122 views
0

我試圖非常簡單地將jaybird jdbc驅動程序部署爲JBoss模塊。我寫了一個非常簡單的module.xml爲在這裏:用於JBoss模塊的module.xml文件給出瞭解析錯誤

<?xml version="1.0" encoding="UTF-8"?> 

<module xmlns="urn:jboss:module:1.6" name="org.firebirdsql.jdbc.jaybird-jdk18" version="3.0.1"> 
    <resources> 
     <resource-root path="jaybird-jdk18-3.0.1.jar"/> 
    </resources> 
</module> 

但是當我加載依賴於它的模塊我得到一個錯誤,用線:

Caused by: org.jboss.modules.xml.XmlPullParserException: Unknown attribute \"version\" from namespace \"\" (position: START_TAG seen ...le:1.6\" name=\"org.firebirdsql.jdbc.jaybird-jdk18\" version=\"3.0.1\">... @3:96) "}}}} 

我不明白因爲文檔https://jboss-modules.github.io/jboss-modules/manual/#module-descriptors表示版本屬性存在於版本1.6中。事實上,如果我只是從該頁面複製並粘貼示例XML,我仍會得到相同的分析錯誤。

它似乎必須使用錯誤的模式,但我無法看到文檔中的任何內容來解釋爲什麼會這樣。

回答

2

我不知道你的jboss的版本。但是您可以在$ JBOSS_HOME/docs/schema下檢查模式,其中有module-1_0.xsd,module1_1.xsd等。如果沒有像module-1_6.xsd這樣的文件,那麼你的JBoss不支持這個模式。