Conflicting persistence unit definitions
===

Spring 3.1.1
Maven 3.0.4
JPA
Eclipse wtp indigo

Hello,
I am getting the following exception on server startup. I have just one persistence.xml in my project. Any ideas? Thanks Eric

Caused by: java.lang.IllegalStateException: Conflicting persistence unit definitions for name 'cassandra_pu': file:/C:/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/cassandra/WEB-INF/classes/, file:/C:/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/cassandra/WEB-INF/classes/
at org.springframework.orm.jpa.persistenceunit.DefaultPersistenceUnitManager.preparePersistenceUnitInfos(DefaultPersistenceUnitManager.java:362)
at org.springframework.orm.jpa.persistenceunit.DefaultPersistenceUnitManager.afterPropertiesSet(DefaultPersistenceUnitManager.java:326)
at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:235)
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:310)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1514)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1452)
... 62 more

My context file:


    <?xml version="1.0" encoding="UTF-8"?>  
    <beans xmlns="http://www.springframework.org/schema/beans"  
            xmlns:mvc="http://www.springframework.org/schema/mvc"  
            xmlns:context="http://www.springframework.org/schema/context"  
            xmlns:tx="http://www.springframework.org/schema/tx"  
            xmlns:p="http://www.springframework.org/schema/p"  
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  
            xsi:schemaLocation="http://www.springframework.org/schema/beans  
            http://www.springframework.org/schema/beans/spring-beans-3.0.xsd  
            http://www.springframework.org/schema/context  
            http://www.springframework.org/schema/context/spring-context-3.0.xsd  
            http://www.springframework.org/schema/mvc  
            http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd  
            http://www.springframework.org/schema/tx   
            http://www.springframework.org/schema/tx/spring-tx-3.0.xsd">  
      
        <context:component-scan base-package="hamacher.cassandra.controller" />  
        <context:component-scan base-package="hamacher.cassandra.dao" />  
        <context:component-scan base-package="hamacher.cassandra.service" />  
        <context:annotation-config />  
          
      
      
        <bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">  
            <property name="prefix" value="/WEB-INF/jsp/"/>  
            <property name="suffix" value=".jsp"/>  
        </bean>  
      
      <bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">    
        <property name="packagesToScan" value="hamacher.cassandra.entity"/>   
          <property name="persistenceUnitName" value="cassandra_pu"/>  
      </bean>    
       
       
        <tx:annotation-driven />  
    <bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">  
            <property name="entityManagerFactory" ref="entityManagerFactory" />  
    </bean>  
      
              
    </beans>  




My persistence.xml file is in META-INF where it should be:
 

       <persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  
            xsi:schemaLocation="http://java.sun.com/xml/ns/persistence  
            http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"  
            version="2.0">  
            <persistence-unit name="cassandra_pu">  
                <provider>com.impetus.kundera.KunderaPersistence</provider>       
                <properties>            
                    <property name="kundera.nodes" value="localhost"/>  
                    <property name="kundera.port" value="9160"/>  
                    <property name="kundera.keyspace" value="KunderaExamples"/>  
                    <property name="kundera.dialect" value="cassandra"/>  
                    <property name="kundera.client.lookup.class" value="com.impetus.client.cassandra.pelops.PelopsClientFactory" />  
                    <property name="kundera.cache.provider.class" value="com.impetus.kundera.cache.ehcache.EhCacheProvider"/>  
                    <property name="kundera.cache.config.resource" value="/ehcache-test.xml"/>                  
                </properties>       
            </persistence-unit>  
        </persistence>  

