命名空间[./schema/jee]的类[JeeNamespaceHandler]未实现[NamespaceHandle



分析文件[D:Jbossjboss-4.2.2.GAserverdefaultconfinv-configapp-configpersistence-config.spring.xml]中的XML文档时出现意外异常;嵌套异常为org.springframework.beans.FatalBeanException:命名空间[http://www.springframework.org/schema/jee]的类[org.springframework.ejb.config.JeeNamespaceHandler]未实现[org.springframework.beans.factory.xml.NamespaceHandler]接口

我在jboss 4.2.2上使用的是spring 3.0.5。

persistence-config.spring.xml文件为.

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:jee="http://www.springframework.org/schema/jee"
        xmlns:aop="http://www.springframework.org/schema/aop"
       xmlns:tx="http://www.springframework.org/schema/tx"
       xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd 
http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd">
<!-- JNDI Environment Properties -->
<bean id="jndiEnvProps" class="java.util.Properties">
    <constructor-arg>
        <props>
            <prop key="java.naming.factory.initial">
                <![CDATA[org.jnp.interfaces.NamingContextFactory]]>
            </prop>
            <prop key="java.naming.provider.url">jnp://127.0.0.1:1099</prop>
        </props>
    </constructor-arg>
</bean>
<!-- Data Source Definition -->
<jee:jndi-lookup id="dataSource" jndi-name="zaraINVDS" environment-ref="jndiEnvProps" />
<!-- Entity Manager Factory -->
<jee:jndi-lookup id="entityManagerFactory" jndi-name="java:/zaraINVEMF" proxy-interface="javax.persistence.EntityManagerFactory" />
<!-- JTA Transaction Manager -->
<tx:jta-transaction-manager />
<!-- Annotation Driven Transaction Management -->
<tx:annotation-driven order="5"/>

我怀疑您的类路径上有两个Spring副本。类加载器正在获取它们之间的冲突。追踪它们,并移除其中一个。

最新更新