从文件[
D:\Jboss\jboss-4.2.2.GA\server\default\conf\inv-config\app-config\persistence-config.spring.xml
]解析XML文档时发生意外异常;嵌套异常为org.springframework.beans.FatalBeanException
:名称空间[org.springframework.ejb.config.JeeNamespaceHandler
]的类[http://www.springframework.org/schema/jee
]未实现[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"/>
答案 0 :(得分:3)
我怀疑你的类路径上有两个Spring副本。类加载器之间会发生冲突。跟踪它们,并删除其中一个。