Spring module in JBoss 7

后端 未结 2 1322
情歌与酒
情歌与酒 2021-02-04 15:42

I\'m trying to set up Spring 3.0.6 libraries as a module in JBoss 7.

I have all of the jars in modules/org/springframework/main along with the following module.xml

相关标签:
2条回答
  • 2021-02-04 16:32

    Was facing the exact same issue. Had set up a spring module on JBoss 7 and then when deploying my application, was facing the below warning:

    Failed to read schema document 'http://www.springframework.org/schema/beans/spring-beans-3.2.xsd'

    I understood the spring context file was unable to access the schema definitions from the spring jars, after reading the link in the comments above. And hence, the application was not getting deployed. But the solution given there did not work for me. But the below code in the jboss-deployment-structure.xml resolved the issue.

    Solution

    <module name="org.springframework.spring"   meta-inf="export"   export="true" />
    

    Added meta-inf="export" attribute.

    0 讨论(0)
  • 2021-02-04 16:37

    Just in case the link that was given in the comments goes away, the problem is that

    Problem:

    The namespace configuration files are in META-INF, but that directory is not visible (nor is it configurable via jboss-deployment-structure.xml)

    Solution:

       <jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.0">
            <deployment>
                <dependencies>
                    <module name="org.apache.commons.logging"/>
                    <module name="org.springframework" >
                        <imports>
                            <include path="META-INF**"/>
                            <include path="org**"/>
                        </imports>
                    </module>
                </dependencies>
        </jboss-deployment-structure>
    
    0 讨论(0)
提交回复
热议问题