2012-02-01 26 views
0

意外的異常解析來自文件[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]接口名稱空間[../schema/jee]的類[JeeNamespaceHandler]未實現[NamespaceHandler]接口

我使用彈簧3.0.5在JBoss 4.2.2。

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"/> 

回答

2

我懷疑你有春天的兩個副本在classpath。類加載器在它們之間發生衝突。跟蹤他們,並刪除他們中的一個。

相關問題