J Person J Person - 3 years ago 113
Java Question

Example module.xml for JBoss module gives parse errors

I'm trying to deploy the jaybird jdbc driver as a JBoss module very simply. I wrote a very simple module.xml for it here:

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

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

But when I load the module that depends on it I get an error with the line:

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) "}}}}

I don't understand the error since the documentation at https://jboss-modules.github.io/jboss-modules/manual/#module-descriptors says the version attribute exists from version 1.6. In fact if I just copy and paste the example XML from that page I still get the same parse error.

It seems like it must be using the wrong schema but I can't see anything in the documentation to explain why that would be.

Answer Source

I don't know the version of your jboss. But you could check the schema under: $JBOSS_HOME/docs/schema, there is module-1_0.xsd, module1_1.xsd and so on. If there isn't a file like module-1_6.xsd, then your JBoss doesn't support this schema.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download