<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">
<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>
                                <td>
                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="http://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>
                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px; -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
JBoss AS 7 - trouble with Spring application deploying
</h3>
<span style="margin-bottom: 10px;">
created by <a href="http://community.jboss.org/people/sigthor">Sigurd Thorsson</a> in <i>JBoss AS7 Development</i> - <a href="http://community.jboss.org/message/629808#629808">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">
<div class="jive-rendered-content"><p>I try to deploy Spring application on JBoss AS 7, but unfortunately this error occures while deploying:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><blockquote class="jive-quote"><p><span>ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/pasmatri]] (MSC service thread 1-3) Servlet /pasmatri threw load() exception: org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [</span><a class="jive-link-external-small" href="http://www.springframework.org/schema/jee" target="_blank">http://www.springframework.org/schema/jee</a><span>]</span></p></blockquote><p>Spring jars are placed in module directory under org/springframework/main slot. The content of module.xml:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><blockquote class="jive-quote"><p><?xml version="1.0" encoding="UTF-8"?></p><p><module xmlns="urn:jboss:module:1.0" name="org.springframework"></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>    <resources></p><p>        <resource-root path="aopalliance-1.0.jar"/></p><p>        <resource-root path="org.springframework.aop-3.0.6.RELEASE.jar"/></p><p>        <resource-root path="org.springframework.asm-3.0.6.RELEASE.jar"/></p><p>    <resource-root path="org.springframework.aspects-3.0.6.RELEASE.jar"/></p><p>        <resource-root path="org.springframework.beans-3.0.6.RELEASE.jar"/></p><p>        <resource-root path="org.springframework.context-3.0.6.RELEASE.jar"/></p><p>        <resource-root path="org.springframework.core-3.0.6.RELEASE.jar"/></p><p>        <resource-root path="org.springframework.expression-3.0.6.RELEASE.jar"/></p><p>        <resource-root path="org.springframework.jdbc-3.0.6.RELEASE.jar"/></p><p>        <resource-root path="org.springframework.orm-3.0.6.RELEASE.jar"/></p><p>    <resource-root path="org.springframework.transaction-3.0.6.RELEASE.jar"/></p><p>    <resource-root path="org.springframework.test-3.0.6.RELEASE.jar"/></p><p>        <resource-root path="org.springframework.web-3.0.6.RELEASE.jar"/></p><p>    <resource-root path="org.springframework.web.servlet-3.0.6.RELEASE.jar"/></p><p>    </resources></p><p>    </p><p>    <dependencies></p><p>        <module name="javax.api"/></p><p>        <module name="javax.jms.api"/></p><p>        <module name="javax.annotation.api"/></p><p>        <module name="org.apache.commons.logging"/></p><p>    <module name="javax.servlet.api"/></p><p>    </dependencies></p><p></module></p></blockquote><p>Within WAR that external dependency is defined in MANIFEST.MF:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><blockquote class="jive-quote"><p>Manifest-Version: 1.0</p><p>Dependencies: org.jdom, org.apache.log4j, org.apache.commons.logging, org.hibernate, org.springframework</p></blockquote><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>In case of placing spring jars into WEB-INF/lib all works ok, but as jboss module it doesn't work.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>The content of spring-context.xml</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><blockquote class="jive-quote"><p><?xml version="1.0" encoding="UTF-8"?></p><p><span><beans xmlns="</span><a class="jive-link-external-small" href="http://www.springframework.org/schema/beans" target="_blank">http://www.springframework.org/schema/beans</a><span>"</span></p><p><span>    xmlns:xsi="</span><a class="jive-link-external-small" href="http://www.w3.org/2001/XMLSchema-instance" target="_blank">http://www.w3.org/2001/XMLSchema-instance</a><span>" </span></p><p><span>    xmlns:aop="</span><a class="jive-link-external-small" href="http://www.springframework.org/schema/aop" target="_blank">http://www.springframework.org/schema/aop</a><span>"</span></p><p><span>    xmlns:tx="</span><a class="jive-link-external-small" href="http://www.springframework.org/schema/tx" target="_blank">http://www.springframework.org/schema/tx</a><span>"</span></p><p><span>    xmlns:jee="</span><a class="jive-link-external-small" href="http://www.springframework.org/schema/jee" target="_blank">http://www.springframework.org/schema/jee</a><span>"</span></p><p>    xsi:schemaLocation="</p><p><span>       </span><a class="jive-link-external-small" href="http://www.springframework.org/schema/beans" target="_blank">http://www.springframework.org/schema/beans</a><span> </span><a class="jive-link-external-small" href="http://www.springframework.org/schema/beans/spring-beans-3.0.xsd" target="_blank">http://www.springframework.org/schema/beans/spring-beans-3.0.xsd</a></p><p><span>       </span><a class="jive-link-external-small" href="http://www.springframework.org/schema/tx" target="_blank">http://www.springframework.org/schema/tx</a><span> </span><a class="jive-link-external-small" href="http://www.springframework.org/schema/tx/spring-tx-3.0.xsd" target="_blank">http://www.springframework.org/schema/tx/spring-tx-3.0.xsd</a></p><p><span>       </span><a class="jive-link-external-small" href="http://www.springframework.org/schema/aop" target="_blank">http://www.springframework.org/schema/aop</a><span> </span><a class="jive-link-external-small" href="http://www.springframework.org/schema/aop/spring-aop-3.0.xsd" target="_blank">http://www.springframework.org/schema/aop/spring-aop-3.0.xsd</a></p><p><span>       </span><a class="jive-link-external-small" href="http://www.springframework.org/schema/jee" target="_blank">http://www.springframework.org/schema/jee</a><span> </span><a class="jive-link-external-small" href="http://www.springframework.org/schema/jee/spring-jee-3.0.xsd" target="_blank">http://www.springframework.org/schema/jee/spring-jee-3.0.xsd</a><span>"></span></p><p>    </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>    <jee:jndi-lookup id="domDataSource" jndi-name="java:PasmatriDS"/></p><p>   </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>    <bean id="domSessionFactory"</p><p>        class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"></p><p>        <property name="dataSource" ref="domDataSource" /></p><p>        <property name="mappingResources"></p><p>            <list></p><p>                <value>com/turkevych/pasmatri/gwt/server/resources/Dom.hbm.xml</value></p><p>            </list></p><p>        </property></p><p>        <property name="hibernateProperties"></p><p>            <props></p><p>                <prop key="hibernate.dialect"></p><p>                    org.hibernate.dialect.MySQLInnoDBDialect</p><p>                </prop></p><p>                <prop key="hibernate.cache.use_second_level_cache"></p><p>                    true</p><p>                </prop></p><p>                <prop key="hibernate.show_sql">false</prop></p><p>                <prop key="hibernate.connection.autocommit">false</prop></p><p>                <prop key="hibernate.hbm2ddl.auto">update</prop></p><p>            </props></p><p>        </property></p><p>    </bean></p><p>    </p><p>    </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>    </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>    <bean id="domTransactionManager"</p><p>        class="org.springframework.orm.hibernate3.HibernateTransactionManager"></p><p>        <property name="sessionFactory" ref="domSessionFactory" /></p><p>    </bean></p><p>    </p><p>    </p><p>    </p><p>    </p><p>    </p><p>    </p><p></beans></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p></blockquote></div>
<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
<p style="margin: 0;">Reply to this message by <a href="http://community.jboss.org/message/629808#629808">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in JBoss AS7 Development at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2225">Community</a></p>
</div></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>